Title: [221047] trunk
Revision
221047
Author
[email protected]
Date
2017-08-22 14:10:12 -0700 (Tue, 22 Aug 2017)

Log Message

Unreviewed, rolling out r221026.

This caused a consistent API failure on iOS Simulator.

Reverted changeset:

"Add UIDelegatePrivate SPI corresponding to
WKPageUIClient.showPage"
https://bugs.webkit.org/show_bug.cgi?id=175797
http://trac.webkit.org/changeset/221026

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (221046 => 221047)


--- trunk/Source/WebKit/ChangeLog	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Source/WebKit/ChangeLog	2017-08-22 21:10:12 UTC (rev 221047)
@@ -1,3 +1,16 @@
+2017-08-22  Matt Lewis  <[email protected]>
+
+        Unreviewed, rolling out r221026.
+
+        This caused a consistent API failure on iOS Simulator.
+
+        Reverted changeset:
+
+        "Add UIDelegatePrivate SPI corresponding to
+        WKPageUIClient.showPage"
+        https://bugs.webkit.org/show_bug.cgi?id=175797
+        http://trac.webkit.org/changeset/221026
+
 2017-08-22  Ryan Haddad  <[email protected]>
 
         Unreviewed, rolling out r221027.

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (221046 => 221047)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h	2017-08-22 21:10:12 UTC (rev 221047)
@@ -61,7 +61,6 @@
 
 - (void)_webView:(WKWebView *)webView printFrame:(_WKFrameHandle *)frame;
 
-- (void)_showPage:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 - (void)_webViewClose:(WKWebView *)webView;
 - (void)_webViewFullscreenMayReturnToInline:(WKWebView *)webView;
 - (void)_webViewDidEnterFullscreen:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.11), ios(8.3));

Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h (221046 => 221047)


--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h	2017-08-22 21:10:12 UTC (rev 221047)
@@ -79,11 +79,10 @@
 
     private:
         // API::UIClient
-        RefPtr<WebPageProxy> createNewPage(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&) final;
-        void createNewPageAsync(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&, WTF::Function<void(RefPtr<WebPageProxy>&&)>&& completionHandler) final;
+        RefPtr<WebKit::WebPageProxy> createNewPage(WebKit::WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, WebKit::NavigationActionData&&) override;
+        void createNewPageAsync(WebKit::WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, WebKit::NavigationActionData&&, WTF::Function<void(RefPtr<WebKit::WebPageProxy>&&)>&& completionHandler) final;
         bool canCreateNewPageAsync() final;
-        void showPage(WebPageProxy*) final;
-        RefPtr<WebPageProxy> createNewPageCommon(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&, WTF::Function<void(RefPtr<WebPageProxy>&&)>&& completionHandler);
+        RefPtr<WebKit::WebPageProxy> createNewPageCommon(WebKit::WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, WebKit::NavigationActionData&&, WTF::Function<void(RefPtr<WebKit::WebPageProxy>&&)>&& completionHandler);
 
         void close(WebKit::WebPageProxy*) override;
         void fullscreenMayReturnToInline(WebKit::WebPageProxy*) override;
@@ -132,7 +131,6 @@
     struct {
         bool webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures : 1;
         bool webViewCreateWebViewWithConfigurationForNavigationActionWindowFeaturesAsync : 1;
-        bool showPage : 1;
         bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1;
         bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
         bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm (221046 => 221047)


--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm	2017-08-22 21:10:12 UTC (rev 221047)
@@ -94,7 +94,6 @@
 
     m_delegateMethods.webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures = [delegate respondsToSelector:@selector(webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:)];
     m_delegateMethods.webViewCreateWebViewWithConfigurationForNavigationActionWindowFeaturesAsync = [delegate respondsToSelector:@selector(_webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:completionHandler:)];
-    m_delegateMethods.showPage = [delegate respondsToSelector:@selector(_showPage:)];
     m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)];
     m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
     m_delegateMethods.webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)];
@@ -251,15 +250,6 @@
     createNewPageCommon(page, originatingFrameInfo, WTFMove(request), windowFeatures, WTFMove(navigationActionData), WTFMove(completionHandler));
 }
 
-void UIDelegate::UIClient::showPage(WebPageProxy*)
-{
-    if (!m_uiDelegate.m_delegateMethods.showPage)
-        return;
-    auto delegate = m_uiDelegate.m_delegate.get();
-    ASSERT(delegate);
-    [(id <WKUIDelegatePrivate>)delegate _showPage:m_uiDelegate.m_webView];
-}
-
 void UIDelegate::UIClient::runJavaScriptAlert(WebKit::WebPageProxy*, const WTF::String& message, WebKit::WebFrameProxy* webFrameProxy, const WebCore::SecurityOriginData& securityOriginData, Function<void ()>&& completionHandler)
 {
     if (!m_uiDelegate.m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler) {

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (221046 => 221047)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2017-08-22 21:10:12 UTC (rev 221047)
@@ -5932,7 +5932,10 @@
 void WebPage::registerURLSchemeHandler(uint64_t handlerIdentifier, const String& scheme)
 {
     auto schemeResult = m_schemeToURLSchemeHandlerProxyMap.add(scheme, WebURLSchemeHandlerProxy::create(*this, handlerIdentifier));
-    m_identifierToURLSchemeHandlerProxyMap.add(handlerIdentifier, schemeResult.iterator->value.get());
+    ASSERT(schemeResult.isNewEntry);
+
+    auto identifierResult = m_identifierToURLSchemeHandlerProxyMap.add(handlerIdentifier, schemeResult.iterator->value.get());
+    ASSERT_UNUSED(identifierResult, identifierResult.isNewEntry);
 }
 
 void WebPage::urlSchemeTaskDidPerformRedirection(uint64_t handlerIdentifier, uint64_t taskIdentifier, ResourceResponse&& response, ResourceRequest&& request)

Modified: trunk/Tools/ChangeLog (221046 => 221047)


--- trunk/Tools/ChangeLog	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Tools/ChangeLog	2017-08-22 21:10:12 UTC (rev 221047)
@@ -1,3 +1,16 @@
+2017-08-22  Matt Lewis  <[email protected]>
+
+        Unreviewed, rolling out r221026.
+
+        This caused a consistent API failure on iOS Simulator.
+
+        Reverted changeset:
+
+        "Add UIDelegatePrivate SPI corresponding to
+        WKPageUIClient.showPage"
+        https://bugs.webkit.org/show_bug.cgi?id=175797
+        http://trac.webkit.org/changeset/221026
+
 2017-08-22  Alex Christensen  <[email protected]>
 
         Add UIDelegatePrivate SPI corresponding to WKPageUIClient.showPage

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (221046 => 221047)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2017-08-22 21:10:12 UTC (rev 221047)
@@ -232,7 +232,6 @@
 		5C9E59411D3EB5AC00E3C62E /* ApplicationCache.db in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E593E1D3EB1DE00E3C62E /* ApplicationCache.db */; };
 		5C9E59421D3EB5AC00E3C62E /* ApplicationCache.db-shm in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */; };
 		5C9E59431D3EB5AC00E3C62E /* ApplicationCache.db-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */; };
-		5CB40B4E1F4B98D3007DC7B9 /* UIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */; };
 		5CE354D91E70DA5C00BEFE3B /* WKContentExtensionStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */; };
 		5E4B1D2E1D404C6100053621 /* WKScrollViewDelegateCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E4B1D2C1D404C6100053621 /* WKScrollViewDelegateCrash.mm */; };
 		631EFFF61E7B5E8D00D2EBB8 /* Geolocation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 631EFFF51E7B5E8D00D2EBB8 /* Geolocation.mm */; };
@@ -1304,7 +1303,6 @@
 		5C9E593E1D3EB1DE00E3C62E /* ApplicationCache.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = ApplicationCache.db; sourceTree = "<group>"; };
 		5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ApplicationCache.db-shm"; sourceTree = "<group>"; };
 		5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ApplicationCache.db-wal"; sourceTree = "<group>"; };
-		5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIDelegate.mm; sourceTree = "<group>"; };
 		5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContentExtensionStore.mm; sourceTree = "<group>"; };
 		5E4B1D2C1D404C6100053621 /* WKScrollViewDelegateCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKScrollViewDelegateCrash.mm; path = ../ios/WKScrollViewDelegateCrash.mm; sourceTree = "<group>"; };
 		631EFFF51E7B5E8D00D2EBB8 /* Geolocation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Geolocation.mm; sourceTree = "<group>"; };
@@ -1943,7 +1941,6 @@
 				2D9A53AE1B31FA8D0074D5AA /* ShrinkToFit.mm */,
 				2DFF7B6C1DA487AF00814614 /* SnapshotStore.mm */,
 				515BE1701D428BD100DD7C68 /* StoreBlobThenDelete.mm */,
-				5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */,
 				7CC3E1FA197E234100BE6252 /* UserContentController.mm */,
 				7C882E031C80C624006BF731 /* UserContentWorld.mm */,
 				7C882E041C80C624006BF731 /* UserContentWorldPlugIn.mm */,
@@ -3315,7 +3312,6 @@
 				CE3524F91B1441C40028A7C5 /* TextFieldDidBeginAndEndEditing.cpp in Sources */,
 				7CCE7EDD1A411A9200447C4C /* TimeRanges.cpp in Sources */,
 				7CCE7ED31A411A7E00447C4C /* TypingStyleCrash.mm in Sources */,
-				5CB40B4E1F4B98D3007DC7B9 /* UIDelegate.mm in Sources */,
 				F46849BE1EEF58E400B937FE /* UIPasteboardTests.mm in Sources */,
 				7CCE7EDE1A411A9200447C4C /* URL.cpp in Sources */,
 				7CCE7EB01A411A4400447C4C /* URLExtras.mm in Sources */,

Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/UIDelegate.mm (221046 => 221047)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/UIDelegate.mm	2017-08-22 21:04:59 UTC (rev 221046)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/UIDelegate.mm	2017-08-22 21:10:12 UTC (rev 221047)
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-
-#if WK_API_ENABLED
-
-#import "TestWKWebView.h"
-#import "Utilities.h"
-#import <WebKit/WKUIDelegatePrivate.h>
-#import <WebKit/WKWebView.h>
-#import <wtf/RetainPtr.h>
-
-@class UITestDelegate;
-
-static RetainPtr<WKWebView> webViewFromDelegateCallback;
-static RetainPtr<WKWebView> createdWebView;
-static RetainPtr<UITestDelegate> delegate;
-static bool done;
-
-@interface UITestDelegate : NSObject <WKUIDelegatePrivate, WKURLSchemeHandler>
-@end
-
-@implementation UITestDelegate
-
-- (nullable WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
-{
-    createdWebView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600) configuration:configuration]);
-    [createdWebView setUIDelegate:delegate.get()];
-    return createdWebView.get();
-}
-
-- (void)_showPage:(WKWebView *)webView
-{
-    webViewFromDelegateCallback = webView;
-    done = true;
-}
-
-- (void)webView:(WKWebView *)webView startURLSchemeTask:(id <WKURLSchemeTask>)urlSchemeTask
-{
-    NSString *data = ""
-    [urlSchemeTask didReceiveResponse:[[[NSURLResponse alloc] initWithURL:urlSchemeTask.request.URL MIMEType:@"text/html" expectedContentLength:data.length textEncodingName:nil] autorelease]];
-    [urlSchemeTask didReceiveData:[data dataUsingEncoding:NSUTF8StringEncoding]];
-    [urlSchemeTask didFinish];
-}
-
-- (void)webView:(WKWebView *)webView stopURLSchemeTask:(id <WKURLSchemeTask>)urlSchemeTask
-{
-}
-
-@end
-
-TEST(WebKit2, ShowPage)
-{
-    delegate = adoptNS([[UITestDelegate alloc] init]);
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    [configuration setURLSchemeHandler:delegate.get() forURLScheme:@"test"];
-    auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600) configuration:configuration.get()]);
-    [webView setUIDelegate:delegate.get()];
-    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"test:///first"]]];
-    TestWebKitAPI::Util::run(&done);
-    
-    ASSERT_EQ(webViewFromDelegateCallback, createdWebView);
-}
-
-#endif // WK_API_ENABLED
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to