Reduce PassRefPtr in WebKit2 - 3
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Jul 2015 00:16:50 +0000 (00:16 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Jul 2015 00:16:50 +0000 (00:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146995

Reviewed by Daniel Bates.

To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.

Source/WebCore:

* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::createPopupMenu):
(WebCore::EmptyChromeClient::createSearchPopupMenu):
(WebCore::EmptyFrameLoaderClient::createDocumentLoader):
(WebCore::EmptyFrameLoaderClient::createFrame):
(WebCore::EmptyFrameLoaderClient::createPlugin):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
* loader/FrameLoaderClient.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
(WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
* loader/ResourceLoadScheduler.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create):
* loader/SubresourceLoader.h:
* page/ChromeClient.h:
* platform/graphics/texmap/TextureMapperBackingStore.h:
* platform/graphics/texmap/TextureMapperLayer.h:
(WebCore::TextureMapperLayer::texture):
* platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
(WebCore::TextureMapperSurfaceBackingStore::texture):
* platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
* platform/graphics/texmap/TextureMapperTile.h:
(WebCore::TextureMapperTile::texture):
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::texture):
* platform/graphics/texmap/TextureMapperTiledBackingStore.h:
* storage/StorageNamespace.h:

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createDocumentLoader):

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createDocumentLoader):
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase):
* DatabaseProcess/DatabaseProcess.h:
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::takeInitializationReply):
* PluginProcess/PluginControllerProxy.h:
* Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStore::texture):
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
(WebKit::CoordinatedBackingStore::create):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::createWithSurface):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::webCryptoMasterKey):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::webCryptoMasterKey):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/Authentication/WebCredential.h:
* UIProcess/Authentication/WebProtectionSpace.h:
* UIProcess/AutoCorrectionCallback.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createPopupMenuProxy):
(WebKit::WebView::createContextMenuProxy):
(WebKit::WebView::createColorPicker):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::createPopupMenuProxy):
(WebKit::WebViewEfl::createContextMenuProxy):
(WebKit::WebViewEfl::createColorPicker):
* UIProcess/efl/WebViewEfl.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
(WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::fromNPP):
(WebKit::NetscapePlugin::snapshot):
(WebKit::NetscapePlugin::liveResourceData):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::snapshot):
(WebKit::PluginProxy::liveResourceData):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::copy):
* WebProcess/Storage/StorageNamespaceImpl.h:
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toHistoryItem):
* WebProcess/WebCoreSupport/SessionStateConversion.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createPopupMenu):
(WebKit::WebChromeClient::createSearchPopupMenu):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createDocumentLoader):
(WebKit::WebFrameLoaderClient::createFrame):
(WebKit::WebFrameLoaderClient::createPlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::create):
(WebKit::WebPage::createDocumentLoader):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::lookupTextAtLocation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

86 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/ResourceLoadScheduler.cpp
Source/WebCore/loader/ResourceLoadScheduler.h
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/SubresourceLoader.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h
Source/WebCore/platform/graphics/texmap/TextureMapperTile.h
Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.h
Source/WebCore/storage/StorageNamespace.h
Source/WebKit/Storage/StorageNamespaceImpl.cpp
Source/WebKit/Storage/StorageNamespaceImpl.h
Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h
Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebView/WebDocumentLoaderMac.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/DatabaseProcess.h
Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
Source/WebKit2/PluginProcess/PluginControllerProxy.h
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedBackingStore.h
Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp
Source/WebKit2/Shared/CoordinatedGraphics/WebCoordinatedSurface.h
Source/WebKit2/UIProcess/API/APILoaderClient.h
Source/WebKit2/UIProcess/API/APINavigationClient.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
Source/WebKit2/UIProcess/Authentication/WebCredential.h
Source/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
Source/WebKit2/UIProcess/AutoCorrectionCallback.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/efl/WebViewEfl.cpp
Source/WebKit2/UIProcess/efl/WebViewEfl.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/UIProcess/mac/PageClientImpl.h
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/Plugin.h
Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
Source/WebKit2/WebProcess/Plugins/PluginProxy.h
Source/WebKit2/WebProcess/Storage/StorageNamespaceImpl.cpp
Source/WebKit2/WebProcess/Storage/StorageNamespaceImpl.h
Source/WebKit2/WebProcess/WebCoreSupport/SessionStateConversion.cpp
Source/WebKit2/WebProcess/WebCoreSupport/SessionStateConversion.h
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

index 34dbf87..a0311ac 100644 (file)
@@ -1,3 +1,48 @@
+2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Reduce PassRefPtr in WebKit2 - 3
+        https://bugs.webkit.org/show_bug.cgi?id=146995
+
+        Reviewed by Daniel Bates.
+
+        To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
+        Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
+
+        * loader/EmptyClients.cpp:
+        (WebCore::EmptyChromeClient::createPopupMenu):
+        (WebCore::EmptyChromeClient::createSearchPopupMenu):
+        (WebCore::EmptyFrameLoaderClient::createDocumentLoader):
+        (WebCore::EmptyFrameLoaderClient::createFrame):
+        (WebCore::EmptyFrameLoaderClient::createPlugin):
+        * loader/EmptyClients.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::init):
+        (WebCore::FrameLoader::load):
+        (WebCore::FrameLoader::loadWithNavigationAction):
+        (WebCore::FrameLoader::reloadWithOverrideEncoding):
+        (WebCore::FrameLoader::reload):
+        * loader/FrameLoaderClient.h:
+        * loader/ResourceLoadScheduler.cpp:
+        (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
+        (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
+        * loader/ResourceLoadScheduler.h:
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::create):
+        * loader/SubresourceLoader.h:
+        * page/ChromeClient.h:
+        * platform/graphics/texmap/TextureMapperBackingStore.h:
+        * platform/graphics/texmap/TextureMapperLayer.h:
+        (WebCore::TextureMapperLayer::texture):
+        * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
+        (WebCore::TextureMapperSurfaceBackingStore::texture):
+        * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
+        * platform/graphics/texmap/TextureMapperTile.h:
+        (WebCore::TextureMapperTile::texture):
+        * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
+        (WebCore::TextureMapperTiledBackingStore::texture):
+        * platform/graphics/texmap/TextureMapperTiledBackingStore.h:
+        * storage/StorageNamespace.h:
+
 2015-07-18  David Kilzer  <ddkilzer@apple.com>
 
         REGRESSION (r186976): Use piFloat instead of M_PI
index 955a9cf..ea9255c 100644 (file)
@@ -67,8 +67,8 @@ class EmptyStorageNamespaceProvider final : public StorageNamespaceProvider {
     };
 
     struct EmptyStorageNamespace final : public StorageNamespace {
-        virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) override { return adoptRef(new EmptyStorageArea); }
-        virtual PassRefPtr<StorageNamespace> copy(Page*) override { return adoptRef(new EmptyStorageNamespace); }
+        virtual RefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) override { return adoptRef(new EmptyStorageArea); }
+        virtual RefPtr<StorageNamespace> copy(Page*) override { return adoptRef(new EmptyStorageNamespace); }
     };
 
     virtual RefPtr<StorageNamespace> createSessionStorageNamespace(Page&, unsigned) override
@@ -146,12 +146,12 @@ private:
     RefPtr<EmptyPopupMenu> m_popup;
 };
 
-PassRefPtr<PopupMenu> EmptyChromeClient::createPopupMenu(PopupMenuClient*) const
+RefPtr<PopupMenu> EmptyChromeClient::createPopupMenu(PopupMenuClient*) const
 {
     return adoptRef(new EmptyPopupMenu());
 }
 
-PassRefPtr<SearchPopupMenu> EmptyChromeClient::createSearchPopupMenu(PopupMenuClient*) const
+RefPtr<SearchPopupMenu> EmptyChromeClient::createSearchPopupMenu(PopupMenuClient*) const
 {
     return adoptRef(new EmptySearchPopupMenu());
 }
@@ -183,19 +183,19 @@ void EmptyFrameLoaderClient::dispatchWillSubmitForm(PassRefPtr<FormState>, Frame
 {
 }
 
-PassRefPtr<DocumentLoader> EmptyFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
+Ref<DocumentLoader> EmptyFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
 {
     return DocumentLoader::create(request, substituteData);
 }
 
-PassRefPtr<Frame> EmptyFrameLoaderClient::createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int)
+RefPtr<Frame> EmptyFrameLoaderClient::createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int)
 {
-    return 0;
+    return nullptr;
 }
 
-PassRefPtr<Widget> EmptyFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool)
+RefPtr<Widget> EmptyFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool)
 {
-    return 0;
+    return nullptr;
 }
 
 void EmptyFrameLoaderClient::recreatePlugin(Widget*)
index 5381203..8c57d6e 100644 (file)
@@ -118,8 +118,8 @@ public:
     virtual bool selectItemWritingDirectionIsNatural() override { return false; }
     virtual bool selectItemAlignmentFollowsMenuWritingDirection() override { return false; }
     virtual bool hasOpenedPopup() const override { return false; }
-    virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const override;
-    virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const override;
+    virtual RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const override;
+    virtual RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const override;
 
     virtual void setStatusbarText(const String&) override { }
 
@@ -343,7 +343,7 @@ public:
     virtual void didFinishLoad() override { }
     virtual void prepareForDataSourceReplacement() override { }
 
-    virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) override;
+    virtual Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) override;
     virtual void updateCachedDocumentLoader(DocumentLoader&) override { }
     virtual void setTitle(const StringWithDirection&, const URL&) override { }
 
@@ -370,8 +370,8 @@ public:
     virtual void didDisplayInsecureContent() override { }
     virtual void didRunInsecureContent(SecurityOrigin*, const URL&) override { }
     virtual void didDetectXSS(const URL&, bool) override { }
-    virtual PassRefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) override;
-    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) override;
+    virtual RefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) override;
+    virtual RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) override;
     virtual void recreatePlugin(Widget*) override;
     virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&) override;
 
index 003d2e1..2daf404 100644 (file)
@@ -257,7 +257,7 @@ FrameLoader::~FrameLoader()
 void FrameLoader::init()
 {
     // This somewhat odd set of steps gives the frame an initial empty document.
-    setPolicyDocumentLoader(m_client.createDocumentLoader(ResourceRequest(URL(ParsedURLString, emptyString())), SubstituteData()).get());
+    setPolicyDocumentLoader(m_client.createDocumentLoader(ResourceRequest(URL(ParsedURLString, emptyString())), SubstituteData()).ptr());
     setProvisionalDocumentLoader(m_policyDocumentLoader.get());
     m_provisionalDocumentLoader->startLoadingMainResource();
 
@@ -1325,16 +1325,16 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest)
     if (!request.hasSubstituteData())
         request.setSubstituteData(defaultSubstituteDataForURL(request.resourceRequest().url()));
 
-    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(request.resourceRequest(), request.substituteData());
-    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(*loader, request.shouldOpenExternalURLsPolicy());
+    Ref<DocumentLoader> loader = m_client.createDocumentLoader(request.resourceRequest(), request.substituteData());
+    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(loader, request.shouldOpenExternalURLsPolicy());
 
-    load(loader.get());
+    load(loader.ptr());
 }
 
 void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const NavigationAction& action, LockHistory lockHistory, FrameLoadType type, PassRefPtr<FormState> formState, AllowNavigationToInvalidURL allowNavigationToInvalidURL)
 {
-    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
-    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(*loader, action.shouldOpenExternalURLsPolicy());
+    Ref<DocumentLoader> loader = m_client.createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
+    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(loader, action.shouldOpenExternalURLsPolicy());
 
     if (lockHistory == LockHistory::Yes && m_documentLoader)
         loader->setClientRedirectSourceForHistory(m_documentLoader->didCreateGlobalHistoryEntry() ? m_documentLoader->urlForHistory().string() : m_documentLoader->clientRedirectSourceForHistory());
@@ -1343,7 +1343,7 @@ void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const
     if (m_documentLoader)
         loader->setOverrideEncoding(m_documentLoader->overrideEncoding());
 
-    loadWithDocumentLoader(loader.get(), type, formState, allowNavigationToInvalidURL);
+    loadWithDocumentLoader(loader.ptr(), type, formState, allowNavigationToInvalidURL);
 }
 
 void FrameLoader::load(DocumentLoader* newDocumentLoader)
@@ -1554,14 +1554,14 @@ void FrameLoader::reloadWithOverrideEncoding(const String& encoding)
     // We should ask the user for confirmation in this case.
     request.setCachePolicy(ReturnCacheDataElseLoad);
 
-    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
-    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(*loader, m_documentLoader->shouldOpenExternalURLsPolicyToPropagate());
+    Ref<DocumentLoader> loader = m_client.createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
+    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(loader, m_documentLoader->shouldOpenExternalURLsPolicyToPropagate());
 
-    setPolicyDocumentLoader(loader.get());
+    setPolicyDocumentLoader(loader.ptr());
 
     loader->setOverrideEncoding(encoding);
 
-    loadWithDocumentLoader(loader.get(), FrameLoadType::Reload, 0, AllowNavigationToInvalidURL::Yes);
+    loadWithDocumentLoader(loader.ptr(), FrameLoadType::Reload, 0, AllowNavigationToInvalidURL::Yes);
 }
 
 void FrameLoader::reload(bool endToEndReload)
@@ -1582,8 +1582,8 @@ void FrameLoader::reload(bool endToEndReload)
 
     // Create a new document loader for the reload, this will become m_documentLoader eventually,
     // but first it has to be the "policy" document loader, and then the "provisional" document loader.
-    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(initialRequest, defaultSubstituteDataForURL(initialRequest.url()));
-    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(*loader, m_documentLoader->shouldOpenExternalURLsPolicyToPropagate());
+    Ref<DocumentLoader> loader = m_client.createDocumentLoader(initialRequest, defaultSubstituteDataForURL(initialRequest.url()));
+    applyShouldOpenExternalURLsPolicyToNewDocumentLoader(loader, m_documentLoader->shouldOpenExternalURLsPolicyToPropagate());
 
     ResourceRequest& request = loader->request();
 
@@ -1596,7 +1596,7 @@ void FrameLoader::reload(bool endToEndReload)
 
     loader->setOverrideEncoding(m_documentLoader->overrideEncoding());
     
-    loadWithDocumentLoader(loader.get(), endToEndReload ? FrameLoadType::ReloadFromOrigin : FrameLoadType::Reload, 0, AllowNavigationToInvalidURL::Yes);
+    loadWithDocumentLoader(loader.ptr(), endToEndReload ? FrameLoadType::ReloadFromOrigin : FrameLoadType::Reload, 0, AllowNavigationToInvalidURL::Yes);
 }
 
 void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItemPolicy)
index c13a196..c9dff22 100644 (file)
@@ -250,7 +250,7 @@ namespace WebCore {
         virtual void didFinishLoad() = 0;
         virtual void prepareForDataSourceReplacement() = 0;
 
-        virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) = 0;
+        virtual Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) = 0;
         virtual void updateCachedDocumentLoader(DocumentLoader&) = 0;
         virtual void setTitle(const StringWithDirection&, const URL&) = 0;
 
@@ -271,8 +271,8 @@ namespace WebCore {
         virtual bool canCachePage() const = 0;
         virtual void convertMainResourceLoadToDownload(DocumentLoader*, const ResourceRequest&, const ResourceResponse&) = 0;
 
-        virtual PassRefPtr<Frame> createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
-        virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
+        virtual RefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
+        virtual RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
         virtual void recreatePlugin(Widget*) = 0;
         virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
 
index 9071310..1ae3fbc 100644 (file)
@@ -112,7 +112,7 @@ ResourceLoadScheduler::~ResourceLoadScheduler()
 {
 }
 
-PassRefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
+RefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
 {
     RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, resource, request, options);
     if (loader)
@@ -126,12 +126,12 @@ PassRefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Fra
     if (!loader || loader->reachedTerminalState())
         return nullptr;
 #endif
-    return loader.release();
+    return loader;
 }
 
-PassRefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStreamLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceRequest& request)
+RefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStreamLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceRequest& request)
 {
-    PassRefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::create(frame, client, request);
+    RefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::create(frame, client, request);
     if (loader)
         scheduleLoad(loader.get());
     return loader;
index 9fb9fb4..b05da04 100644 (file)
@@ -51,8 +51,8 @@ class ResourceLoadScheduler {
 public:
     WEBCORE_EXPORT friend ResourceLoadScheduler* resourceLoadScheduler();
 
-    WEBCORE_EXPORT virtual PassRefPtr<SubresourceLoader> scheduleSubresourceLoad(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&);
-    WEBCORE_EXPORT virtual PassRefPtr<NetscapePlugInStreamLoader> schedulePluginStreamLoad(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&);
+    WEBCORE_EXPORT virtual RefPtr<SubresourceLoader> scheduleSubresourceLoad(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&);
+    WEBCORE_EXPORT virtual RefPtr<NetscapePlugInStreamLoader> schedulePluginStreamLoad(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&);
     WEBCORE_EXPORT virtual void remove(ResourceLoader*);
     virtual void setDefersLoading(ResourceLoader*, bool);
     virtual void crossOriginRedirectReceived(ResourceLoader*, const URL& redirectURL);
index 0808316..03f0588 100644 (file)
@@ -94,7 +94,7 @@ SubresourceLoader::~SubresourceLoader()
 #endif
 }
 
-PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
+RefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
 {
     RefPtr<SubresourceLoader> subloader(adoptRef(new SubresourceLoader(frame, resource, options)));
 #if PLATFORM(IOS)
@@ -108,7 +108,7 @@ PassRefPtr<SubresourceLoader> SubresourceLoader::create(Frame* frame, CachedReso
 #endif
     if (!subloader->init(request))
         return nullptr;
-    return subloader.release();
+    return subloader;
 }
     
 #if PLATFORM(IOS)
index df0432a..a08901b 100644 (file)
@@ -43,7 +43,7 @@ class ResourceRequest;
 
 class SubresourceLoader final : public ResourceLoader {
 public:
-    WEBCORE_EXPORT static PassRefPtr<SubresourceLoader> create(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&);
+    WEBCORE_EXPORT static RefPtr<SubresourceLoader> create(Frame*, CachedResource*, const ResourceRequest&, const ResourceLoaderOptions&);
 
     virtual ~SubresourceLoader();
 
index 44e2326..d2bfc65 100644 (file)
@@ -548,13 +548,13 @@ bool Chrome::hasOpenedPopup() const
     return m_client.hasOpenedPopup();
 }
 
-PassRefPtr<PopupMenu> Chrome::createPopupMenu(PopupMenuClient* client) const
+RefPtr<PopupMenu> Chrome::createPopupMenu(PopupMenuClient* client) const
 {
     notifyPopupOpeningObservers();
     return m_client.createPopupMenu(client);
 }
 
-PassRefPtr<SearchPopupMenu> Chrome::createSearchPopupMenu(PopupMenuClient* client) const
+RefPtr<SearchPopupMenu> Chrome::createSearchPopupMenu(PopupMenuClient* client) const
 {
     notifyPopupOpeningObservers();
     return m_client.createSearchPopupMenu(client);
index 2225184..c0bd858 100644 (file)
@@ -173,8 +173,8 @@ public:
     bool selectItemWritingDirectionIsNatural();
     bool selectItemAlignmentFollowsMenuWritingDirection();
     bool hasOpenedPopup() const;
-    PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
-    PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
+    RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
+    RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
 
 #if PLATFORM(IOS)
     // FIXME: Can we come up with a better name for this setter?
index 4786ec8..4f8143d 100644 (file)
@@ -375,8 +375,8 @@ public:
     virtual bool selectItemAlignmentFollowsMenuWritingDirection() = 0;
     // Checks if there is an opened popup, called by RenderMenuList::showPopup().
     virtual bool hasOpenedPopup() const = 0;
-    virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const = 0;
-    virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const = 0;
+    virtual RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const = 0;
+    virtual RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const = 0;
 
     virtual void postAccessibilityNotification(AccessibilityObject*, AXObjectCache::AXNotification) { }
 
index 7927a49..076d01b 100644 (file)
@@ -38,7 +38,7 @@ class GraphicsLayer;
 
 class TextureMapperBackingStore : public TextureMapperPlatformLayer, public RefCounted<TextureMapperBackingStore> {
 public:
-    virtual PassRefPtr<BitmapTexture> texture() const = 0;
+    virtual RefPtr<BitmapTexture> texture() const = 0;
     virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix&, float) = 0;
     virtual void drawRepaintCounter(TextureMapper*, int /* repaintCount */, const Color&, const FloatRect&, const TransformationMatrix&) { }
     virtual ~TextureMapperBackingStore() { }
index 2e76d7c..0c9da71 100644 (file)
@@ -142,7 +142,7 @@ private:
 
     static void sortByZOrder(Vector<TextureMapperLayer* >& array);
 
-    PassRefPtr<BitmapTexture> texture() { return m_backingStore ? m_backingStore->texture() : 0; }
+    RefPtr<BitmapTexture> texture() { return m_backingStore ? m_backingStore->texture() : 0; }
     FloatPoint adjustedPosition() const { return m_state.pos + m_scrollPositionDelta - m_userScrollOffset; }
     bool isAncestorFixedToViewport() const;
     TransformationMatrix replicaTransform();
index b33bbb6..e97fcd8 100644 (file)
@@ -37,7 +37,7 @@ void TextureMapperSurfaceBackingStore::swapBuffersIfNeeded(uint32_t)
         m_graphicsSurface->swapBuffers();
 }
 
-PassRefPtr<BitmapTexture> TextureMapperSurfaceBackingStore::texture() const
+RefPtr<BitmapTexture> TextureMapperSurfaceBackingStore::texture() const
 {
     // FIXME: Instead of just returning an empty texture, we should wrap the texture contents into a BitmapTexture.
     RefPtr<BitmapTexture> emptyTexture;
index 31d1819..224b806 100644 (file)
@@ -36,7 +36,7 @@ public:
     static PassRefPtr<TextureMapperSurfaceBackingStore> create() { return adoptRef(new TextureMapperSurfaceBackingStore); }
     void setGraphicsSurface(PassRefPtr<GraphicsSurface>);
     void swapBuffersIfNeeded(uint32_t frontBuffer);
-    virtual PassRefPtr<BitmapTexture> texture() const;
+    virtual RefPtr<BitmapTexture> texture() const;
     virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix&, float);
     virtual ~TextureMapperSurfaceBackingStore() { }
 
index 648e71f..7e2212e 100644 (file)
@@ -34,7 +34,7 @@ class GraphicsLayer;
 
 class TextureMapperTile {
 public:
-    inline PassRefPtr<BitmapTexture> texture() const { return m_texture; }
+    inline RefPtr<BitmapTexture> texture() const { return m_texture; }
     inline FloatRect rect() const { return m_rect; }
     inline void setTexture(BitmapTexture* texture) { m_texture = texture; }
     inline void setRect(const FloatRect& rect) { m_rect = rect; }
index d35710a..3625c14 100644 (file)
@@ -150,7 +150,7 @@ void TextureMapperTiledBackingStore::updateContents(TextureMapper* textureMapper
         tile.updateContents(textureMapper, sourceLayer, dirtyRect, updateContentsFlag);
 }
 
-PassRefPtr<BitmapTexture> TextureMapperTiledBackingStore::texture() const
+RefPtr<BitmapTexture> TextureMapperTiledBackingStore::texture() const
 {
     for (const auto& tile : m_tiles) {
         if (auto texture = tile.texture())
index 2f792dc..4f3cce8 100644 (file)
@@ -37,7 +37,7 @@ public:
     static PassRefPtr<TextureMapperTiledBackingStore> create() { return adoptRef(new TextureMapperTiledBackingStore); }
     virtual ~TextureMapperTiledBackingStore() { }
 
-    virtual PassRefPtr<BitmapTexture> texture() const override;
+    virtual RefPtr<BitmapTexture> texture() const override;
     virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix&, float) override;
     virtual void drawBorder(TextureMapper*, const Color&, float borderWidth, const FloatRect&, const TransformationMatrix&) override;
     virtual void drawRepaintCounter(TextureMapper*, int repaintCount, const Color&, const FloatRect&, const TransformationMatrix&) override;
index 09ca3de..bde95f5 100644 (file)
@@ -40,8 +40,8 @@ class StorageArea;
 class StorageNamespace : public RefCounted<StorageNamespace> {
 public:
     virtual ~StorageNamespace() { }
-    virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
-    virtual PassRefPtr<StorageNamespace> copy(Page* newPage) = 0;
+    virtual RefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
+    virtual RefPtr<StorageNamespace> copy(Page* newPage) = 0;
 };
 
 } // namespace WebCore
index 04da4d1..6aa0f33 100644 (file)
@@ -85,7 +85,7 @@ StorageNamespaceImpl::~StorageNamespaceImpl()
         close();
 }
 
-PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy(Page*)
+RefPtr<StorageNamespace> StorageNamespaceImpl::copy(Page*)
 {
     ASSERT(isMainThread());
     ASSERT(!m_isShutdown);
@@ -96,10 +96,10 @@ PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy(Page*)
     StorageAreaMap::iterator end = m_storageAreaMap.end();
     for (StorageAreaMap::iterator i = m_storageAreaMap.begin(); i != end; ++i)
         newNamespace->m_storageAreaMap.set(i->key, i->value->copy());
-    return newNamespace.release();
+    return newNamespace;
 }
 
-PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOrigin> prpOrigin)
+RefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOrigin> prpOrigin)
 {
     ASSERT(isMainThread());
     ASSERT(!m_isShutdown);
@@ -107,11 +107,11 @@ PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOri
     RefPtr<SecurityOrigin> origin = prpOrigin;
     RefPtr<StorageAreaImpl> storageArea;
     if ((storageArea = m_storageAreaMap.get(origin)))
-        return storageArea.release();
+        return storageArea;
 
     storageArea = StorageAreaImpl::create(m_storageType, origin, m_syncManager, m_quota);
     m_storageAreaMap.set(origin.release(), storageArea);
-    return storageArea.release();
+    return storageArea;
 }
 
 void StorageNamespaceImpl::close()
index 5259971..70c6b57 100644 (file)
@@ -57,8 +57,8 @@ public:
 private:
     StorageNamespaceImpl(StorageType, const String& path, unsigned quota);
 
-    virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>)  override;
-    virtual PassRefPtr<StorageNamespace> copy(Page* newPage) override;
+    virtual RefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>)  override;
+    virtual RefPtr<StorageNamespace> copy(Page* newPage) override;
 
     typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageAreaImpl>> StorageAreaMap;
     StorageAreaMap m_storageAreaMap;
index 1b5935d..bd94ce7 100644 (file)
@@ -79,8 +79,8 @@ public:
 
     virtual bool selectItemWritingDirectionIsNatural() override;
     virtual bool selectItemAlignmentFollowsMenuWritingDirection() override;
-    virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const override;
-    virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
+    virtual RefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const override;
+    virtual RefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
 
     virtual void webAppOrientationsUpdated() override;
     virtual void focusedElementChanged(WebCore::Element*) override;
index 46f87d8..b9cf139 100644 (file)
@@ -249,12 +249,12 @@ bool WebChromeClientIOS::selectItemAlignmentFollowsMenuWritingDirection()
     return true;
 }
 
-PassRefPtr<WebCore::PopupMenu> WebChromeClientIOS::createPopupMenu(WebCore::PopupMenuClient* client) const
+RefPtr<WebCore::PopupMenu> WebChromeClientIOS::createPopupMenu(WebCore::PopupMenuClient* client) const
 {
     return adoptRef(new PopupMenuIOS(client));
 }
 
-PassRefPtr<WebCore::SearchPopupMenu> WebChromeClientIOS::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
+RefPtr<WebCore::SearchPopupMenu> WebChromeClientIOS::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
 {
     return adoptRef(new SearchPopupMenuIOS(client));
 }
index a48e514..1fb1725 100644 (file)
@@ -1,3 +1,17 @@
+2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Reduce PassRefPtr in WebKit2 - 3
+        https://bugs.webkit.org/show_bug.cgi?id=146995
+
+        Reviewed by Daniel Bates.
+
+        To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
+        Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::createDocumentLoader):
+
 2015-07-17  Andy Estes  <aestes@apple.com>
 
         [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
index 5e3b2dc..d755fc7 100644 (file)
@@ -189,8 +189,8 @@ public:
     virtual bool selectItemWritingDirectionIsNatural() override;
     virtual bool selectItemAlignmentFollowsMenuWritingDirection() override;
     virtual bool hasOpenedPopup() const override;
-    virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const override;
-    virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
+    virtual RefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const override;
+    virtual RefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
 
     virtual void wheelEventHandlersChanged(bool) override { }
 
index 20f6d72..1b9cf9c 100644 (file)
@@ -842,7 +842,7 @@ bool WebChromeClient::hasOpenedPopup() const
     return false;
 }
 
-PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const
+RefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const
 {
 #if !PLATFORM(IOS)
     return adoptRef(new PopupMenuMac(client));
@@ -851,7 +851,7 @@ PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMe
 #endif
 }
 
-PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
+RefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
 {
 #if !PLATFORM(IOS)
     return adoptRef(new SearchPopupMenuMac(client));
index 7cf158f..cd1f24b 100644 (file)
@@ -192,14 +192,14 @@ private:
     virtual void provisionalLoadStarted() override;
     virtual void didFinishLoad() override;
     virtual void prepareForDataSourceReplacement() override;
-    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&) override;
+    virtual Ref<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&) override;
     virtual void updateCachedDocumentLoader(WebCore::DocumentLoader&) override { }
 
     virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&) override;
 
-    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement*,
+    virtual RefPtr<WebCore::Frame> createFrame(const WebCore::URL&, const WTF::String& name, WebCore::HTMLFrameOwnerElement*,
         const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) override;
-    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<WTF::String>&,
+    virtual RefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<WTF::String>&,
         const Vector<WTF::String>&, const WTF::String&, bool) override;
     virtual void recreatePlugin(WebCore::Widget*) override;
     virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) override;
index 41d019c..113fa80 100644 (file)
@@ -1322,15 +1322,15 @@ void WebFrameLoaderClient::prepareForDataSourceReplacement()
 #endif
 }
 
-PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
+Ref<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
 {
-    RefPtr<WebDocumentLoaderMac> loader = WebDocumentLoaderMac::create(request, substituteData);
+    Ref<WebDocumentLoaderMac> loader = WebDocumentLoaderMac::create(request, substituteData);
 
-    WebDataSource *dataSource = [[WebDataSource alloc] _initWithDocumentLoader:loader.get()];
+    WebDataSource *dataSource = [[WebDataSource alloc] _initWithDocumentLoader:loader.ptr()];
     loader->setDataSource(dataSource, getWebView(m_webFrame.get()));
     [dataSource release];
 
-    return loader.release();
+    return WTF::move(loader);
 }
 
 void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
@@ -1608,7 +1608,7 @@ bool WebFrameLoaderClient::canCachePage() const
     return true;
 }
 
-PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
+RefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
     const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -1627,19 +1627,19 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String
 
     // The creation of the frame may have run arbitrary JavaScript that removed it from the page already.
     if (!result->page())
-        return 0;
+        return nullptr;
  
     core(m_webFrame.get())->loader().loadURLIntoChildFrame(url, referrer, result.get());
 
     // The frame's onload handler may have removed it from the document.
     if (!result->tree().parent())
-        return 0;
+        return nullptr;
 
-    return result.release();
+    return result;
 
     END_BLOCK_OBJC_EXCEPTIONS;
 
-    return 0;
+    return nullptr;
 }
 
 ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
@@ -1907,7 +1907,7 @@ private:
 
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
-PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const URL& url,
+RefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const URL& url,
     const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -2047,7 +2047,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
 
     END_BLOCK_OBJC_EXCEPTIONS;
 
-    return 0;
+    return nullptr;
 }
 
 void WebFrameLoaderClient::recreatePlugin(Widget*)
index b2cc375..e80314b 100644 (file)
@@ -39,9 +39,9 @@ namespace WebCore {
 
 class WebDocumentLoaderMac : public WebCore::DocumentLoader {
 public:
-    static PassRefPtr<WebDocumentLoaderMac> create(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& data)
+    static Ref<WebDocumentLoaderMac> create(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& data)
     {
-        return adoptRef(new WebDocumentLoaderMac(request, data));
+        return adoptRef(*new WebDocumentLoaderMac(request, data));
     }
 
     void setDataSource(WebDataSource *, WebView*);
index 4e34abb..245e20c 100644 (file)
@@ -1,3 +1,17 @@
+2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Reduce PassRefPtr in WebKit2 - 3
+        https://bugs.webkit.org/show_bug.cgi?id=146995
+
+        Reviewed by Daniel Bates.
+
+        To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
+        Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::createDocumentLoader):
+        * WebCoreSupport/WebFrameLoaderClient.h:
+
 2015-07-16  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Gross workaround to fix build after r186858.
index 46f8e5d..18906df 100644 (file)
@@ -780,12 +780,12 @@ bool WebChromeClient::hasOpenedPopup() const
     return false;
 }
 
-PassRefPtr<PopupMenu> WebChromeClient::createPopupMenu(PopupMenuClient* client) const
+RefPtr<PopupMenu> WebChromeClient::createPopupMenu(PopupMenuClient* client) const
 {
     return adoptRef(new PopupMenuWin(client));
 }
 
-PassRefPtr<SearchPopupMenu> WebChromeClient::createSearchPopupMenu(PopupMenuClient* client) const
+RefPtr<SearchPopupMenu> WebChromeClient::createSearchPopupMenu(PopupMenuClient* client) const
 {
     return adoptRef(new SearchPopupMenuWin(client));
 }
index 251f862..f63acef 100644 (file)
@@ -151,8 +151,8 @@ public:
     virtual bool selectItemWritingDirectionIsNatural();
     virtual bool selectItemAlignmentFollowsMenuWritingDirection();
     virtual bool hasOpenedPopup() const;
-    virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
-    virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
+    virtual RefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
+    virtual RefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
 
 #if ENABLE(FULLSCREEN_API)
     virtual bool supportsFullScreenForElement(const WebCore::Element*, bool withKeyboard);
index 0cbd193..27325ba 100644 (file)
@@ -949,14 +949,14 @@ void WebFrameLoaderClient::prepareForDataSourceReplacement()
     notImplemented();
 }
 
-PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
+Ref<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
 {
-    RefPtr<WebDocumentLoader> loader = WebDocumentLoader::create(request, substituteData);
+    Ref<WebDocumentLoader> loader = WebDocumentLoader::create(request, substituteData);
 
     COMPtr<WebDataSource> dataSource(AdoptCOM, WebDataSource::createInstance(loader.get()));
 
     loader->setDataSource(dataSource.get());
-    return loader.release();
+    return WTF::move(loader);
 }
 
 void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
index 87b6d51..c38ff2f 100644 (file)
@@ -151,7 +151,7 @@ public:
 
     virtual WTF::String userAgent(const WebCore::URL&) override;
 
-    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
+    virtual Ref<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
     virtual void updateCachedDocumentLoader(WebCore::DocumentLoader&) override { }
 
     virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&);
@@ -180,9 +180,9 @@ public:
 
     virtual bool canCachePage() const;
 
-    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
+    virtual RefPtr<WebCore::Frame> createFrame(const WebCore::URL&, const WTF::String& name, WebCore::HTMLFrameOwnerElement*,
         const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) override;
-    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually) override;
+    virtual RefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually) override;
     virtual void recreatePlugin(WebCore::Widget*) override { }
     virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) override;
 
index 4f4bec4..483edbd 100644 (file)
@@ -1,3 +1,107 @@
+2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Reduce PassRefPtr in WebKit2 - 3
+        https://bugs.webkit.org/show_bug.cgi?id=146995
+
+        Reviewed by Daniel Bates.
+
+        To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
+        Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
+
+        * DatabaseProcess/DatabaseProcess.cpp:
+        (WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase):
+        * DatabaseProcess/DatabaseProcess.h:
+        * PluginProcess/PluginControllerProxy.cpp:
+        (WebKit::PluginControllerProxy::takeInitializationReply):
+        * PluginProcess/PluginControllerProxy.h:
+        * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
+        (WebKit::CoordinatedBackingStore::texture):
+        * Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
+        (WebKit::CoordinatedBackingStore::create):
+        * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
+        (WebKit::WebCoordinatedSurface::create):
+        (WebKit::WebCoordinatedSurface::createWithSurface):
+        * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
+        * UIProcess/API/APILoaderClient.h:
+        (API::LoaderClient::webCryptoMasterKey):
+        * UIProcess/API/APINavigationClient.h:
+        (API::NavigationClient::webCryptoMasterKey):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageLoaderClient):
+        (WKPageSetPageNavigationClient):
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::createPopupMenuProxy):
+        (WebKit::PageClientImpl::createContextMenuProxy):
+        (WebKit::PageClientImpl::createColorPicker):
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/Authentication/WebCredential.h:
+        * UIProcess/Authentication/WebProtectionSpace.h:
+        * UIProcess/AutoCorrectionCallback.h:
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
+        * UIProcess/CoordinatedGraphics/WebView.cpp:
+        (WebKit::WebView::createPopupMenuProxy):
+        (WebKit::WebView::createContextMenuProxy):
+        (WebKit::WebView::createColorPicker):
+        * UIProcess/CoordinatedGraphics/WebView.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/efl/WebViewEfl.cpp:
+        (WebKit::WebViewEfl::createPopupMenuProxy):
+        (WebKit::WebViewEfl::createContextMenuProxy):
+        (WebKit::WebViewEfl::createColorPicker):
+        * UIProcess/efl/WebViewEfl.h:
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::createPopupMenuProxy):
+        (WebKit::PageClientImpl::createContextMenuProxy):
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::dataSelectionForPasteboard):
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::createPopupMenuProxy):
+        (WebKit::PageClientImpl::createContextMenuProxy):
+        (WebKit::PageClientImpl::createColorPicker):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::dataSelectionForPasteboard):
+        * WebProcess/Network/WebResourceLoadScheduler.cpp:
+        (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
+        (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
+        * WebProcess/Network/WebResourceLoadScheduler.h:
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::fromNPP):
+        (WebKit::NetscapePlugin::snapshot):
+        (WebKit::NetscapePlugin::liveResourceData):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+        * WebProcess/Plugins/Plugin.h:
+        * WebProcess/Plugins/PluginProxy.cpp:
+        (WebKit::PluginProxy::snapshot):
+        (WebKit::PluginProxy::liveResourceData):
+        * WebProcess/Plugins/PluginProxy.h:
+        * WebProcess/Storage/StorageNamespaceImpl.cpp:
+        (WebKit::StorageNamespaceImpl::storageArea):
+        (WebKit::StorageNamespaceImpl::copy):
+        * WebProcess/Storage/StorageNamespaceImpl.h:
+        * WebProcess/WebCoreSupport/SessionStateConversion.cpp:
+        (WebKit::toHistoryItem):
+        * WebProcess/WebCoreSupport/SessionStateConversion.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::createPopupMenu):
+        (WebKit::WebChromeClient::createSearchPopupMenu):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::createDocumentLoader):
+        (WebKit::WebFrameLoaderClient::createFrame):
+        (WebKit::WebFrameLoaderClient::createPlugin):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::create):
+        (WebKit::WebPage::createDocumentLoader):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::lookupTextAtLocation):
+
 2015-07-18  Simon Fraser  <simon.fraser@apple.com>
 
         Scroll position jumps when scrolling scaling pages down in split view
index 4c3103d..61653ca 100644 (file)
@@ -95,7 +95,7 @@ void DatabaseProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringRefe
     RunLoop::current().stop();
 }
 
-PassRefPtr<UniqueIDBDatabase> DatabaseProcess::getOrCreateUniqueIDBDatabase(const UniqueIDBDatabaseIdentifier& identifier)
+RefPtr<UniqueIDBDatabase> DatabaseProcess::getOrCreateUniqueIDBDatabase(const UniqueIDBDatabaseIdentifier& identifier)
 {
     auto addResult = m_idbDatabases.add(identifier, nullptr);
 
@@ -104,7 +104,7 @@ PassRefPtr<UniqueIDBDatabase> DatabaseProcess::getOrCreateUniqueIDBDatabase(cons
 
     RefPtr<UniqueIDBDatabase> database = UniqueIDBDatabase::create(identifier);
     addResult.iterator->value = database.get();
-    return database.release();
+    return database;
 }
 
 void DatabaseProcess::removeUniqueIDBDatabase(const UniqueIDBDatabase& database)
index 59a618b..47c6925 100644 (file)
@@ -53,7 +53,7 @@ public:
 
     const String& indexedDatabaseDirectory() const { return m_indexedDatabaseDirectory; }
 
-    PassRefPtr<UniqueIDBDatabase> getOrCreateUniqueIDBDatabase(const UniqueIDBDatabaseIdentifier&);
+    RefPtr<UniqueIDBDatabase> getOrCreateUniqueIDBDatabase(const UniqueIDBDatabaseIdentifier&);
     void removeUniqueIDBDatabase(const UniqueIDBDatabase&);
 
     void ensureIndexedDatabaseRelativePathExists(const String&);
index 4a9f467..a56d925 100644 (file)
@@ -97,9 +97,9 @@ void PluginControllerProxy::setInitializationReply(PassRefPtr<Messages::WebProce
     m_initializationReply = reply;
 }
 
-PassRefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply> PluginControllerProxy::takeInitializationReply()
+RefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply> PluginControllerProxy::takeInitializationReply()
 {
-    return m_initializationReply.release();
+    return m_initializationReply;
 }
 
 bool PluginControllerProxy::initialize(const PluginCreationParameters& creationParameters)
index 9eed2e7..2e333f4 100644 (file)
@@ -76,7 +76,7 @@ public:
     bool isInitializing() const { return m_isInitializing; }
     
     void setInitializationReply(PassRefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply>);
-    PassRefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply> takeInitializationReply();
+    RefPtr<Messages::WebProcessConnection::CreatePlugin::DelayedReply> takeInitializationReply();
 
 private:
     void startPaintTimer();
index c66d28b..51db08c 100644 (file)
@@ -91,7 +91,7 @@ void CoordinatedBackingStore::updateTile(uint32_t id, const IntRect& sourceRect,
     it->value.setBackBuffer(tileRect, sourceRect, backBuffer, offset);
 }
 
-PassRefPtr<BitmapTexture> CoordinatedBackingStore::texture() const
+RefPtr<BitmapTexture> CoordinatedBackingStore::texture() const
 {
     for (auto& tile : m_tiles.values()) {
         RefPtr<BitmapTexture> texture = tile.texture();
@@ -99,7 +99,7 @@ PassRefPtr<BitmapTexture> CoordinatedBackingStore::texture() const
             return texture;
     }
 
-    return PassRefPtr<BitmapTexture>();
+    return RefPtr<BitmapTexture>();
 }
 
 void CoordinatedBackingStore::setSize(const FloatSize& size)
index d90349d..5dafa01 100644 (file)
@@ -61,9 +61,9 @@ public:
     void removeTile(uint32_t tileID);
     void removeAllTiles();
     void updateTile(uint32_t tileID, const WebCore::IntRect&, const WebCore::IntRect&, PassRefPtr<WebCore::CoordinatedSurface>, const WebCore::IntPoint&);
-    static PassRefPtr<CoordinatedBackingStore> create() { return adoptRef(new CoordinatedBackingStore); }
+    static Ref<CoordinatedBackingStore> create() { return adoptRef(*new CoordinatedBackingStore); }
     void commitTileOperations(WebCore::TextureMapper*);
-    PassRefPtr<WebCore::BitmapTexture> texture() const;
+    RefPtr<WebCore::BitmapTexture> texture() const;
     void setSize(const WebCore::FloatSize&);
     virtual void paintToTextureMapper(WebCore::TextureMapper*, const WebCore::FloatRect&, const WebCore::TransformationMatrix&, float);
     virtual void drawBorder(WebCore::TextureMapper*, const WebCore::Color&, float borderWidth, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override;
index 6b8d11d..0dd3064 100644 (file)
@@ -69,7 +69,7 @@ bool WebCoordinatedSurface::Handle::decode(IPC::ArgumentDecoder& decoder, Handle
     return true;
 }
 
-PassRefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags)
+RefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& size, CoordinatedSurface::Flags flags)
 {
     RefPtr<WebCoordinatedSurface> surface;
 #if USE(GRAPHICS_SURFACE)
@@ -79,11 +79,11 @@ PassRefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const IntSize& s
     if (!surface)
         surface = create(size, flags, ShareableBitmap::createShareable(size, (flags & SupportsAlpha) ? ShareableBitmap::SupportsAlpha : ShareableBitmap::NoFlags));
 
-    return surface.release();
+    return surface;
 }
 
 #if USE(GRAPHICS_SURFACE)
-PassRefPtr<WebCoordinatedSurface> WebCoordinatedSurface::createWithSurface(const IntSize& size, CoordinatedSurface::Flags flags)
+RefPtr<WebCoordinatedSurface> WebCoordinatedSurface::createWithSurface(const IntSize& size, CoordinatedSurface::Flags flags)
 {
     GraphicsSurface::Flags surfaceFlags =
         GraphicsSurface::SupportsSoftwareWrite
@@ -97,7 +97,7 @@ PassRefPtr<WebCoordinatedSurface> WebCoordinatedSurface::createWithSurface(const
     // In that case, this function would return null and allow falling back to ShareableBitmap.
     RefPtr<GraphicsSurface> surface = GraphicsSurface::create(size, surfaceFlags);
     if (!surface)
-        return 0;
+        return nullptr;
 
     ASSERT(surface);
     return adoptRef(new WebCoordinatedSurface(size, flags, surface.release()));
@@ -146,7 +146,7 @@ WebCoordinatedSurface::~WebCoordinatedSurface()
 {
 }
 
-PassRefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const Handle& handle)
+RefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const Handle& handle)
 {
 #if USE(GRAPHICS_SURFACE)
     if (handle.graphicsSurfaceToken().isValid()) {
@@ -161,7 +161,7 @@ PassRefPtr<WebCoordinatedSurface> WebCoordinatedSurface::create(const Handle& ha
 
     RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(handle.m_bitmapHandle);
     if (!bitmap)
-        return 0;
+        return nullptr;
 
     return create(handle.m_size, handle.m_flags, bitmap.release());
 }
index 7dc16f2..8a18f60 100644 (file)
@@ -61,10 +61,10 @@ public:
     };
 
     // Create a new WebCoordinatedSurface, and allocate either a GraphicsSurface or a ShareableBitmap as backing.
-    static PassRefPtr<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags);
+    static RefPtr<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags);
 
     // Create a shareable surface from a handle.
-    static PassRefPtr<WebCoordinatedSurface> create(const Handle&);
+    static RefPtr<WebCoordinatedSurface> create(const Handle&);
 
     // Create a handle.
     bool createHandle(Handle&);
@@ -87,7 +87,7 @@ private:
 #if USE(GRAPHICS_SURFACE)
     WebCoordinatedSurface(const WebCore::IntSize&, Flags, PassRefPtr<WebCore::GraphicsSurface>);
     // Create a shareable bitmap backed by a graphics surface.
-    static PassRefPtr<WebCoordinatedSurface> createWithSurface(const WebCore::IntSize&, Flags);
+    static RefPtr<WebCoordinatedSurface> createWithSurface(const WebCore::IntSize&, Flags);
     // Create a WebCoordinatedSurface referencing an existing GraphicsSurface.
     static Ref<WebCoordinatedSurface> create(const WebCore::IntSize&, Flags, PassRefPtr<WebCore::GraphicsSurface>);
 
index e45886a..6e95b0f 100644 (file)
@@ -95,7 +95,7 @@ public:
     virtual bool shouldKeepCurrentBackForwardListItemInList(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem*) { return true; }
     virtual void willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem*, API::Object*) { }
 
-    virtual PassRefPtr<Data> webCryptoMasterKey(WebKit::WebPageProxy&) { return nullptr; }
+    virtual RefPtr<Data> webCryptoMasterKey(WebKit::WebPageProxy&) { return nullptr; }
 
     virtual void didNavigateWithNavigationData(WebKit::WebPageProxy&, const WebKit::WebNavigationDataStore&, WebKit::WebFrameProxy&) { }
     virtual void didPerformClientRedirect(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
index d038bf1..41253c6 100644 (file)
@@ -84,7 +84,7 @@ public:
     // FIXME: This function should not be part of this client.
     virtual void processDidCrash(WebKit::WebPageProxy&) { }
 
-    virtual PassRefPtr<Data> webCryptoMasterKey(WebKit::WebPageProxy&) { return nullptr; }
+    virtual RefPtr<Data> webCryptoMasterKey(WebKit::WebPageProxy&) { return nullptr; }
 
 #if USE(QUICK_LOOK)
     virtual void didStartLoadForQuickLookDocumentInMainFrame(const WTF::String& fileName, const WTF::String& uti) { }
index 4a3e3a9..8b6b893 100644 (file)
@@ -1150,7 +1150,7 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
                 m_client.willGoToBackForwardListItem(toAPI(&page), toAPI(item), toAPI(userData), m_client.base.clientInfo);
         }
 
-        virtual PassRefPtr<API::Data> webCryptoMasterKey(WebPageProxy& page) override
+        virtual RefPtr<API::Data> webCryptoMasterKey(WebPageProxy& page) override
         {
             return page.process().processPool().client().copyWebCryptoMasterKey(&page.process().processPool());
         }
@@ -1931,7 +1931,7 @@ void WKPageSetPageNavigationClient(WKPageRef pageRef, const WKPageNavigationClie
             m_client.webProcessDidCrash(toAPI(&page), m_client.base.clientInfo);
         }
 
-        virtual PassRefPtr<API::Data> webCryptoMasterKey(WebPageProxy& page) override
+        virtual RefPtr<API::Data> webCryptoMasterKey(WebPageProxy& page) override
         {
             if (!m_client.copyWebCryptoMasterKey)
                 return nullptr;
index 60d8a0f..5c16bf8 100644 (file)
@@ -206,17 +206,17 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool
     gtk_main_do_event(event.nativeEvent());
 }
 
-PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
+RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
 {
     return WebPopupMenuProxyGtk::create(m_viewWidget, page);
 }
 
-PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy* page)
+RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy* page)
 {
     return WebContextMenuProxyGtk::create(m_viewWidget, page);
 }
 
-PassRefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect& rect)
+RefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect& rect)
 {
     if (WEBKIT_IS_WEB_VIEW(m_viewWidget))
         return WebKitColorChooser::create(*page, color, rect);
index bc5b635..1cbf348 100644 (file)
@@ -82,10 +82,10 @@ private:
     virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override;
     virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override;
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
-    virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
-    virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
 #if ENABLE(INPUT_TYPE_COLOR)
-    virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&) override;
+    virtual RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&) override;
 #endif
     virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorLifetime = WebCore::TextIndicatorLifetime::Permanent) override;
     virtual void clearTextIndicator(WebCore::TextIndicatorDismissalAnimation = WebCore::TextIndicatorDismissalAnimation::FadeOut) override;
index 49ce13d..eaaa1f7 100644 (file)
@@ -29,7 +29,6 @@
 #include "APIObject.h"
 #include "APIString.h"
 #include <WebCore/Credential.h>
-#include <wtf/PassRefPtr.h>
 
 namespace WebKit {
 
index 20564f7..28beba6 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "APIObject.h"
 #include <WebCore/ProtectionSpace.h>
-#include <wtf/PassRefPtr.h>
 
 namespace WebKit {
 
index 87860bd..752e4cc 100644 (file)
@@ -30,7 +30,6 @@
 #include "GenericCallback.h"
 #include "WKAPICast.h"
 #include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebKit {
index d5526a1..dbd8943 100644 (file)
@@ -97,7 +97,7 @@ private:
         virtual bool canAuthenticateAgainstProtectionSpace(WebPageProxy&, WebProtectionSpace*) override;
         virtual void didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy*) override;
         virtual void processDidCrash(WebPageProxy&) override;
-        virtual PassRefPtr<API::Data> webCryptoMasterKey(WebPageProxy&) override;
+        virtual RefPtr<API::Data> webCryptoMasterKey(WebPageProxy&) override;
 
 #if USE(QUICK_LOOK)
         virtual void didStartLoadForQuickLookDocumentInMainFrame(const WTF::String& fileName, const WTF::String& uti) override;
index 60adbd4..64d0735 100644 (file)
@@ -670,7 +670,7 @@ void NavigationState::NavigationClient::processDidCrash(WebKit::WebPageProxy& pa
     [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidCrash:m_navigationState.m_webView];
 }
 
-PassRefPtr<API::Data> NavigationState::NavigationClient::webCryptoMasterKey(WebKit::WebPageProxy&)
+RefPtr<API::Data> NavigationState::NavigationClient::webCryptoMasterKey(WebKit::WebPageProxy&)
 {
     if (!m_navigationState.m_navigationDelegateMethods.webCryptoMasterKeyForWebView)
         return nullptr;
index 599b633..b6ef639 100644 (file)
@@ -430,23 +430,23 @@ void WebView::doneWithTouchEvent(const NativeWebTouchEvent& event, bool wasEvent
 }
 #endif
 
-PassRefPtr<WebPopupMenuProxy> WebView::createPopupMenuProxy(WebPageProxy*)
+RefPtr<WebPopupMenuProxy> WebView::createPopupMenuProxy(WebPageProxy*)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 
-PassRefPtr<WebContextMenuProxy> WebView::createContextMenuProxy(WebPageProxy*)
+RefPtr<WebContextMenuProxy> WebView::createContextMenuProxy(WebPageProxy*)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 
 #if ENABLE(INPUT_TYPE_COLOR)
-PassRefPtr<WebColorPicker> WebView::createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
+RefPtr<WebColorPicker> WebView::createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 #endif
 
index 2fcd640..d453724 100644 (file)
@@ -175,10 +175,10 @@ protected:
     virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
 #endif
 
-    virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
-    virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
 #if ENABLE(INPUT_TYPE_COLOR)
-    virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) override;
+    virtual RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) override;
 #endif
 
     virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorLifetime = WebCore::TextIndicatorLifetime::Permanent) override;
index 0f8d240..5dc3e50 100644 (file)
@@ -210,11 +210,11 @@ public:
     virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) = 0;
 #endif
 
-    virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) = 0;
-    virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) = 0;
+    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) = 0;
+    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) = 0;
 
 #if ENABLE(INPUT_TYPE_COLOR)
-    virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) = 0;
+    virtual RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) = 0;
 #endif
 
     virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorLifetime = WebCore::TextIndicatorLifetime::Permanent) = 0;
index 9b609d0..bdce7cd 100644 (file)
@@ -730,7 +730,7 @@ public:
     void registerUIProcessAccessibilityTokens(const IPC::DataReference& elemenToken, const IPC::DataReference& windowToken);
     bool readSelectionFromPasteboard(const String& pasteboardName);
     String stringSelectionForPasteboard();
-    PassRefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
+    RefPtr<WebCore::SharedBuffer> dataSelectionForPasteboard(const String& pasteboardType);
     void makeFirstResponder();
 
     ColorSpaceData colorSpace();
index 3dcfddc..b557078 100644 (file)
@@ -88,13 +88,13 @@ void WebViewEfl::paintToCairoSurface(cairo_surface_t* surface)
     scene->paintToGraphicsContext(&context, m_page->pageExtendedBackgroundColor(), m_page->drawsBackground());
 }
 
-PassRefPtr<WebPopupMenuProxy> WebViewEfl::createPopupMenuProxy(WebPageProxy* page)
+RefPtr<WebPopupMenuProxy> WebViewEfl::createPopupMenuProxy(WebPageProxy* page)
 {
     return WebPopupMenuListenerEfl::create(page);
 }
 
 #if ENABLE(CONTEXT_MENUS)
-PassRefPtr<WebContextMenuProxy> WebViewEfl::createContextMenuProxy(WebPageProxy* page)
+RefPtr<WebContextMenuProxy> WebViewEfl::createContextMenuProxy(WebPageProxy* page)
 {
     return WebContextMenuProxyEfl::create(m_ewkView, page);
 }
@@ -212,7 +212,7 @@ void WebViewEfl::initializeColorPickerClient(const WKColorPickerClientBase* clie
     m_colorPickerClient.initialize(client);
 }
 
-PassRefPtr<WebColorPicker> WebViewEfl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect&)
+RefPtr<WebColorPicker> WebViewEfl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect&)
 {
     return WebColorPickerEfl::create(this, page, color);
 }
index ef99118..a0caf10 100644 (file)
@@ -57,7 +57,7 @@ public:
     void initializeColorPickerClient(const WKColorPickerClientBase*);
 
     WebColorPickerClient& colorPickerClient() { return m_colorPickerClient; }
-    virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&) override;
+    virtual RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&) override;
 #endif
 
     void setViewBackgroundColor(const WebCore::Color&);
@@ -66,12 +66,12 @@ private:
     WebViewEfl(WebProcessPool*, WebPageGroup*);
 
     void setCursor(const WebCore::Cursor&) override;
-    PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
+    RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
     void updateTextInputState() override;
     void handleDownloadRequest(DownloadProxy*) override;
 
 #if ENABLE(CONTEXT_MENUS)
-    PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
+    RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
 #endif
 
 #if ENABLE(FULLSCREEN_API)
index 4842127..cc40b56 100644 (file)
@@ -97,8 +97,8 @@ private:
 #if ENABLE(TOUCH_EVENTS)
     virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
 #endif
-    virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
-    virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
     virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorLifetime = WebCore::TextIndicatorLifetime::Permanent) override;
     virtual void clearTextIndicator(WebCore::TextIndicatorDismissalAnimation = WebCore::TextIndicatorDismissalAnimation::FadeOut) override;
     virtual void setTextIndicatorAnimationProgress(float) override;
index 0337f3f..a0816c4 100644 (file)
@@ -441,16 +441,16 @@ void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& nativeWebtouc
 }
 #endif
 
-PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy*)
+RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy*)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 
-PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy*)
+RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy*)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 
 void PageClientImpl::setTextIndicator(Ref<TextIndicator> textIndicator, TextIndicatorLifetime)
index fd2291a..7c522c6 100644 (file)
@@ -107,10 +107,10 @@ String WebPageProxy::stringSelectionForPasteboard()
     return String();
 }
 
-PassRefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const String&)
+RefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const String&)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 
 bool WebPageProxy::readSelectionFromPasteboard(const String&)
index c1f6fc1..abe394b 100644 (file)
@@ -120,11 +120,11 @@ private:
 
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
 
-    virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
-    virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
+    virtual RefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
 
 #if ENABLE(INPUT_TYPE_COLOR)
-    virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) override;
+    virtual RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) override;
 #endif
 
     virtual void setTextIndicator(Ref<WebCore::TextIndicator>, WebCore::TextIndicatorLifetime = WebCore::TextIndicatorLifetime::Permanent) override;
index f1f4247..81d0b1b 100644 (file)
@@ -487,18 +487,18 @@ void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool
     [m_wkView _doneWithKeyEvent:event.nativeEvent() eventWasHandled:eventWasHandled];
 }
 
-PassRefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
+RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy* page)
 {
     return WebPopupMenuProxyMac::create(m_wkView, page);
 }
 
-PassRefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy* page)
+RefPtr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy* page)
 {
     return WebContextMenuProxyMac::create(m_wkView, page);
 }
 
 #if ENABLE(INPUT_TYPE_COLOR)
-PassRefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& initialColor,  const WebCore::IntRect& rect)
+RefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& initialColor,  const WebCore::IntRect& rect)
 {
     return WebColorPickerMac::create(page, initialColor, rect, wkView());
 }
index 4c2231b..b2928cf 100644 (file)
@@ -368,17 +368,17 @@ String WebPageProxy::stringSelectionForPasteboard()
     return value;
 }
 
-PassRefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const String& pasteboardType)
+RefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const String& pasteboardType)
 {
     if (!isValid())
-        return 0;
+        return nullptr;
     SharedMemory::Handle handle;
     uint64_t size = 0;
     const auto messageTimeout = std::chrono::seconds(20);
     process().sendSync(Messages::WebPage::GetDataSelectionForPasteboard(pasteboardType),
                                                 Messages::WebPage::GetDataSelectionForPasteboard::Reply(handle, size), m_pageID, messageTimeout);
     if (handle.isNull())
-        return 0;
+        return nullptr;
     RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly);
     return SharedBuffer::create(static_cast<unsigned char *>(sharedMemoryBuffer->data()), size);
 }
index 1ed78d3..aa2324c 100644 (file)
@@ -67,20 +67,20 @@ WebResourceLoadScheduler::~WebResourceLoadScheduler()
 {
 }
 
-PassRefPtr<SubresourceLoader> WebResourceLoadScheduler::scheduleSubresourceLoad(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
+RefPtr<SubresourceLoader> WebResourceLoadScheduler::scheduleSubresourceLoad(Frame* frame, CachedResource* resource, const ResourceRequest& request, const ResourceLoaderOptions& options)
 {
     RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, resource, request, options);
     if (loader)
         scheduleLoad(loader.get(), resource, frame->document()->referrerPolicy() == ReferrerPolicyDefault);
-    return loader.release();
+    return loader;
 }
 
-PassRefPtr<NetscapePlugInStreamLoader> WebResourceLoadScheduler::schedulePluginStreamLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceRequest& request)
+RefPtr<NetscapePlugInStreamLoader> WebResourceLoadScheduler::schedulePluginStreamLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceRequest& request)
 {
     RefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::create(frame, client, request);
     if (loader)
         scheduleLoad(loader.get(), 0, frame->document()->referrerPolicy() == ReferrerPolicyDefault);
-    return loader.release();
+    return loader;
 }
 
 static std::chrono::milliseconds maximumBufferingTime(CachedResource* resource)
index 2e81797..764e1aa 100644 (file)
@@ -45,8 +45,8 @@ public:
     WebResourceLoadScheduler();
     virtual ~WebResourceLoadScheduler();
     
-    virtual PassRefPtr<WebCore::SubresourceLoader> scheduleSubresourceLoad(WebCore::Frame*, WebCore::CachedResource*, const WebCore::ResourceRequest&, const WebCore::ResourceLoaderOptions&) override;
-    virtual PassRefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&) override;
+    virtual RefPtr<WebCore::SubresourceLoader> scheduleSubresourceLoad(WebCore::Frame*, WebCore::CachedResource*, const WebCore::ResourceRequest&, const WebCore::ResourceLoaderOptions&) override;
+    virtual RefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&) override;
     
     virtual void remove(WebCore::ResourceLoader*) override;
     virtual void setDefersLoading(WebCore::ResourceLoader*, bool) override;
index d3dc247..39e9b3d 100644 (file)
@@ -112,10 +112,10 @@ NetscapePlugin::~NetscapePlugin()
     m_pluginModule->decrementLoadCount();
 }
 
-PassRefPtr<NetscapePlugin> NetscapePlugin::fromNPP(NPP npp)
+RefPtr<NetscapePlugin> NetscapePlugin::fromNPP(NPP npp)
 {
     if (!npp)
-        return 0;
+        return nullptr;
 
     return static_cast<NetscapePlugin*>(npp->ndata);
 }
@@ -709,10 +709,10 @@ void NetscapePlugin::paint(GraphicsContext* context, const IntRect& dirtyRect)
     platformPaint(context, dirtyRect);
 }
 
-PassRefPtr<ShareableBitmap> NetscapePlugin::snapshot()
+RefPtr<ShareableBitmap> NetscapePlugin::snapshot()
 {
     if (!supportsSnapshotting() || m_pluginSize.isEmpty())
-        return 0;
+        return nullptr;
 
     ASSERT(m_isStarted);
 
@@ -728,7 +728,7 @@ PassRefPtr<ShareableBitmap> NetscapePlugin::snapshot()
 
     platformPaint(context.get(), IntRect(IntPoint(), m_pluginSize), true);
 
-    return bitmap.release();
+    return bitmap;
 }
 
 bool NetscapePlugin::isTransparent()
@@ -1064,9 +1064,9 @@ bool NetscapePlugin::supportsSnapshotting() const
     return false;
 }
 
-PassRefPtr<WebCore::SharedBuffer> NetscapePlugin::liveResourceData() const
+RefPtr<WebCore::SharedBuffer> NetscapePlugin::liveResourceData() const
 {
-    return 0;
+    return nullptr;
 }
 
 IntPoint NetscapePlugin::convertToRootView(const IntPoint& pointInPluginCoordinates) const
index 8b3283c..d88b6fd 100644 (file)
@@ -64,7 +64,7 @@ public:
     static RefPtr<NetscapePlugin> create(PassRefPtr<NetscapePluginModule>);
     virtual ~NetscapePlugin();
 
-    static PassRefPtr<NetscapePlugin> fromNPP(NPP);
+    static RefPtr<NetscapePlugin> fromNPP(NPP);
 
     // In-process NetscapePlugins don't support asynchronous initialization.
     virtual bool isBeingAsynchronouslyInitialized() const override { return false; }
@@ -188,7 +188,7 @@ private:
     virtual bool initialize(const Parameters&) override;
     virtual void destroy() override;
     virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect) override;
-    virtual PassRefPtr<ShareableBitmap> snapshot() override;
+    virtual RefPtr<ShareableBitmap> snapshot() override;
 #if PLATFORM(COCOA)
     virtual PlatformLayer* pluginLayer() override;
 #endif
@@ -264,7 +264,7 @@ private:
     // converted (if the transformation matrix isn't invertible).
     bool convertFromRootView(const WebCore::IntPoint& pointInRootViewCoordinates, WebCore::IntPoint& pointInPluginCoordinates);
 
-    virtual PassRefPtr<WebCore::SharedBuffer> liveResourceData() const override;
+    virtual RefPtr<WebCore::SharedBuffer> liveResourceData() const override;
 
     virtual bool performDictionaryLookupAtLocation(const WebCore::FloatPoint&) override { return false; }
 
index 5d65a66..30c790f 100644 (file)
@@ -118,7 +118,7 @@ private:
     virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRectInWindowCoordinates) override { }
     virtual void updateControlTints(WebCore::GraphicsContext*) override;
     virtual bool supportsSnapshotting() const override { return true; }
-    virtual PassRefPtr<ShareableBitmap> snapshot() override;
+    virtual RefPtr<ShareableBitmap> snapshot() override;
     virtual PlatformLayer* pluginLayer() override;
     virtual bool isTransparent() override { return false; }
     virtual bool wantsWheelEvents() override { return true; }
@@ -159,7 +159,7 @@ private:
     virtual void privateBrowsingStateChanged(bool) override { }
     virtual bool getFormValue(String& formValue) override { return false; }
     virtual bool handleScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity) override;
-    virtual PassRefPtr<WebCore::SharedBuffer> liveResourceData() const override;
+    virtual RefPtr<WebCore::SharedBuffer> liveResourceData() const override;
 
     virtual bool isBeingAsynchronouslyInitialized() const override { return false; }
 
index 9847018..9324948 100644 (file)
@@ -1152,7 +1152,7 @@ void PDFPlugin::paintControlForLayerInContext(CALayer *layer, CGContextRef conte
     scrollbar->paint(&graphicsContext, scrollbar->frameRect());
 }
 
-PassRefPtr<ShareableBitmap> PDFPlugin::snapshot()
+RefPtr<ShareableBitmap> PDFPlugin::snapshot()
 {
     if (size().isEmpty())
         return nullptr;
@@ -1169,7 +1169,7 @@ PassRefPtr<ShareableBitmap> PDFPlugin::snapshot()
 
     [m_pdfLayerController snapshotInContext:context->platformContext()];
 
-    return bitmap.release();
+    return bitmap;
 }
 
 PlatformLayer* PDFPlugin::pluginLayer()
@@ -1635,12 +1635,12 @@ void PDFPlugin::notifyDisplayModeChanged(int)
     updateScrollbars();
 }
 
-PassRefPtr<SharedBuffer> PDFPlugin::liveResourceData() const
+RefPtr<SharedBuffer> PDFPlugin::liveResourceData() const
 {
     NSData *pdfData = liveData();
 
     if (!pdfData)
-        return 0;
+        return nullptr;
 
     return SharedBuffer::wrapNSData(pdfData);
 }
index a14e98a..62ab847 100644 (file)
@@ -135,7 +135,7 @@ public:
     virtual bool supportsSnapshotting() const = 0;
 
     // Tells the plug-in to draw itself into a bitmap, and return that.
-    virtual PassRefPtr<ShareableBitmap> snapshot() = 0;
+    virtual RefPtr<ShareableBitmap> snapshot() = 0;
 
 #if PLATFORM(COCOA)
     // If a plug-in is using the Core Animation drawing model, this returns its plug-in layer.
@@ -283,7 +283,7 @@ public:
 
     virtual bool shouldAlwaysAutoStart() const { return false; }
 
-    virtual PassRefPtr<WebCore::SharedBuffer> liveResourceData() const = 0;
+    virtual RefPtr<WebCore::SharedBuffer> liveResourceData() const = 0;
 
     virtual bool performDictionaryLookupAtLocation(const WebCore::FloatPoint&) = 0;
 
index 1ec16be..13ca543 100644 (file)
@@ -238,16 +238,16 @@ bool PluginProxy::supportsSnapshotting() const
     return isSupported;
 }
 
-PassRefPtr<ShareableBitmap> PluginProxy::snapshot()
+RefPtr<ShareableBitmap> PluginProxy::snapshot()
 {
     ShareableBitmap::Handle snapshotStoreHandle;
     m_connection->connection()->sendSync(Messages::PluginControllerProxy::Snapshot(), Messages::PluginControllerProxy::Snapshot::Reply(snapshotStoreHandle), m_pluginInstanceID);
 
     if (snapshotStoreHandle.isNull())
-        return 0;
+        return nullptr;
 
     RefPtr<ShareableBitmap> snapshotBuffer = ShareableBitmap::create(snapshotStoreHandle);
-    return snapshotBuffer.release();
+    return snapshotBuffer;
 }
 
 bool PluginProxy::isTransparent()
@@ -716,9 +716,9 @@ IntPoint PluginProxy::convertToRootView(const IntPoint& point) const
     return m_pluginToRootViewTransform.mapPoint(point);
 }
 
-PassRefPtr<WebCore::SharedBuffer> PluginProxy::liveResourceData() const
+RefPtr<WebCore::SharedBuffer> PluginProxy::liveResourceData() const
 {
-    return 0;
+    return nullptr;
 }
 
 #if PLATFORM(COCOA)
index 89041c0..e2f98ad 100644 (file)
@@ -79,7 +79,7 @@ private:
     virtual void destroy() override;
     virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect) override;
     virtual bool supportsSnapshotting() const override;
-    virtual PassRefPtr<ShareableBitmap> snapshot() override;
+    virtual RefPtr<ShareableBitmap> snapshot() override;
 #if PLATFORM(COCOA)
     virtual PlatformLayer* pluginLayer() override;
 #endif
@@ -139,7 +139,7 @@ private:
 
     virtual WebCore::IntPoint convertToRootView(const WebCore::IntPoint&) const override;
 
-    virtual PassRefPtr<WebCore::SharedBuffer> liveResourceData() const override;
+    virtual RefPtr<WebCore::SharedBuffer> liveResourceData() const override;
     virtual bool performDictionaryLookupAtLocation(const WebCore::FloatPoint&) override { return false; }
 
     String getSelectionString() const override { return String(); }
index aa8f431..35778f8 100644 (file)
@@ -72,7 +72,7 @@ void StorageNamespaceImpl::didDestroyStorageAreaMap(StorageAreaMap& map)
     m_storageAreaMaps.remove(&map.securityOrigin());
 }
 
-PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOrigin> securityOrigin)
+RefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOrigin> securityOrigin)
 {
     RefPtr<StorageAreaMap> map;
 
@@ -86,7 +86,7 @@ PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOri
     return StorageAreaImpl::create(WTF::move(map));
 }
 
-PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy(Page* newPage)
+RefPtr<StorageNamespace> StorageNamespaceImpl::copy(Page* newPage)
 {
     ASSERT(m_storageNamespaceID);
 
index 6c51674..3781717 100644 (file)
@@ -54,8 +54,8 @@ public:
 private:
     explicit StorageNamespaceImpl(WebCore::StorageType, uint64_t storageNamespaceID, WebCore::SecurityOrigin* topLevelOrigin, unsigned quotaInBytes);
 
-    virtual PassRefPtr<WebCore::StorageArea> storageArea(PassRefPtr<WebCore::SecurityOrigin>) override;
-    virtual PassRefPtr<WebCore::StorageNamespace> copy(WebCore::Page*) override;
+    virtual RefPtr<WebCore::StorageArea> storageArea(PassRefPtr<WebCore::SecurityOrigin>) override;
+    virtual RefPtr<WebCore::StorageNamespace> copy(WebCore::Page*) override;
 
     const WebCore::StorageType m_storageType;
     const uint64_t m_storageNamespaceID;
index fd0a98e..4520620 100644 (file)
@@ -185,12 +185,12 @@ static void applyFrameState(HistoryItem& historyItem, const FrameState& frameSta
     }
 }
 
-PassRefPtr<HistoryItem> toHistoryItem(const PageState& pageState)
+Ref<HistoryItem> toHistoryItem(const PageState& pageState)
 {
-    RefPtr<HistoryItem> historyItem = HistoryItem::create(pageState.mainFrameState.urlString, pageState.title);
-    applyFrameState(*historyItem, pageState.mainFrameState);
+    Ref<HistoryItem> historyItem = HistoryItem::create(pageState.mainFrameState.urlString, pageState.title);
+    applyFrameState(historyItem, pageState.mainFrameState);
 
-    return historyItem.release();
+    return historyItem;
 }
 
 } // namespace WebKit
index e415415..bee9d22 100644 (file)
@@ -37,7 +37,7 @@ namespace WebKit {
 struct PageState;
 
 PageState toPageState(const WebCore::HistoryItem&);
-PassRefPtr<WebCore::HistoryItem> toHistoryItem(const PageState&);
+Ref<WebCore::HistoryItem> toHistoryItem(const PageState&);
 
 } // namespace WebKit
 
index 1550a33..939dccc 100644 (file)
@@ -834,12 +834,12 @@ bool WebChromeClient::hasOpenedPopup() const
     return false;
 }
 
-PassRefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const
+RefPtr<WebCore::PopupMenu> WebChromeClient::createPopupMenu(WebCore::PopupMenuClient* client) const
 {
     return WebPopupMenu::create(m_page, client);
 }
 
-PassRefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
+RefPtr<WebCore::SearchPopupMenu> WebChromeClient::createSearchPopupMenu(WebCore::PopupMenuClient* client) const
 {
     return WebSearchPopupMenu::create(m_page, client);
 }
index e2081b9..1653dfc 100644 (file)
@@ -203,8 +203,8 @@ private:
     virtual bool selectItemWritingDirectionIsNatural() override;
     virtual bool selectItemAlignmentFollowsMenuWritingDirection() override;
     virtual bool hasOpenedPopup() const override;
-    virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const override;
-    virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
+    virtual RefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const override;
+    virtual RefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const override;
 
     virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() const override;
     virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
index be6e9b0..540dde9 100644 (file)
@@ -1243,7 +1243,7 @@ void WebFrameLoaderClient::prepareForDataSourceReplacement()
     notImplemented();
 }
 
-PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
+Ref<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
 {
     return m_frame->page()->createDocumentLoader(*m_frame->coreFrame(), request, substituteData);
 }
@@ -1375,7 +1375,7 @@ void WebFrameLoaderClient::convertMainResourceLoadToDownload(DocumentLoader *doc
     m_frame->convertMainResourceLoadToDownload(documentLoader, request, response);
 }
 
-PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
+RefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
                                                     const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
 {
     WebPage* webPage = m_frame->page();
@@ -1384,25 +1384,25 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String
 
     Frame* coreSubframe = subframe->coreFrame();
     if (!coreSubframe)
-        return 0;
+        return nullptr;
 
     // The creation of the frame may have run arbitrary JavaScript that removed it from the page already.
     if (!coreSubframe->page())
-        return 0;
+        return nullptr;
 
     m_frame->coreFrame()->loader().loadURLIntoChildFrame(url, referrer, coreSubframe);
 
     // The frame's onload handler may have removed it from the document.
     if (!subframe->coreFrame())
-        return 0;
+        return nullptr;
     ASSERT(subframe->coreFrame() == coreSubframe);
     if (!coreSubframe->tree().parent())
-        return 0;
+        return nullptr;
 
     return coreSubframe;
 }
 
-PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement* pluginElement, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
+RefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement* pluginElement, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
 {
     ASSERT(paramNames.size() == paramValues.size());
     ASSERT(m_frame->page());
@@ -1421,12 +1421,12 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugIn
 #if ENABLE(NETSCAPE_PLUGIN_API)
     RefPtr<Plugin> plugin = m_frame->page()->createPlugin(m_frame, pluginElement, parameters, parameters.mimeType);
     if (!plugin)
-        return 0;
+        return nullptr;
 
     return PluginView::create(pluginElement, plugin.release(), parameters);
 #else
     UNUSED_PARAM(pluginElement);
-    return 0;
+    return nullptr;
 #endif
 }
 
index 3cb15e9..590f971 100644 (file)
@@ -163,7 +163,7 @@ private:
     virtual void didFinishLoad() override;
     virtual void prepareForDataSourceReplacement() override;
     
-    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&) override;
+    virtual Ref<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&) override;
     virtual void updateCachedDocumentLoader(WebCore::DocumentLoader&) override;
 
     virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&) override;
@@ -185,10 +185,10 @@ private:
     virtual bool canCachePage() const override;
     virtual void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) override;
 
-    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
+    virtual RefPtr<WebCore::Frame> createFrame(const WebCore::URL&, const String& name, WebCore::HTMLFrameOwnerElement*,
                                           const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) override;
     
-    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) override;
+    virtual RefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) override;
     virtual void recreatePlugin(WebCore::Widget*) override;
     virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) override;
     
index 1202719..7969ba2 100644 (file)
@@ -241,14 +241,14 @@ private:
 
 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageCounter, ("WebPage"));
 
-PassRefPtr<WebPage> WebPage::create(uint64_t pageID, const WebPageCreationParameters& parameters)
+Ref<WebPage> WebPage::create(uint64_t pageID, const WebPageCreationParameters& parameters)
 {
-    RefPtr<WebPage> page = adoptRef(new WebPage(pageID, parameters));
+    Ref<WebPage> page = adoptRef(*new WebPage(pageID, parameters));
 
     if (page->pageGroup()->isVisibleToInjectedBundle() && WebProcess::singleton().injectedBundle())
-        WebProcess::singleton().injectedBundle()->didCreatePage(page.get());
+        WebProcess::singleton().injectedBundle()->didCreatePage(page.ptr());
 
-    return page.release();
+    return page;
 }
 
 WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
@@ -4908,16 +4908,16 @@ void WebPage::setScrollbarOverlayStyle(WTF::Optional<uint32_t> scrollbarStyle)
     m_page->mainFrame().view()->recalculateScrollbarOverlayStyle();
 }
 
-PassRefPtr<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRequest& request, const SubstituteData& substituteData)
+Ref<DocumentLoader> WebPage::createDocumentLoader(Frame& frame, const ResourceRequest& request, const SubstituteData& substituteData)
 {
-    RefPtr<WebDocumentLoader> documentLoader = WebDocumentLoader::create(request, substituteData);
+    Ref<WebDocumentLoader> documentLoader = WebDocumentLoader::create(request, substituteData);
 
     if (m_pendingNavigationID && frame.isMainFrame()) {
         documentLoader->setNavigationID(m_pendingNavigationID);
         m_pendingNavigationID = 0;
     }
 
-    return documentLoader.release();
+    return WTF::move(documentLoader);
 }
 
 void WebPage::updateCachedDocumentLoader(WebDocumentLoader& documentLoader, Frame& frame)
index c7a4004..05eed8b 100644 (file)
@@ -191,7 +191,7 @@ class WebTouchEvent;
 
 class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender {
 public:
-    static PassRefPtr<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
+    static Ref<WebPage> create(uint64_t pageID, const WebPageCreationParameters&);
     virtual ~WebPage();
 
     void reinitializeWebPage(const WebPageCreationParameters&);
@@ -872,7 +872,7 @@ public:
     WTF::Optional<WebCore::ScrollbarOverlayStyle> scrollbarOverlayStyle() { return m_scrollbarOverlayStyle; }
     void setScrollbarOverlayStyle(WTF::Optional<uint32_t /* WebCore::ScrollbarOverlayStyle */> scrollbarStyle);
 
-    PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
+    Ref<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
     void updateCachedDocumentLoader(WebDocumentLoader&, WebCore::Frame&);
 
     void getBytecodeProfile(uint64_t callbackID);
@@ -1121,7 +1121,7 @@ private:
 
 #if PLATFORM(MAC)
     void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
-    PassRefPtr<WebCore::Range> lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
+    RefPtr<WebCore::Range> lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
     void immediateActionDidUpdate();
     void immediateActionDidCancel();
     void immediateActionDidComplete();
index 8f9866d..a40c82d 100644 (file)
@@ -1186,7 +1186,7 @@ void WebPage::performImmediateActionHitTestAtLocation(WebCore::FloatPoint locati
     send(Messages::WebPageProxy::DidPerformImmediateActionHitTest(immediateActionResult, immediateActionHitTestPreventsDefault, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 }
 
-PassRefPtr<WebCore::Range> WebPage::lookupTextAtLocation(FloatPoint locationInViewCoordinates, NSDictionary **options)
+RefPtr<WebCore::Range> WebPage::lookupTextAtLocation(FloatPoint locationInViewCoordinates, NSDictionary **options)
 {
     MainFrame& mainFrame = corePage()->mainFrame();
     if (!mainFrame.view() || !mainFrame.view()->renderView())