Diff
Modified: trunk/Source/WebKit/ChangeLog (235615 => 235616)
--- trunk/Source/WebKit/ChangeLog 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/ChangeLog 2018-09-04 17:06:52 UTC (rev 235616)
@@ -1,3 +1,23 @@
+2018-09-04 Alex Christensen <achristen...@webkit.org>
+
+ Clean up WebGL policy getting code path
+ https://bugs.webkit.org/show_bug.cgi?id=189003
+
+ Reviewed by Darin Adler.
+
+ * UIProcess/API/APINavigationClient.h:
+ (API::NavigationClient::webGLLoadPolicy const):
+ (API::NavigationClient::resolveWebGLLoadPolicy const):
+ * UIProcess/Cocoa/NavigationState.h:
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
+ (WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::webGLPolicyForURL): Deleted.
+ (WebKit::WebPage::resolveWebGLPolicyForURL): Deleted.
+
2018-09-04 Zan Dobersek <zdober...@igalia.com>
REGRESSION(r235165): [GStreamer] Major video performance regression
Modified: trunk/Source/WebKit/UIProcess/API/APINavigationClient.h (235615 => 235616)
--- trunk/Source/WebKit/UIProcess/API/APINavigationClient.h 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/UIProcess/API/APINavigationClient.h 2018-09-04 17:06:52 UTC (rev 235616)
@@ -124,8 +124,8 @@
#endif
#if ENABLE(WEBGL)
- virtual void webGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
- virtual void resolveWebGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
+ virtual void webGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
+ virtual void resolveWebGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
#endif
virtual bool willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&, bool inPageCache, Object*) { return false; }
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (235615 => 235616)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h 2018-09-04 17:06:52 UTC (rev 235616)
@@ -123,8 +123,8 @@
#endif
#if PLATFORM(MAC)
- void webGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const final;
- void resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const final;
+ void webGLLoadPolicy(WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
+ void resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inPageCache, API::Object*) final;
bool didFailToInitializePlugIn(WebPageProxy&, API::Dictionary&) final;
bool didBlockInsecurePluginVersion(WebPageProxy&, API::Dictionary&) final;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (235615 => 235616)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2018-09-04 17:06:52 UTC (rev 235616)
@@ -391,7 +391,7 @@
return WebCore::WebGLAllowCreation;
}
-void NavigationState::NavigationClient::webGLLoadPolicy(WebPageProxy&, const WebCore::URL& url, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const
+void NavigationState::NavigationClient::webGLLoadPolicy(WebPageProxy&, const WebCore::URL& url, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const
{
if (!m_navigationState.m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL) {
completionHandler(WebGLAllowCreation);
@@ -399,8 +399,8 @@
}
auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
- Ref<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:webGLLoadPolicyForURL:decisionHandler:));
- [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:BlockPtr<void(_WKWebGLLoadPolicy)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKWebGLLoadPolicy policy) {
+ auto checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:webGLLoadPolicyForURL:decisionHandler:));
+ [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:BlockPtr<void(_WKWebGLLoadPolicy)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKWebGLLoadPolicy policy) mutable {
if (checker->completionHandlerHasBeenCalled())
return;
checker->didCallCompletionHandler();
@@ -408,7 +408,7 @@
}).get()];
}
-void NavigationState::NavigationClient::resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL& url, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const
+void NavigationState::NavigationClient::resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL& url, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const
{
if (!m_navigationState.m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL) {
completionHandler(WebGLAllowCreation);
@@ -416,8 +416,8 @@
}
auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
- Ref<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:));
- [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:BlockPtr<void(_WKWebGLLoadPolicy)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKWebGLLoadPolicy policy) {
+ auto checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:));
+ [(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:BlockPtr<void(_WKWebGLLoadPolicy)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](_WKWebGLLoadPolicy policy) mutable {
if (checker->completionHandlerHasBeenCalled())
return;
checker->didCallCompletionHandler();
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (235615 => 235616)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-09-04 17:06:52 UTC (rev 235616)
@@ -883,7 +883,7 @@
}
#endif // ENABLE(NETSCAPE_PLUGIN_API)
-#if ENABLE(WEBGL) && !PLATFORM(COCOA)
+#if ENABLE(WEBGL) && !PLATFORM(MAC)
WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const URL&)
{
return WebGLAllowCreation;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (235615 => 235616)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-09-04 17:06:52 UTC (rev 235616)
@@ -1697,10 +1697,6 @@
uint64_t m_pendingNavigationID { 0 };
-#if ENABLE(WEBGL)
- WebCore::WebGLLoadPolicy m_systemWebGLPolicy { WebCore::WebGLAllowCreation };
-#endif
-
bool m_mainFrameProgressCompleted { false };
bool m_shouldDispatchFakeMouseMoveEvents { true };
bool m_isEditorStateMissingPostLayoutData { false };
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (235615 => 235616)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-09-04 17:02:33 UTC (rev 235615)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-09-04 17:06:52 UTC (rev 235616)
@@ -3029,18 +3029,6 @@
m_userHasChangedPageScaleFactor = true;
}
-#if ENABLE(WEBGL)
-WebCore::WebGLLoadPolicy WebPage::webGLPolicyForURL(WebFrame*, const URL&)
-{
- return WebGLAllowCreation;
-}
-
-WebCore::WebGLLoadPolicy WebPage::resolveWebGLPolicyForURL(WebFrame*, const URL&)
-{
- return WebGLAllowCreation;
-}
-#endif
-
#if ENABLE(IOS_TOUCH_EVENTS)
void WebPage::dispatchAsynchronousTouchEvents(const Vector<WebTouchEvent, 1>& queue)
{