Changeset 221026 in webkit
- Timestamp:
- Aug 22, 2017 11:12:10 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r221024 r221026 1 2017-08-22 Alex Christensen <achristensen@webkit.org> 2 3 Add UIDelegatePrivate SPI corresponding to WKPageUIClient.showPage 4 https://bugs.webkit.org/show_bug.cgi?id=175797 5 <rdar://problem/29270035> 6 7 Reviewed by Geoffrey Garen. 8 9 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: 10 * UIProcess/Cocoa/UIDelegate.h: 11 * UIProcess/Cocoa/UIDelegate.mm: 12 (WebKit::UIDelegate::setDelegate): 13 (WebKit::UIDelegate::UIClient::showPage): 14 * WebProcess/WebPage/WebPage.cpp: 15 (WebKit::WebPage::registerURLSchemeHandler): 16 window.open, createWebViewWithConfiguration, and WKURLSchemeHandlers all used together 17 make it so that URLSchemeHandlers are added to WebPages that already have them. The 18 assertions are no longer valid. 19 1 20 2017-08-22 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
r220443 r221026 62 62 - (void)_webView:(WKWebView *)webView printFrame:(_WKFrameHandle *)frame; 63 63 64 - (void)_showPage:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); 64 65 - (void)_webViewClose:(WKWebView *)webView; 65 66 - (void)_webViewFullscreenMayReturnToInline:(WKWebView *)webView; -
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
r219871 r221026 80 80 private: 81 81 // API::UIClient 82 RefPtr<Web Kit::WebPageProxy> createNewPage(WebKit::WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, WebKit::NavigationActionData&&) override;83 void createNewPageAsync(Web Kit::WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, WebKit::NavigationActionData&&, WTF::Function<void(RefPtr<WebKit::WebPageProxy>&&)>&& completionHandler) final;82 RefPtr<WebPageProxy> createNewPage(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&) final; 83 void createNewPageAsync(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&, WTF::Function<void(RefPtr<WebPageProxy>&&)>&& completionHandler) final; 84 84 bool canCreateNewPageAsync() final; 85 RefPtr<WebKit::WebPageProxy> createNewPageCommon(WebKit::WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, WebKit::NavigationActionData&&, WTF::Function<void(RefPtr<WebKit::WebPageProxy>&&)>&& completionHandler); 85 void showPage(WebPageProxy*) final; 86 RefPtr<WebPageProxy> createNewPageCommon(WebPageProxy*, API::FrameInfo&, WebCore::ResourceRequest&&, const WebCore::WindowFeatures&, NavigationActionData&&, WTF::Function<void(RefPtr<WebPageProxy>&&)>&& completionHandler); 86 87 87 88 void close(WebKit::WebPageProxy*) override; … … 132 133 bool webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures : 1; 133 134 bool webViewCreateWebViewWithConfigurationForNavigationActionWindowFeaturesAsync : 1; 135 bool showPage : 1; 134 136 bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1; 135 137 bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1; -
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
r219871 r221026 95 95 m_delegateMethods.webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures = [delegate respondsToSelector:@selector(webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:)]; 96 96 m_delegateMethods.webViewCreateWebViewWithConfigurationForNavigationActionWindowFeaturesAsync = [delegate respondsToSelector:@selector(_webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:completionHandler:)]; 97 m_delegateMethods.showPage = [delegate respondsToSelector:@selector(_showPage:)]; 97 98 m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)]; 98 99 m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)]; … … 249 250 250 251 createNewPageCommon(page, originatingFrameInfo, WTFMove(request), windowFeatures, WTFMove(navigationActionData), WTFMove(completionHandler)); 252 } 253 254 void UIDelegate::UIClient::showPage(WebPageProxy*) 255 { 256 if (!m_uiDelegate.m_delegateMethods.showPage) 257 return; 258 auto delegate = m_uiDelegate.m_delegate.get(); 259 ASSERT(delegate); 260 [(id <WKUIDelegatePrivate>)delegate _showPage:m_uiDelegate.m_webView]; 251 261 } 252 262 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r220887 r221026 5933 5933 { 5934 5934 auto schemeResult = m_schemeToURLSchemeHandlerProxyMap.add(scheme, WebURLSchemeHandlerProxy::create(*this, handlerIdentifier)); 5935 ASSERT(schemeResult.isNewEntry); 5936 5937 auto identifierResult = m_identifierToURLSchemeHandlerProxyMap.add(handlerIdentifier, schemeResult.iterator->value.get()); 5938 ASSERT_UNUSED(identifierResult, identifierResult.isNewEntry); 5935 m_identifierToURLSchemeHandlerProxyMap.add(handlerIdentifier, schemeResult.iterator->value.get()); 5939 5936 } 5940 5937 -
trunk/Tools/ChangeLog
r221011 r221026 1 2017-08-22 Alex Christensen <achristensen@webkit.org> 2 3 Add UIDelegatePrivate SPI corresponding to WKPageUIClient.showPage 4 https://bugs.webkit.org/show_bug.cgi?id=175797 5 <rdar://problem/29270035> 6 7 Reviewed by Geoffrey Garen. 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/WebKit2Cocoa/UIDelegate.mm: Added. 11 (-[UITestDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]): 12 (-[UITestDelegate _showPage:]): 13 (-[UITestDelegate webView:startURLSchemeTask:]): 14 (-[UITestDelegate webView:stopURLSchemeTask:]): 15 (TEST): 16 1 17 2017-08-22 Jonathan Bedard <jbedard@apple.com> 2 18 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r220964 r221026 233 233 5C9E59421D3EB5AC00E3C62E /* ApplicationCache.db-shm in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */; }; 234 234 5C9E59431D3EB5AC00E3C62E /* ApplicationCache.db-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */; }; 235 5CB40B4E1F4B98D3007DC7B9 /* UIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */; }; 235 236 5CE354D91E70DA5C00BEFE3B /* WKContentExtensionStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */; }; 236 237 5E4B1D2E1D404C6100053621 /* WKScrollViewDelegateCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E4B1D2C1D404C6100053621 /* WKScrollViewDelegateCrash.mm */; }; … … 1304 1305 5C9E593F1D3EB1DE00E3C62E /* ApplicationCache.db-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ApplicationCache.db-shm"; sourceTree = "<group>"; }; 1305 1306 5C9E59401D3EB1DE00E3C62E /* ApplicationCache.db-wal */ = {isa = PBXFileReference; lastKnownFileType = file; path = "ApplicationCache.db-wal"; sourceTree = "<group>"; }; 1307 5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIDelegate.mm; sourceTree = "<group>"; }; 1306 1308 5CE354D81E70D9C300BEFE3B /* WKContentExtensionStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContentExtensionStore.mm; sourceTree = "<group>"; }; 1307 1309 5E4B1D2C1D404C6100053621 /* WKScrollViewDelegateCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKScrollViewDelegateCrash.mm; path = ../ios/WKScrollViewDelegateCrash.mm; sourceTree = "<group>"; }; … … 1942 1944 2DFF7B6C1DA487AF00814614 /* SnapshotStore.mm */, 1943 1945 515BE1701D428BD100DD7C68 /* StoreBlobThenDelete.mm */, 1946 5CB40B4D1F4B98BE007DC7B9 /* UIDelegate.mm */, 1944 1947 7CC3E1FA197E234100BE6252 /* UserContentController.mm */, 1945 1948 7C882E031C80C624006BF731 /* UserContentWorld.mm */, … … 3313 3316 7CCE7EDD1A411A9200447C4C /* TimeRanges.cpp in Sources */, 3314 3317 7CCE7ED31A411A7E00447C4C /* TypingStyleCrash.mm in Sources */, 3318 5CB40B4E1F4B98D3007DC7B9 /* UIDelegate.mm in Sources */, 3315 3319 F46849BE1EEF58E400B937FE /* UIPasteboardTests.mm in Sources */, 3316 3320 7CCE7EDE1A411A9200447C4C /* URL.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.