Title: [259507] trunk
Revision
259507
Author
[email protected]
Date
2020-04-03 13:33:48 -0700 (Fri, 03 Apr 2020)

Log Message

Remove _setIsNavigatingToAppBoundDomain testing SPI
https://bugs.webkit.org/show_bug.cgi?id=209973
<rdar://problem/61264350>

Reviewed by David Kilzer.

This SPI is no longer needed to set a webView as navigating to an
app-bound domain. We can now load a local file instead.

Source/WebKit:

No new tests, confirmed behavior by existing tests.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setIsNavigatingToAppBoundDomain:completionHandler:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainTesting): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setIsNavigatingToAppBoundDomainTesting): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (259506 => 259507)


--- trunk/Source/WebKit/ChangeLog	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/ChangeLog	2020-04-03 20:33:48 UTC (rev 259507)
@@ -1,3 +1,27 @@
+2020-04-03  Kate Cheney  <[email protected]>
+
+        Remove _setIsNavigatingToAppBoundDomain testing SPI
+        https://bugs.webkit.org/show_bug.cgi?id=209973
+        <rdar://problem/61264350>
+
+        Reviewed by David Kilzer.
+
+        This SPI is no longer needed to set a webView as navigating to an
+        app-bound domain. We can now load a local file instead.
+
+        No new tests, confirmed behavior by existing tests.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _setIsNavigatingToAppBoundDomain:completionHandler:]): Deleted.
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainTesting): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setIsNavigatingToAppBoundDomainTesting): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+
 2020-04-03  Per Arne Vollan  <[email protected]>
 
         Unreviewed sandbox compile fix.

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (259506 => 259507)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2020-04-03 20:33:48 UTC (rev 259507)
@@ -2702,13 +2702,6 @@
     });
 }
 
-- (void)_setIsNavigatingToAppBoundDomain:(BOOL)isNavigatingToAppBoundDomain completionHandler:(void (^)(void))completionHandler
-{
-    _page->setIsNavigatingToAppBoundDomainTesting(isNavigatingToAppBoundDomain, [completionHandler = makeBlockPtr(completionHandler)]() {
-        completionHandler();
-    });
-}
-
 - (id <_WKInputDelegate>)_inputDelegate
 {
     return _inputDelegate.getAutoreleased();

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (259506 => 259507)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2020-04-03 20:33:48 UTC (rev 259507)
@@ -341,7 +341,6 @@
 - (void)_getProcessDisplayNameWithCompletionHandler:(void (^)(NSString *))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 - (void)_isNavigatingToAppBoundDomain:(void(^)(BOOL))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
-- (void)_setIsNavigatingToAppBoundDomain:(BOOL)isNavigatingToAppBoundDomain completionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 - (void)_grantAccessToPreferenceService WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (259506 => 259507)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-04-03 20:33:48 UTC (rev 259507)
@@ -3142,11 +3142,6 @@
 #endif
 }
 
-void WebPageProxy::setIsNavigatingToAppBoundDomainTesting(bool isNavigatingToAppBoundDomain, CompletionHandler<void()>&& completionHandler)
-{
-    sendWithAsyncReply(Messages::WebPage::SetIsNavigatingToAppBoundDomainTesting(isNavigatingToAppBoundDomain), WTFMove(completionHandler));
-}
-
 void WebPageProxy::isNavigatingToAppBoundDomainTesting(CompletionHandler<void(bool)>&& completionHandler)
 {
     completionHandler(m_isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::Yes);

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (259506 => 259507)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2020-04-03 20:33:48 UTC (rev 259507)
@@ -1713,7 +1713,6 @@
 
     void setShouldFireResizeEvents(bool);
 
-    void setIsNavigatingToAppBoundDomainTesting(bool, CompletionHandler<void()>&&);
     void isNavigatingToAppBoundDomainTesting(CompletionHandler<void(bool)>&&);
     NavigatingToAppBoundDomain isNavigatingToAppBoundDomain() const { return m_isNavigatingToAppBoundDomain; }
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (259506 => 259507)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2020-04-03 20:33:48 UTC (rev 259507)
@@ -7039,12 +7039,6 @@
     return false;
 }
 
-void WebPage::setIsNavigatingToAppBoundDomainTesting(bool isNavigatingToAppBoundDomain, CompletionHandler<void()>&& completionHandler)
-{
-    m_isNavigatingToAppBoundDomain = isNavigatingToAppBoundDomain ? NavigatingToAppBoundDomain::Yes : NavigatingToAppBoundDomain::No;
-    completionHandler();
-}
-
 } // namespace WebKit
 
 #undef RELEASE_LOG_IF_ALLOWED

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (259506 => 259507)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2020-04-03 20:33:48 UTC (rev 259507)
@@ -1300,7 +1300,6 @@
 
     void getAllFrames(CompletionHandler<void(FrameTreeNodeData&&)>&&);
 
-    void setIsNavigatingToAppBoundDomainTesting(bool, CompletionHandler<void()>&&);
     void setIsNavigatingToAppBoundDomain(NavigatingToAppBoundDomain isNavigatingToAppBoundDomain) { m_isNavigatingToAppBoundDomain = isNavigatingToAppBoundDomain; }
     NavigatingToAppBoundDomain isNavigatingToAppBoundDomain() const { return m_isNavigatingToAppBoundDomain; }
     NavigatedAwayFromAppBoundDomain hasNavigatedAwayFromAppBoundDomain() const { return m_hasNavigatedAwayFromAppBoundDomain; }

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (259506 => 259507)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in	2020-04-03 20:33:48 UTC (rev 259507)
@@ -602,6 +602,4 @@
     SetShouldFireResizeEvents(bool shouldFireResizeEvents)
 
     SetHasResourceLoadClient(bool has)
-    SetIsNavigatingToAppBoundDomainTesting(bool isNavigatingToAppBoundDomain) -> () Async
-
 }

Modified: trunk/Tools/ChangeLog (259506 => 259507)


--- trunk/Tools/ChangeLog	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Tools/ChangeLog	2020-04-03 20:33:48 UTC (rev 259507)
@@ -1,3 +1,18 @@
+2020-04-03  Kate Cheney  <[email protected]>
+
+        Remove _setIsNavigatingToAppBoundDomain testing SPI
+        https://bugs.webkit.org/show_bug.cgi?id=209973
+        <rdar://problem/61264350>
+
+        Reviewed by David Kilzer.
+
+        This SPI is no longer needed to set a webView as navigating to an
+        app-bound domain. We can now load a local file instead.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
+        (TEST):
+        * TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html:
+
 2020-04-03  David Kilzer  <[email protected]>
 
         [Xcode] Replace ASAN_OTHER_CFLAGS and ASAN_OTHER_CPLUSPLUSFLAGS with $(inherited)

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (259506 => 259507)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm	2020-04-03 20:33:48 UTC (rev 259507)
@@ -236,11 +236,9 @@
     isDone = false;
     TestWebKitAPI::Util::run(&isDone);
 
-    isDone = false;
-    [webView _setIsNavigatingToAppBoundDomain:YES completionHandler: ^(void) {
-        isDone = true;
-    }];
-    TestWebKitAPI::Util::run(&isDone);
+    request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"in-app-browser-privacy-local-file" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+    [webView loadRequest:request];
+    [webView _test_waitForDidFinishNavigation];
     
     isDone = false;
     [configuration.userContentController _addUserScriptImmediately:userScript.get()];

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html (259506 => 259507)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html	2020-04-03 20:28:15 UTC (rev 259506)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/in-app-browser-privacy-local-file.html	2020-04-03 20:33:48 UTC (rev 259507)
@@ -5,5 +5,6 @@
 <script>
     if (window.webkit.messageHandlers)
         window.webkit.messageHandlers.testHandler.postMessage('Passed');
+    window.wkUserScriptInjected = true;
 </script>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to