Title: [208342] trunk/Source/WebKit2
Revision
208342
Author
ryanhad...@apple.com
Date
2016-11-03 13:53:00 -0700 (Thu, 03 Nov 2016)

Log Message

Unreviewed, rolling out r208330.

This change appears to have caused two editing tests to fail
on macOS.

Reverted changeset:

"Reduce PassRefPtr use in WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=164360
http://trac.webkit.org/changeset/208330

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (208341 => 208342)


--- trunk/Source/WebKit2/ChangeLog	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/ChangeLog	2016-11-03 20:53:00 UTC (rev 208342)
@@ -1,3 +1,16 @@
+2016-11-03  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r208330.
+
+        This change appears to have caused two editing tests to fail
+        on macOS.
+
+        Reverted changeset:
+
+        "Reduce PassRefPtr use in WebKit2"
+        https://bugs.webkit.org/show_bug.cgi?id=164360
+        http://trac.webkit.org/changeset/208330
+
 2016-11-03  Dan Bernstein  <m...@apple.com>
 
         WKWebView’s _observedRenderingProgressEvents not restored after web process crash

Modified: trunk/Source/WebKit2/Shared/API/APISecurityOrigin.h (208341 => 208342)


--- trunk/Source/WebKit2/Shared/API/APISecurityOrigin.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/Shared/API/APISecurityOrigin.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -27,6 +27,7 @@
 
 #include "APIObject.h"
 #include <WebCore/SecurityOrigin.h>
+#include <wtf/PassRefPtr.h>
 
 namespace API {
 
@@ -50,8 +51,8 @@
     WebCore::SecurityOrigin& securityOrigin() const { return *m_securityOrigin; }
 
 private:
-    SecurityOrigin(RefPtr<WebCore::SecurityOrigin>&& securityOrigin)
-        : m_securityOrigin(WTFMove(securityOrigin))
+    SecurityOrigin(PassRefPtr<WebCore::SecurityOrigin> securityOrigin)
+        : m_securityOrigin(securityOrigin)
     {
     }
 

Modified: trunk/Source/WebKit2/Shared/API/APISerializedScriptValue.h (208341 => 208342)


--- trunk/Source/WebKit2/Shared/API/APISerializedScriptValue.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/Shared/API/APISerializedScriptValue.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -36,9 +36,9 @@
 
 class SerializedScriptValue : public API::ObjectImpl<API::Object::Type::SerializedScriptValue> {
 public:
-    static Ref<SerializedScriptValue> create(RefPtr<WebCore::SerializedScriptValue>&& serializedValue)
+    static Ref<SerializedScriptValue> create(PassRefPtr<WebCore::SerializedScriptValue> serializedValue)
     {
-        return adoptRef(*new SerializedScriptValue(WTFMove(serializedValue)));
+        return adoptRef(*new SerializedScriptValue(serializedValue));
     }
     
     static RefPtr<SerializedScriptValue> create(JSContextRef context, JSValueRef value, JSValueRef* exception)
@@ -68,8 +68,8 @@
     WebCore::SerializedScriptValue* internalRepresentation() { return m_serializedScriptValue.get(); }
 
 private:
-    explicit SerializedScriptValue(RefPtr<WebCore::SerializedScriptValue>&& serializedScriptValue)
-        : m_serializedScriptValue(WTFMove(serializedScriptValue))
+    explicit SerializedScriptValue(PassRefPtr<WebCore::SerializedScriptValue> serializedScriptValue)
+        : m_serializedScriptValue(serializedScriptValue)
     {
     }
 

Modified: trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (208341 => 208342)


--- trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -23,9 +23,9 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#pragma once
+#ifndef WKSharedAPICast_h
+#define WKSharedAPICast_h
 
-#include "APIArray.h"
 #include "APIError.h"
 #include "APINumber.h"
 #include "APISecurityOrigin.h"
@@ -136,8 +136,8 @@
 template<typename ImplType, typename APIType = typename ImplTypeInfo<ImplType>::APIType>
 class ProxyingRefPtr {
 public:
-    ProxyingRefPtr(RefPtr<ImplType>&& impl)
-        : m_impl(WTFMove(impl))
+    ProxyingRefPtr(PassRefPtr<ImplType> impl)
+        : m_impl(impl)
     {
     }
 
@@ -154,11 +154,6 @@
 
 /* Special cases. */
 
-inline ProxyingRefPtr<API::Array> toAPI(Ref<API::Array>&& array)
-{
-    return ProxyingRefPtr<API::Array>(WTFMove(array));
-}
-
 inline ProxyingRefPtr<API::String> toAPI(StringImpl* string)
 {
     return ProxyingRefPtr<API::String>(API::String::create(string));
@@ -1001,3 +996,5 @@
 }
 
 } // namespace WebKit
+
+#endif // WKSharedAPICast_h

Modified: trunk/Source/WebKit2/Shared/APIWebArchive.h (208341 => 208342)


--- trunk/Source/WebKit2/Shared/APIWebArchive.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/Shared/APIWebArchive.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -23,12 +23,13 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#pragma once
+#ifndef WebArchive_h
+#define WebArchive_h
 
 #if PLATFORM(COCOA)
 
 #include "APIObject.h"
-#include <wtf/Ref.h>
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
 namespace API {
@@ -49,9 +50,9 @@
 public:
     virtual ~WebArchive();
 
-    static Ref<WebArchive> create(WebArchiveResource* mainResource, RefPtr<API::Array>&& subresources, RefPtr<API::Array>&& subframeArchives);
+    static Ref<WebArchive> create(WebArchiveResource* mainResource, PassRefPtr<API::Array> subresources, PassRefPtr<API::Array> subframeArchives);
     static Ref<WebArchive> create(API::Data*);
-    static Ref<WebArchive> create(RefPtr<WebCore::LegacyWebArchive>&&);
+    static Ref<WebArchive> create(PassRefPtr<WebCore::LegacyWebArchive>);
     static Ref<WebArchive> create(WebCore::Range*);
 
     WebArchiveResource* mainResource();
@@ -63,9 +64,9 @@
     WebCore::LegacyWebArchive* coreLegacyWebArchive();
 
 private:
-    WebArchive(WebArchiveResource* mainResource, RefPtr<API::Array>&& subresources, RefPtr<API::Array>&& subframeArchives);
+    WebArchive(WebArchiveResource* mainResource, PassRefPtr<API::Array> subresources, PassRefPtr<API::Array> subframeArchives);
     WebArchive(API::Data*);
-    WebArchive(RefPtr<WebCore::LegacyWebArchive>&&);
+    WebArchive(PassRefPtr<WebCore::LegacyWebArchive>);
 
     RefPtr<WebCore::LegacyWebArchive> m_legacyWebArchive;
     RefPtr<WebArchiveResource> m_cachedMainResource;
@@ -76,3 +77,5 @@
 } // namespace API
 
 #endif // PLATFORM(COCOA)
+
+#endif // WebArchive_h

Modified: trunk/Source/WebKit2/Shared/APIWebArchive.mm (208341 => 208342)


--- trunk/Source/WebKit2/Shared/APIWebArchive.mm	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/Shared/APIWebArchive.mm	2016-11-03 20:53:00 UTC (rev 208342)
@@ -38,9 +38,9 @@
 
 namespace API {
 
-Ref<WebArchive> WebArchive::create(WebArchiveResource* mainResource, RefPtr<API::Array>&& subresources, RefPtr<API::Array>&& subframeArchives)
+Ref<WebArchive> WebArchive::create(WebArchiveResource* mainResource, PassRefPtr<API::Array> subresources, PassRefPtr<API::Array> subframeArchives)
 {
-    return adoptRef(*new WebArchive(mainResource, WTFMove(subresources), WTFMove(subframeArchives)));
+    return adoptRef(*new WebArchive(mainResource, subresources, subframeArchives));
 }
 
 Ref<WebArchive> WebArchive::create(API::Data* data)
@@ -48,9 +48,9 @@
     return adoptRef(*new WebArchive(data));
 }
 
-Ref<WebArchive> WebArchive::create(RefPtr<LegacyWebArchive>&& legacyWebArchive)
+Ref<WebArchive> WebArchive::create(PassRefPtr<LegacyWebArchive> legacyWebArchive)
 {
-    return adoptRef(*new WebArchive(WTFMove(legacyWebArchive)));
+    return adoptRef(*new WebArchive(legacyWebArchive));
 }
 
 Ref<WebArchive> WebArchive::create(Range* range)
@@ -58,10 +58,10 @@
     return adoptRef(*new WebArchive(LegacyWebArchive::create(range)));
 }
 
-WebArchive::WebArchive(WebArchiveResource* mainResource, RefPtr<API::Array>&& subresources, RefPtr<API::Array>&& subframeArchives)
+WebArchive::WebArchive(WebArchiveResource* mainResource, PassRefPtr<API::Array> subresources, PassRefPtr<API::Array> subframeArchives)
     : m_cachedMainResource(mainResource)
-    , m_cachedSubresources(WTFMove(subresources))
-    , m_cachedSubframeArchives(WTFMove(subframeArchives))
+    , m_cachedSubresources(subresources)
+    , m_cachedSubframeArchives(subframeArchives)
 {
     RefPtr<ArchiveResource> coreMainResource = m_cachedMainResource->coreArchiveResource();
 
@@ -90,8 +90,8 @@
     m_legacyWebArchive = LegacyWebArchive::create(SharedBuffer::create(data->bytes(), data->size()).get());
 }
 
-WebArchive::WebArchive(RefPtr<LegacyWebArchive>&& legacyWebArchive)
-    : m_legacyWebArchive(WTFMove(legacyWebArchive))
+WebArchive::WebArchive(PassRefPtr<LegacyWebArchive> legacyWebArchive)
+    : m_legacyWebArchive(legacyWebArchive)
 {
 }
 

Modified: trunk/Source/WebKit2/UIProcess/API/APIHitTestResult.cpp (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/APIHitTestResult.cpp	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/APIHitTestResult.cpp	2016-11-03 20:53:00 UTC (rev 208342)
@@ -24,9 +24,9 @@
 
 namespace API {
 
-Ref<HitTestResult> HitTestResult::create(const WebKit::WebHitTestResultData& hitTestResultData)
+PassRefPtr<HitTestResult> HitTestResult::create(const WebKit::WebHitTestResultData& hitTestResultData)
 {
-    return adoptRef(*new HitTestResult(hitTestResultData));
+    return adoptRef(new HitTestResult(hitTestResultData));
 }
 
 } // namespace API

Modified: trunk/Source/WebKit2/UIProcess/API/APIHitTestResult.h (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/APIHitTestResult.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/APIHitTestResult.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -17,7 +17,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#pragma once
+#ifndef APIHitTestResult_h
+#define APIHitTestResult_h
 
 #include "APIObject.h"
 #include "SharedMemory.h"
@@ -27,7 +28,7 @@
 #include <WebCore/IntRect.h>
 #include <WebCore/PageOverlay.h>
 #include <wtf/Forward.h>
-#include <wtf/Ref.h>
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 #include <wtf/text/WTFString.h>
 
@@ -48,7 +49,7 @@
 
 class HitTestResult : public API::ObjectImpl<API::Object::Type::HitTestResult> {
 public:
-    static Ref<HitTestResult> create(const WebKit::WebHitTestResultData&);
+    static PassRefPtr<HitTestResult> create(const WebKit::WebHitTestResultData&);
 
     WTF::String absoluteImageURL() const { return m_data.absoluteImageURL; }
     WTF::String absolutePDFURL() const { return m_data.absolutePDFURL; }
@@ -85,3 +86,5 @@
 };
 
 } // namespace API
+
+#endif // APIHitTestResult_h

Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -23,7 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#pragma once
+#ifndef APIUIClient_h
+#define APIUIClient_h
 
 #include "WKPage.h"
 #include "WebEvent.h"
@@ -31,6 +32,7 @@
 #include "WebPageProxy.h"
 #include <WebCore/FloatRect.h>
 #include <functional>
+#include <wtf/PassRefPtr.h>
 
 #if PLATFORM(IOS)
 OBJC_CLASS NSArray;
@@ -73,7 +75,7 @@
 public:
     virtual ~UIClient() { }
 
-    virtual RefPtr<WebKit::WebPageProxy> createNewPage(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const WebKit::NavigationActionData&) { return nullptr; }
+    virtual PassRefPtr<WebKit::WebPageProxy> createNewPage(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const WebKit::NavigationActionData&) { return nullptr; }
     virtual void showPage(WebKit::WebPageProxy*) { }
     virtual void fullscreenMayReturnToInline(WebKit::WebPageProxy*) { }
     virtual void didEnterFullscreen(WebKit::WebPageProxy*) { }
@@ -171,3 +173,5 @@
 };
 
 } // namespace API
+
+#endif // APIUIClient_h

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2016-11-03 20:53:00 UTC (rev 208342)
@@ -1541,9 +1541,9 @@
 
 class RunBeforeUnloadConfirmPanelResultListener : public API::ObjectImpl<API::Object::Type::RunBeforeUnloadConfirmPanelResultListener> {
 public:
-    static Ref<RunBeforeUnloadConfirmPanelResultListener> create(Function<void(bool)>&& completionHandler)
+    static PassRefPtr<RunBeforeUnloadConfirmPanelResultListener> create(Function<void (bool)>&& completionHandler)
     {
-        return adoptRef(*new RunBeforeUnloadConfirmPanelResultListener(WTFMove(completionHandler)));
+        return adoptRef(new RunBeforeUnloadConfirmPanelResultListener(WTFMove(completionHandler)));
     }
 
     virtual ~RunBeforeUnloadConfirmPanelResultListener()
@@ -1556,7 +1556,7 @@
     }
 
 private:
-    explicit RunBeforeUnloadConfirmPanelResultListener(Function<void(bool)>&& completionHandler)
+    explicit RunBeforeUnloadConfirmPanelResultListener(Function<void (bool)>&& completionHandler)
         : m_completionHandler(WTFMove(completionHandler))
     {
     }
@@ -1566,9 +1566,9 @@
 
 class RunJavaScriptAlertResultListener : public API::ObjectImpl<API::Object::Type::RunJavaScriptAlertResultListener> {
 public:
-    static Ref<RunJavaScriptAlertResultListener> create(Function<void()>&& completionHandler)
+    static PassRefPtr<RunJavaScriptAlertResultListener> create(Function<void ()>&& completionHandler)
     {
-        return adoptRef(*new RunJavaScriptAlertResultListener(WTFMove(completionHandler)));
+        return adoptRef(new RunJavaScriptAlertResultListener(WTFMove(completionHandler)));
     }
 
     virtual ~RunJavaScriptAlertResultListener()
@@ -1581,7 +1581,7 @@
     }
 
 private:
-    explicit RunJavaScriptAlertResultListener(Function<void()>&& completionHandler)
+    explicit RunJavaScriptAlertResultListener(Function<void ()>&& completionHandler)
         : m_completionHandler(WTFMove(completionHandler))
     {
     }
@@ -1591,9 +1591,9 @@
 
 class RunJavaScriptConfirmResultListener : public API::ObjectImpl<API::Object::Type::RunJavaScriptConfirmResultListener> {
 public:
-    static Ref<RunJavaScriptConfirmResultListener> create(Function<void(bool)>&& completionHandler)
+    static PassRefPtr<RunJavaScriptConfirmResultListener> create(Function<void (bool)>&& completionHandler)
     {
-        return adoptRef(*new RunJavaScriptConfirmResultListener(WTFMove(completionHandler)));
+        return adoptRef(new RunJavaScriptConfirmResultListener(WTFMove(completionHandler)));
     }
 
     virtual ~RunJavaScriptConfirmResultListener()
@@ -1606,7 +1606,7 @@
     }
 
 private:
-    explicit RunJavaScriptConfirmResultListener(Function<void(bool)>&& completionHandler)
+    explicit RunJavaScriptConfirmResultListener(Function<void (bool)>&& completionHandler)
         : m_completionHandler(WTFMove(completionHandler))
     {
     }
@@ -1616,9 +1616,9 @@
 
 class RunJavaScriptPromptResultListener : public API::ObjectImpl<API::Object::Type::RunJavaScriptPromptResultListener> {
 public:
-    static Ref<RunJavaScriptPromptResultListener> create(Function<void(const String&)>&& completionHandler)
+    static PassRefPtr<RunJavaScriptPromptResultListener> create(Function<void (const String&)>&& completionHandler)
     {
-        return adoptRef(*new RunJavaScriptPromptResultListener(WTFMove(completionHandler)));
+        return adoptRef(new RunJavaScriptPromptResultListener(WTFMove(completionHandler)));
     }
 
     virtual ~RunJavaScriptPromptResultListener()
@@ -1631,7 +1631,7 @@
     }
 
 private:
-    explicit RunJavaScriptPromptResultListener(Function<void(const String&)>&& completionHandler)
+    explicit RunJavaScriptPromptResultListener(Function<void (const String&)>&& completionHandler)
         : m_completionHandler(WTFMove(completionHandler))
     {
     }
@@ -1703,7 +1703,7 @@
         }
 
     private:
-        RefPtr<WebPageProxy> createNewPage(WebPageProxy* page, WebFrameProxy* initiatingFrame, const SecurityOriginData& securityOriginData, const ResourceRequest& resourceRequest, const WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override
+        PassRefPtr<WebPageProxy> createNewPage(WebPageProxy* page, WebFrameProxy* initiatingFrame, const SecurityOriginData& securityOriginData, const ResourceRequest& resourceRequest, const WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override
         {
             if (m_client.createNewPage) {
                 auto configuration = page->configuration().copy();

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-11-03 20:53:00 UTC (rev 208342)
@@ -1385,7 +1385,7 @@
     _scaleToRestore = scale;
 }
 
-- (RefPtr<WebKit::ViewSnapshot>)_takeViewSnapshot
+- (PassRefPtr<WebKit::ViewSnapshot>)_takeViewSnapshot
 {
     float deviceScale = WebCore::screenScaleFactor();
     WebCore::FloatSize snapshotSize(self.bounds.size);

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -83,7 +83,7 @@
 - (void)_restorePageScrollPosition:(WebCore::FloatPoint)scrollPosition scrollOrigin:(WebCore::FloatPoint)scrollOrigin previousObscuredInset:(WebCore::FloatSize)topInset scale:(double)scale;
 - (void)_restorePageStateToUnobscuredCenter:(WebCore::FloatPoint)center scale:(double)scale; // FIXME: needs scroll origin?
 
-- (RefPtr<WebKit::ViewSnapshot>)_takeViewSnapshot;
+- (PassRefPtr<WebKit::ViewSnapshot>)_takeViewSnapshot;
 
 - (void)_scrollToContentScrollPosition:(WebCore::FloatPoint)scrollPosition scrollOrigin:(WebCore::IntPoint)scrollOrigin;
 - (BOOL)_scrollToRect:(WebCore::FloatRect)targetRect origin:(WebCore::FloatPoint)origin minimumScrollDistance:(float)minimumScrollDistance;

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp	2016-11-03 20:53:00 UTC (rev 208342)
@@ -45,7 +45,7 @@
     }
 
 private:
-    RefPtr<WebPageProxy> createNewPage(WebPageProxy*, WebFrameProxy*, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest& resourceRequest, const WebCore::WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override
+    PassRefPtr<WebPageProxy> createNewPage(WebPageProxy*, WebFrameProxy*, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest& resourceRequest, const WebCore::WindowFeatures& windowFeatures, const NavigationActionData& navigationActionData) override
     {
         GRefPtr<WebKitURIRequest> request = adoptGRef(webkitURIRequestCreateForResourceRequest(resourceRequest));
         WebKitNavigationAction navigationAction(request.get(), navigationActionData);

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -76,7 +76,7 @@
 
     private:
         // API::UIClient
-        RefPtr<WebKit::WebPageProxy> createNewPage(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const WebKit::NavigationActionData&) override;
+        PassRefPtr<WebKit::WebPageProxy> createNewPage(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const WebKit::NavigationActionData&) override;
         void close(WebKit::WebPageProxy*) override;
         void fullscreenMayReturnToInline(WebKit::WebPageProxy*) override;
         void didEnterFullscreen(WebKit::WebPageProxy*) override;

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm	2016-11-03 20:53:00 UTC (rev 208342)
@@ -149,7 +149,7 @@
 {
 }
 
-RefPtr<WebKit::WebPageProxy> UIDelegate::UIClient::createNewPage(WebKit::WebPageProxy* page, WebKit::WebFrameProxy* initiatingFrame, const WebCore::SecurityOriginData& securityOriginData, const WebCore::ResourceRequest& request, const WebCore::WindowFeatures& windowFeatures, const WebKit::NavigationActionData& navigationActionData)
+PassRefPtr<WebKit::WebPageProxy> UIDelegate::UIClient::createNewPage(WebKit::WebPageProxy* page, WebKit::WebFrameProxy* initiatingFrame, const WebCore::SecurityOriginData& securityOriginData, const WebCore::ResourceRequest& request, const WebCore::WindowFeatures& windowFeatures, const WebKit::NavigationActionData& navigationActionData)
 {
     if (!m_uiDelegate.m_delegateMethods.webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures)
         return nullptr;

Modified: trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm	2016-11-03 20:53:00 UTC (rev 208342)
@@ -39,6 +39,7 @@
 #import <WebGeolocationPosition.h>
 #import <wtf/Assertions.h>
 #import <wtf/HashSet.h>
+#import <wtf/PassRefPtr.h>
 #import <wtf/RefPtr.h>
 #import <wtf/RetainPtr.h>
 
@@ -56,7 +57,7 @@
 @end
 
 @interface WKWebAllowDenyPolicyListener : NSObject<WebAllowDenyPolicyListener>
-- (id)initWithPermissionRequestProxy:(RefPtr<GeolocationPermissionRequestProxy>)permissionRequestProxy;
+- (id)initWithPermissionRequestProxy:(PassRefPtr<GeolocationPermissionRequestProxy>)permissionRequestProxy;
 - (void)denyOnlyThisRequest NO_RETURN_DUE_TO_ASSERT;
 @end
 
@@ -225,7 +226,7 @@
     RefPtr<GeolocationPermissionRequestProxy> _permissionRequestProxy;
 }
 
-- (id)initWithPermissionRequestProxy:(RefPtr<GeolocationPermissionRequestProxy>)permissionRequestProxy
+- (id)initWithPermissionRequestProxy:(PassRefPtr<GeolocationPermissionRequestProxy>)permissionRequestProxy
 {
     self = [super init];
     if (!self)

Modified: trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm (208341 => 208342)


--- trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm	2016-11-03 20:53:00 UTC (rev 208342)
@@ -254,7 +254,7 @@
     _page->setTextIndicatorAnimationProgress(1);
 }
 
-- (RefPtr<API::HitTestResult>)_webHitTestResult
+- (PassRefPtr<API::HitTestResult>)_webHitTestResult
 {
     RefPtr<API::HitTestResult> hitTestResult;
     if (_state == ImmediateActionState::Ready)
@@ -262,7 +262,7 @@
     else
         hitTestResult = _page->lastMouseMoveHitTestResult();
 
-    return hitTestResult;
+    return WTFMove(hitTestResult);
 }
 
 #pragma mark Immediate actions

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (208341 => 208342)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp	2016-11-03 20:53:00 UTC (rev 208342)
@@ -182,7 +182,7 @@
 }
 
 #if ENABLE(CONTEXT_MENUS)
-static Ref<API::Array> contextMenuItems(const WebContextMenu& contextMenu)
+static PassRefPtr<API::Array> contextMenuItems(const WebContextMenu& contextMenu)
 {
     auto items = contextMenu.items();
 
@@ -201,7 +201,7 @@
 #if ENABLE(CONTEXT_MENUS)
     WebContextMenu* contextMenu = toImpl(pageRef)->contextMenu();
 
-    return toAPI(contextMenuItems(*contextMenu));
+    return toAPI(contextMenuItems(*contextMenu).leakRef());
 #else
     UNUSED_PARAM(pageRef);
     return nullptr;
@@ -215,7 +215,7 @@
     if (!contextMenu)
         return nullptr;
 
-    return toAPI(contextMenuItems(*contextMenu));
+    return toAPI(contextMenuItems(*contextMenu).leakRef());
 #else
     UNUSED_PARAM(pageRef);
     UNUSED_PARAM(point);

Modified: trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp (208341 => 208342)


--- trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp	2016-11-03 20:53:00 UTC (rev 208342)
@@ -208,9 +208,9 @@
 #if ENABLE(USER_MESSAGE_HANDLERS)
 class WebUserMessageHandlerDescriptorProxy : public WebCore::UserMessageHandlerDescriptor {
 public:
-    static Ref<WebUserMessageHandlerDescriptorProxy> create(WebUserContentController* controller, const String& name, InjectedBundleScriptWorld& world, uint64_t identifier)
+    static PassRefPtr<WebUserMessageHandlerDescriptorProxy> create(WebUserContentController* controller, const String& name, InjectedBundleScriptWorld& world, uint64_t identifier)
     {
-        return adoptRef(*new WebUserMessageHandlerDescriptorProxy(controller, name, world, identifier));
+        return adoptRef(new WebUserMessageHandlerDescriptorProxy(controller, name, world, identifier));
     }
 
     virtual ~WebUserMessageHandlerDescriptorProxy()

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebUndoStep.cpp (208341 => 208342)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebUndoStep.cpp	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebUndoStep.cpp	2016-11-03 20:53:00 UTC (rev 208342)
@@ -34,9 +34,9 @@
     return uniqueEntryID++;
 }
 
-Ref<WebUndoStep> WebUndoStep::create(RefPtr<WebCore::UndoStep>&& step)
+Ref<WebUndoStep> WebUndoStep::create(PassRefPtr<WebCore::UndoStep> step)
 {
-    return adoptRef(*new WebUndoStep(WTFMove(step), generateUndoStep()));
+    return adoptRef(*new WebUndoStep(step, generateUndoStep()));
 }
 
 WebUndoStep::~WebUndoStep()

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebUndoStep.h (208341 => 208342)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebUndoStep.h	2016-11-03 20:47:57 UTC (rev 208341)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebUndoStep.h	2016-11-03 20:53:00 UTC (rev 208342)
@@ -23,9 +23,11 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#pragma once
+#ifndef WebUndoStep_h
+#define WebUndoStep_h
 
 #include <WebCore/UndoStep.h>
+#include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
 namespace WebKit {
@@ -32,7 +34,7 @@
 
 class WebUndoStep : public RefCounted<WebUndoStep> {
 public:
-    static Ref<WebUndoStep> create(RefPtr<WebCore::UndoStep>&&);
+    static Ref<WebUndoStep> create(PassRefPtr<WebCore::UndoStep>);
     ~WebUndoStep();
 
     WebCore::UndoStep* step() const { return m_step.get(); }
@@ -39,8 +41,8 @@
     uint64_t stepID() const { return m_stepID; }
 
 private:
-    WebUndoStep(RefPtr<WebCore::UndoStep>&& step, uint64_t stepID)
-        : m_step(WTFMove(step))
+    WebUndoStep(PassRefPtr<WebCore::UndoStep> step, uint64_t stepID)
+        : m_step(step)
         , m_stepID(stepID)
     {
     }
@@ -50,3 +52,5 @@
 };
 
 } // namespace WebKit
+
+#endif // WebEditCommand_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to