1. 24 Jul, 2013 1 commit
  2. 08 May, 2013 1 commit
    • darin@apple.com's avatar
      Source/WebCore: Use adoptCF and adoptNS in more places · f00480b5
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115657
      
      Reviewed by Sam Weinig.
      
      This is similar to my last set of changes, but covers code that I missed with
      global replace using the Safari Xcode workspace.
      
      * platform/cf/win/CertificateCFWin.cpp:
      (WebCore::copyCertificateToData):
      * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
      (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
      (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
      (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
      (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
      (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes):
      (WebCore::mimeTypeCache):
      (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
      (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged):
      (WebCore::AVFWrapper::createAssetForURL):
      (WebCore::AVFWrapper::createPlayer):
      (WebCore::AVFWrapper::createPlayerItem):
      (WebCore::AVFWrapper::setAsset):
      (WebCore::AVFWrapper::platformLayer):
      (WebCore::AVFWrapper::createAVCFVideoLayer):
      (WebCore::AVFWrapper::createImageGenerator):
      * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
      (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
      * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
      (toCACFTimingFunction):
      (PlatformCAAnimation::PlatformCAAnimation):
      (PlatformCAAnimation::setFromValue):
      (PlatformCAAnimation::setToValue):
      (PlatformCAAnimation::setValues):
      (PlatformCAAnimation::setKeyTimes):
      (PlatformCAAnimation::setTimingFunctions):
      * platform/graphics/ca/win/PlatformCALayerWin.cpp:
      (PlatformCALayer::PlatformCALayer):
      (PlatformCALayer::setBackgroundColor):
      (PlatformCALayer::setBorderColor):
      * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
      (PlatformCALayerWinInternal::PlatformCALayerWinInternal):
      (PlatformCALayerWinInternal::addTile):
      * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
      (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost):
      * platform/graphics/gstreamer/PlatformVideoWindowMac.mm:
      (PlatformVideoWindow::PlatformVideoWindow):
      * platform/graphics/win/FontCustomPlatformData.cpp:
      (WebCore::FontCustomPlatformData::fontPlatformData):
      * platform/graphics/win/FontPlatformDataCGWin.cpp:
      (WebCore::getPostScriptName):
      (WebCore::FontPlatformData::platformDataInit):
      * platform/graphics/win/GraphicsContextCGWin.cpp:
      (WebCore::GraphicsContext::drawWindowsBitmap):
      * platform/graphics/win/ImageCGWin.cpp:
      (WebCore::BitmapImage::create):
      * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
      (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
      (WebCore::MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime):
      (WebCore::QTCFDictionaryCreateWithDataCallback):
      (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
      * platform/graphics/win/WKCAImageQueue.cpp:
      (WebCore::WKCAImageQueue::WKCAImageQueue):
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
      * platform/network/cf/AuthenticationCF.cpp:
      (WebCore::core):
      * platform/network/cf/CookieJarCFNet.cpp:
      (WebCore::cookieDomain):
      (WebCore::cookieName):
      (WebCore::cookiePath):
      (WebCore::cookieValue):
      (WebCore::filterCookies):
      (WebCore::setCookiesFromDOM):
      (WebCore::cookiesForDOM):
      (WebCore::cookieRequestHeaderFieldValue):
      (WebCore::getRawCookies):
      (WebCore::deleteCookie):
      (WebCore::getHostnamesWithCookies):
      (WebCore::deleteCookiesForHostname):
      * platform/network/curl/ResourceHandleManager.cpp:
      (WebCore::certificatePath):
      * platform/win/ClipboardUtilitiesWin.cpp:
      (WebCore::urlFromPath):
      (WebCore::getURL):
      * platform/win/LocalizedStringsWin.cpp:
      (WebCore::createWebKitBundle):
      (WebCore::localizedString):
      * platform/win/SearchPopupMenuWin.cpp:
      (WebCore::SearchPopupMenuWin::saveRecentSearches):
      (WebCore::SearchPopupMenuWin::loadRecentSearches):
      * plugins/mac/PluginPackageMac.cpp:
      (WebCore::stringListFromResourceId):
      (WebCore::PluginPackage::fetchInfo):
      (WebCore::PluginPackage::load):
      * plugins/mac/PluginViewMac.mm:
      (WebCore::PluginView::platformStart):
      * rendering/RenderThemeSafari.cpp:
      (WebCore::RenderThemeSafari::platformFocusRingColor):
      (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
      (WebCore::RenderThemeSafari::paintSliderTrack):
      Use adoptCF and adoptNS throughout.
      
      Source/WebKit/win: Use adoptCF and adoptNS in more places
      https://bugs.webkit.org/show_bug.cgi?id=115657
      
      Reviewed by Sam Weinig.
      
      This is similar to my last set of changes, but covers code that I missed with
      global replace using the Safari Xcode workspace.
      
      * CFDictionaryPropertyBag.cpp:
      (CFDictionaryPropertyBag::Write):
      * WebCache.cpp:
      (WebCache::statistics):
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::dispatchDidFailToStartPlugin):
      * WebCoreSupport/WebInspectorClient.cpp:
      (WebInspectorClient::openInspectorFrontend):
      (WebInspectorFrontendClient::localizedStringsURL):
      * WebDatabaseManager.cpp:
      (WebDatabaseManager::dispatchDidModifyDatabase):
      * WebDownloadCFNet.cpp:
      (WebDownload::init):
      (WebDownload::initWithRequest):
      (WebDownload::initToResumeWithBundle):
      (WebDownload::cancelForResume):
      (WebDownload::useCredential):
      (WebDownload::didReceiveAuthenticationChallenge):
      * WebError.cpp:
      (WebError::sslPeerCertificate):
      * WebHistory.cpp:
      (createUserInfoFromArray):
      (createUserInfoFromHistoryItem):
      (WebHistory::WebHistory):
      (WebHistory::loadFromURL):
      (WebHistory::loadHistoryGutsFromURL):
      (WebHistory::saveToURL):
      (WebHistory::saveHistoryGuts):
      (WebHistory::removeAllItems):
      (WebHistory::removeItem):
      (WebHistory::addItem):
      (WebHistory::itemForURL):
      (WebHistory::addItemToDateCaches):
      (getDayBoundaries):
      * WebIconDatabase.cpp:
      (postDidAddIconNotification):
      * WebLocalizableStrings.cpp:
      (cfBundleForStringsBundle):
      * WebMutableURLRequest.cpp:
      (WebMutableURLRequest::mutableCopy):
      * WebPreferences.cpp:
      (cfNumber):
      (WebPreferences::initializeDefaultSettings):
      (WebPreferences::valueForKey):
      (WebPreferences::setStringValue):
      (WebPreferences::load):
      (WebPreferences::migrateWebKitPreferencesToCFPreferences):
      (WebPreferences::setPreferenceForTest):
      * WebView.cpp:
      (WebView::setCacheModel):
      (WebView::notifyPreferencesChanged):
      Use adoptCF and adoptNS.
      
      Source/WebKit2: Use adoptCF and adoptNS in more places
      https://bugs.webkit.org/show_bug.cgi?id=115657
      
      Reviewed by Sam Weinig.
      
      * Shared/Downloads/cfnet/DownloadCFNet.cpp:
      (WebKit::Download::useCredential):
      (WebKit::Download::start):
      (WebKit::Download::startWithHandle):
      (WebKit::Download::cancel):
      (WebKit::Download::didDecideDestination):
      Use adoptCF and adoptNS.
      
      Tools: Use adoptCF and adoptNS in more places, test code and code not compiled on Mac
      https://bugs.webkit.org/show_bug.cgi?id=115657
      
      Reviewed by Sam Weinig.
      
      This is similar to my last set of changes, but covers code that I missed with
      global replace using the Safari Xcode workspace.
      
      * DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
      (convertWebResourceDataToString):
      (convertWebResourceResponseToDictionary):
      (createXMLStringFromWebArchiveData):
      * DumpRenderTree/cg/ImageDiffCG.cpp:
      (createImageFromStdin):
      (createDifferenceImage):
      (main):
      * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
      (printPNG):
      (dumpBitmap):
      * DumpRenderTree/cg/PixelDumpSupportCG.h:
      (BitmapContext::BitmapContext):
      * DumpRenderTree/mac/MockWebNotificationProvider.mm:
      (-[MockWebNotificationProvider init]):
      * DumpRenderTree/mac/PixelDumpSupportMac.mm:
      (createBitmapContext):
      * DumpRenderTree/mac/TestRunnerMac.mm:
      (TestRunner::addDisallowedURL):
      (TestRunner::applicationCacheDiskUsageForOrigin):
      (TestRunner::localStorageDiskUsageForOrigin):
      (TestRunner::clearApplicationCacheForOrigin):
      (TestRunner::deleteLocalStorageForOrigin):
      (TestRunner::copyDecodedHostName):
      (TestRunner::copyEncodedHostName):
      (TestRunner::queueLoad):
      (TestRunner::setDomainRelaxationForbiddenForURLScheme):
      (TestRunner::setMockGeolocationPositionUnavailableError):
      (TestRunner::setUserStyleSheetLocation):
      (TestRunner::setValueForUser):
      (TestRunner::overridePreference):
      (TestRunner::setPersistentUserStyleSheetLocation):
      (TestRunner::execCommand):
      (TestRunner::findString):
      (TestRunner::isCommandEnabled):
      (TestRunner::addOriginAccessWhitelistEntry):
      (TestRunner::removeOriginAccessWhitelistEntry):
      (TestRunner::addUserScript):
      (TestRunner::addUserStyleSheet):
      (TestRunner::evaluateInWebInspector):
      (TestRunner::evaluateScriptInIsolatedWorld):
      (TestRunner::apiTestNewWindowDataLoadBaseURL):
      (-[SynchronousLoader connection:didReceiveAuthenticationChallenge:]):
      (TestRunner::authenticateSession):
      (TestRunner::grantWebNotificationPermission):
      (TestRunner::denyWebNotificationPermission):
      * DumpRenderTree/mac/WebArchiveDumpSupportMac.mm:
      (createCFURLResponseFromResponseData):
      * DumpRenderTree/mac/WorkQueueItemMac.mm:
      (LoadItem::invoke):
      (LoadHTMLStringItem::invoke):
      (ScriptItem::invoke):
      * DumpRenderTree/win/DumpRenderTree.cpp:
      (substringFromIndex):
      (urlSuitableForTestResult):
      (lastPathComponent):
      (sharedCFURLCache):
      * DumpRenderTree/win/ImageDiffCairo.cpp:
      (createImageFromStdin):
      (main):
      * DumpRenderTree/win/PixelDumpSupportWin.cpp:
      (createBitmapContextFromWebView):
      * DumpRenderTree/win/TestRunnerWin.cpp:
      (TestRunner::setUserStyleSheetLocation):
      (TestRunner::setPersistentUserStyleSheetLocation):
      * TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/TestWebKitAPI/mac/InstanceMethodSwizzler.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/WTF/cf/RetainPtrHashing.cpp:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/WebKit2/FindMatches.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/WebKit2/WebArchive.cpp:
      (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
      * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm:
      (TestWebKitAPI::createWindow):
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm:
      (TestWebKitAPI::AcceptsFirstMouse::runTest):
      * TestWebKitAPI/Tests/mac/AttributedString.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/BackForwardList.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/DOMRangeOfString.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:
      (TestWebKitAPI::DeviceScaleFactorOnBack::createWindow):
      * TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm:
      (TestWebKitAPI::DynamicDeviceScaleFactor::createWindow):
      * TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/InspectorBar.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
      (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
      * TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/SetDocumentURI.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
      (TestWebKitAPI::Util::MIMETypeForWKURLResponse):
      * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
      (TestWebKitAPI::WebKitAgnosticTest::runWebKit1Test):
      (TestWebKitAPI::WebKitAgnosticTest::runWebKit2Test):
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm:
      (WTR::testPathFromURL):
      * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
      (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
      * WebKitTestRunner/cg/TestInvocationCG.cpp:
      (WTR::createCGContextFromImage):
      (WTR::dumpBitmap):
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      * WebKitTestRunner/mac/EventSenderProxy.mm:
      (WTR::EventSenderProxy::mouseScrollBy):
      * WebKitTestRunner/mac/PlatformWebViewMac.mm:
      (WTR::PlatformWebView::windowSnapshotImage):
      * WebKitTestRunner/win/TestControllerWin.cpp:
      (WTR::TestController::initializeTestPluginDirectory):
      Use adoptCF and adoptNS.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f00480b5
  3. 19 Dec, 2011 1 commit
  4. 27 Oct, 2011 1 commit
    • aroben@apple.com's avatar
      Add WKBundlePageGetBackingScaleFactor · 4de7c334
      aroben@apple.com authored
      Fixes <http://webkit.org/b/71025> <rdar://problem/10355037> REGRESSION (r97191): Clients
      can't reliably determine the scale factor of snapshots returned via
      WKBundlePageCreateSnapshot* API
      
      Reviewed by Sam Weinig.
      
      Source/WebKit2:
      
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      (WKBundlePageGetBackingScaleFactor):
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      Added. Calls through to WebPage::deviceScaleFactor.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::deviceScaleFactor):
      * WebProcess/WebPage/WebPage.h:
      Added. Calls through to Page::deviceScaleFactor.
      
      Tools:
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added new files.
      
      * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm: Added.
      (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Record the passed-back scale factor.
      (TestWebKitAPI::setInjectedBundleClient): Hook up our didReceiveMessage callback.
      (TestWebKitAPI::createWindow): Conjure up a window.
      (TestWebKitAPI::TEST): Ask the injected bundle code to call the new
      WKBundlePageGetBackingScaleFactor API when the WKView is in windows with various scale
      factors and when using a custom scale factor, and check that we get those same scale factors
      back.
      
      * TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor_Bundle.mm: Added.
      (TestWebKitAPI::GetBackingScaleFactorTest::GetBackingScaleFactorTest): Just initialize our
      members.
      (TestWebKitAPI::GetBackingScaleFactorTest::didCreatePage): Store the page for later.
      (TestWebKitAPI::GetBackingScaleFactorTest::didReceiveMessage): Get the backing scale factor
      from the page using the new API and send it back.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4de7c334