haikuwebkit/Source/WebKitLegacy/ios/Misc
Chris Dumez 743c1f7389 Reduce use of CFRetain() / CFRelease() / CFAutoRelease() in WebKit
https://bugs.webkit.org/show_bug.cgi?id=222760

Reviewed by Darin Adler.

Reduce use of CFRetain() / CFRelease() / CFAutoRelease() in WebKit by using RetainPtr<>.

Source/JavaScriptCore:

* API/JSContext.mm:
(-[JSContext name]):
* API/JSValue.mm:
(valueToObjectWithoutCopy):
(valueToString):
* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::deserializeMessage):

Source/WebCore:

* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXTextMarkerRange):
(WebCore::AXTextMarkerRangeStart):
(WebCore::AXTextMarkerRangeEnd):
(WebCore::textMarkerForVisiblePosition):
(WebCore::textMarkerForCharacterOffset):
(WebCore::startOrEndTextMarkerForRange):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
(-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(nextTextMarkerForCharacterOffset):
(previousTextMarkerForCharacterOffset):
(-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]):
(AXAttributeStringSetElement):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processText):
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor):
* page/mac/EventHandlerMac.mm:
(WebCore::selfRetainingNSScrollViewScrollWheel):
* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect):
* platform/cf/MainThreadSharedTimerCF.cpp:
(WebCore::sharedTimer):
(WebCore::MainThreadSharedTimer::restartSharedTimer):
(WebCore::MainThreadSharedTimer::invalidate):
(WebCore::MainThreadSharedTimer::setFireInterval):
(WebCore::MainThreadSharedTimer::stop):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::exernalDeviceDisplayNameForPlayer):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::initialize):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::patternReleaseCallback):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::strokeRect):
* platform/graphics/cg/PatternCG.cpp:
(WebCore::patternReleaseCallback):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::autoActivateFont):
* platform/graphics/win/FontCGWin.cpp:
(WebCore::FontCascade::getPlatformGlyphAdvances):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContext::drawFocusRing):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
* platform/ios/UserAgentIOS.mm:
(WebCore::standardUserAgentWithApplicationName):
* platform/ios/wak/WebCoreThread.mm:
(SendDelegateMessage):
(RunWebThread):
(WebThreadUnlockGuardForMail):
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::speechSynthesisGetVoiceIdentifiers):
(WebCore::speechSynthesisGetDefaultVoiceIdentifierForLocale):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/PluginBlocklist.mm:
(WebCore::PluginBlocklist::create):
* platform/mac/WebGLBlocklist.mm:
(WebCore::WebGLBlocklist::create):
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:
(WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
(WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:
(WebCore::setCompressionSessionProperty):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::closeCurrentStream):
(WebCore::advanceCurrentStream):
(WebCore::openNextStream):
(WebCore::formRead):
(WebCore::formCanRead):
(WebCore::formSchedule):
(WebCore::formUnschedule):
* platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
(WebCore::createPrivateStorageSession):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::setClientCertificateInSSLProperties):
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdateResourceRequest):
* platform/win/DragImageCGWin.cpp:
(WebCore::createCgContextFromBitmap):
(WebCore::scaleDragImage):
* platform/win/WebCoreBundleWin.cpp:
(WebCore::createWebKitBundle):
(WebCore::webKitBundle):
* rendering/RenderThemeMac.mm:
(-[WebCoreTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]):
* testing/cocoa/WebArchiveDumpSupport.h:
* testing/cocoa/WebArchiveDumpSupport.mm:
(WebCoreTestSupport::createXMLStringFromWebArchiveData):
* testing/cocoa/WebViewVisualIdentificationOverlay.mm:
(identificationFont):

Source/WebKit:

* Platform/mac/StringUtilities.mm:
(WebKit::nsStringFromWebCoreString):
(WebKit::formattedPhoneNumberString):
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::initializeCocoaOverrides):
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forEditing):
(WebKit::PasteboardTypes::forURL):
(WebKit::PasteboardTypes::forImages):
(WebKit::PasteboardTypes::forImagesWithArchive):
(WebKit::PasteboardTypes::forSelection):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::acceptsFirstMouse):
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
(WebKit::WebViewImpl::validAttributesForMarkedText):
(WebKit::WebViewImpl::performKeyEquivalent):
* UIProcess/Inspector/ios/WKInspectorHighlightView.mm:
(layerPathWithHole):
(layerPath):
* UIProcess/_WKTouchEventGenerator.mm:
(-[_WKTouchEventGenerator dealloc]):
(-[_WKTouchEventGenerator _sendHIDEvent:]):
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _EVOrganizationName]):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::webProcessLoaderAccessibilityBundlePath):

Source/WebKitLegacy/ios:

* Misc/WebUIKitSupport.mm:
(LoadWebLocalizedStrings):
* WebView/WebPDFViewIOS.mm:
(-[WebPDFView finishedLoadingWithDataSource:]):
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder finishedLoadingWithDataSource:]):

Source/WebKitLegacy/mac:

* Misc/WebLocalizableStrings.mm:
* Misc/WebNSDataExtras.mm:
(-[NSString _web_capitalizeRFC822HeaderFieldName]):
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::preferredBundleLocalizationName):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView status:]):
* WebCoreSupport/WebProgressTrackerClient.mm:
(WebProgressTrackerClient::progressEstimateChanged):
* WebInspector/WebNodeHighlightView.mm:
(layerPathWithHole):
(layerPath):
* WebView/WebFrame.mm:
(createUniqueWebDataURL):
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKitLegacy/win:

* CFDictionaryPropertyBag.cpp:
(ConvertVariantToCFType):
(CFDictionaryPropertyBag::Read):
(CFDictionaryPropertyBag::Write):
* MarshallingHelpers.cpp:
(MarshallingHelpers::PathStringToFileCFURLRef):
(MarshallingHelpers::FileCFURLRefToPathString):
(MarshallingHelpers::BSTRToCFURLRef):
(MarshallingHelpers::BSTRToCFStringRef):
(MarshallingHelpers::LPCOLESTRToCFStringRef):
(MarshallingHelpers::intToCFNumberRef):
(MarshallingHelpers::safeArrayToStringArray):
(MarshallingHelpers::safeArrayToIntArray):
(MarshallingHelpers::safeArrayToIUnknownArray):
* MarshallingHelpers.h:
* WebApplicationCache.cpp:
(WebApplicationCache::originsWithCache):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidFailToStartPlugin const):
* WebDownloadCFNet.cpp:
(WebDownload::initToResumeWithBundle):
(WebDownload::setDestination):
(WebDownload::willSendRequest):
* WebHistory.cpp:
(createUserInfoFromArray):
* WebLocalizableStrings.cpp:
(createWebKitBundle):

Source/WTF:

* wtf/cocoa/NSURLExtras.mm:
(WTF::decodePercentEscapes):
(WTF::URLByTruncatingOneCharacterBeforeComponent):
(WTF::URLWithData):
(WTF::URLByRemovingComponentAndSubsequentCharacter):

Tools:

* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer):
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(+[NSString stringWithJSStringRef:]):
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateFontIOS):
(dumpRenderTree):
(invalidateAnyPreviousWaitToDumpWatchdog):
(setWaitToDumpWatchdog):
(dump):
(runTest):
* DumpRenderTree/mac/DumpRenderTreeMac.h:
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController mouseScrollByX:andY:continuously:]):
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(takeWindowSnapshot):
(createBitmapContextFromWebView):
* DumpRenderTree/mac/ResourceLoadDelegate.mm:
(-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::addDisallowedURL):
(TestRunner::setWaitToDump):
* FontWithFeatures/FontWithFeatures/main.cpp:
(constructFontWithTrueTypeFeature):
(constructFontWithOpenTypeFeature):
(drawText):
(main):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(+[NSString stringWithJSStringRef:]):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
(+[NSString stringWithJSStringRef:]):
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator _createIOHIDEventWithInfo:]):
* WebKitTestRunner/mac/EventSenderProxy.mm:
(-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::cfString):
(WTR::UIScriptControllerMac::replaceTextAtRange):


Canonical link: https://commits.webkit.org/234914@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-05 15:44:47 +00:00
..
WebGeolocationCoreLocationProvider.h
WebGeolocationCoreLocationProvider.mm
WebGeolocationProviderIOS.h
WebGeolocationProviderIOS.mm Use adoptNS() as soon as we [[ObjcClass alloc] init] to avoid leaks 2021-02-22 21:59:00 +00:00
WebNSStringExtrasIOS.h
WebNSStringExtrasIOS.m
WebNSStringExtrasIPhone.h
WebUIKitSupport.h
WebUIKitSupport.mm Reduce use of CFRetain() / CFRelease() / CFAutoRelease() in WebKit 2021-03-05 15:44:47 +00:00