Deprecate WKBundlePageSetDefersLoading
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 18:52:54 +0000 (18:52 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 18:52:54 +0000 (18:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191394

Reviewed by Dean Jackson.

Source/WebKit:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetDefersLoading):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _defersLoading]):
(-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

Tools:

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setDefersLoading):

LayoutTests:

* platform/wk2/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

index 92df95a..afd05f7 100644 (file)
@@ -1,3 +1,12 @@
+2019-02-07  Alex Christensen  <achristensen@webkit.org>
+
+        Deprecate WKBundlePageSetDefersLoading
+        https://bugs.webkit.org/show_bug.cgi?id=191394
+
+        Reviewed by Dean Jackson.
+
+        * platform/wk2/TestExpectations:
+
 2019-02-07  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
index 9d90be8..a8227f6 100644 (file)
@@ -535,6 +535,9 @@ platform/mac/fast/AppleScript/001.html
 platform/mac/fast/AppleScript/array.html
 platform/mac/fast/AppleScript/date.html
 
+# setDefersLoading is not supported in WK2.
+loader/load-defer.html [ WontFix ]
+
 # WebKitTestRunner doesn't have objCController
 platform/mac/fast/dom/objc-wrapper-identity.html
 platform/mac/fast/dom/wrapper-classes-objc.html
index 1ba08f0..71754d1 100644 (file)
@@ -1,5 +1,20 @@
 2019-02-07  Alex Christensen  <achristensen@webkit.org>
 
+        Deprecate WKBundlePageSetDefersLoading
+        https://bugs.webkit.org/show_bug.cgi?id=191394
+
+        Reviewed by Dean Jackson.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePageSetDefersLoading):
+        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+        (-[WKWebProcessPlugInBrowserContextController _defersLoading]):
+        (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]):
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
+
+2019-02-07  Alex Christensen  <achristensen@webkit.org>
+
         Digital crown should scroll safe browsing warning on watchOS
         https://bugs.webkit.org/show_bug.cgi?id=194363
         <rdar://problem/47348124>
index 400d139..c306610 100644 (file)
@@ -303,9 +303,8 @@ void WKBundlePageStopLoading(WKBundlePageRef pageRef)
     WebKit::toImpl(pageRef)->stopLoading();
 }
 
-void WKBundlePageSetDefersLoading(WKBundlePageRef pageRef, bool defersLoading)
+void WKBundlePageSetDefersLoading(WKBundlePageRef, bool)
 {
-    WebKit::toImpl(pageRef)->setDefersLoading(defersLoading);
 }
 
 WKStringRef WKBundlePageCopyRenderTreeExternalRepresentation(WKBundlePageRef pageRef)
index d38c418..73b826d 100644 (file)
@@ -27,6 +27,7 @@
 #define WKBundlePagePrivate_h
 
 #include <WebKit/WKBase.h>
+#include <WebKit/WKDeprecated.h>
 #include <WebKit/WKEvent.h>
 #include <WebKit/WKGeometry.h>
 #include <WebKit/WKUserContentInjectedFrames.h>
@@ -37,7 +38,7 @@ extern "C" {
 #endif
 
 WK_EXPORT void WKBundlePageStopLoading(WKBundlePageRef page);
-WK_EXPORT void WKBundlePageSetDefersLoading(WKBundlePageRef page, bool defersLoading);
+WK_EXPORT void WKBundlePageSetDefersLoading(WKBundlePageRef page, bool defersLoading) WK_C_API_DEPRECATED;
 WK_EXPORT bool WKBundlePageIsEditingCommandEnabled(WKBundlePageRef page, WKStringRef commandName);
 WK_EXPORT void WKBundlePageClearMainFrameName(WKBundlePageRef page);
 WK_EXPORT void WKBundlePageClose(WKBundlePageRef page);
index da6fd76..7f18c47 100644 (file)
@@ -693,12 +693,11 @@ static inline WKEditorInsertAction toWK(WebCore::EditorInsertAction action)
 
 - (BOOL)_defersLoading
 {
-    return _page->defersLoading();
+    return NO;
 }
 
 - (void)_setDefersLoading:(BOOL)defersLoading
 {
-    _page->setDefersLoading(defersLoading);
 }
 
 - (BOOL)_usesNonPersistentWebsiteDataStore
index 19e9b09..5a8c88d 100644 (file)
@@ -45,7 +45,7 @@
 @property (weak, setter=_setFormDelegate:) id <WKWebProcessPlugInFormDelegatePrivate> _formDelegate;
 @property (weak, setter=_setEditingDelegate:) id <WKWebProcessPlugInEditingDelegate> _editingDelegate WK_API_AVAILABLE(macosx(10.12.3), ios(10.3));
 
-@property (nonatomic, setter=_setDefersLoading:) BOOL _defersLoading;
+@property (nonatomic, setter=_setDefersLoading:) BOOL _defersLoading WK_API_DEPRECATED("No longer supported");
 
 @property (nonatomic, readonly) BOOL _usesNonPersistentWebsiteDataStore;
 
index 91d324d..65913be 100644 (file)
@@ -1,3 +1,13 @@
+2019-02-07  Alex Christensen  <achristensen@webkit.org>
+
+        Deprecate WKBundlePageSetDefersLoading
+        https://bugs.webkit.org/show_bug.cgi?id=191394
+
+        Reviewed by Dean Jackson.
+
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setDefersLoading):
+
 2019-02-07  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
index 3f005ad..3df7e54 100644 (file)
@@ -741,9 +741,8 @@ void TestRunner::setShouldStayOnPageAfterHandlingBeforeUnload(bool shouldStayOnP
     InjectedBundle::singleton().postNewBeforeUnloadReturnValue(!shouldStayOnPage);
 }
 
-void TestRunner::setDefersLoading(bool shouldDeferLoading)
+void TestRunner::setDefersLoading(bool)
 {
-    WKBundlePageSetDefersLoading(InjectedBundle::singleton().page()->page(), shouldDeferLoading);
 }
 
 bool TestRunner::didReceiveServerRedirectForProvisionalNavigation() const