Title: [221486] trunk
Revision
221486
Author
[email protected]
Date
2017-09-01 11:47:41 -0700 (Fri, 01 Sep 2017)

Log Message

Disable ObjC WebGL policy SPI on iOS
https://bugs.webkit.org/show_bug.cgi?id=176233

Reviewed by Tim Horton.
Source/WebKit:

        
In r221465 I uploaded new SPI that is only needed on Mac with a beautiful test that only works on Mac.
Since it fails on iOS and is not needed on iOS, let's just disable it on iOS.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):

Tools:


* TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (221485 => 221486)


--- trunk/Source/WebKit/ChangeLog	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/ChangeLog	2017-09-01 18:47:41 UTC (rev 221486)
@@ -1,3 +1,18 @@
+2017-09-01  Alex Christensen  <[email protected]>
+
+        Disable ObjC WebGL policy SPI on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=176233
+
+        Reviewed by Tim Horton.
+        
+        In r221465 I uploaded new SPI that is only needed on Mac with a beautiful test that only works on Mac.
+        Since it fails on iOS and is not needed on iOS, let's just disable it on iOS.
+
+        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::setNavigationDelegate):
+
 2017-09-01  Andy Estes  <[email protected]>
 
         [CG] Upstream CoreGraphics-related WebKitSystemInterface functions

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h (221485 => 221486)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2017-09-01 18:47:41 UTC (rev 221486)
@@ -33,11 +33,13 @@
 
 @class _WKWebsitePolicies;
 
+#if !TARGET_OS_IPHONE
 typedef NS_ENUM(NSInteger, _WKWebGLLoadPolicy) {
     _WKWebGLLoadPolicyBlockCreation,
     _WKWebGLLoadPolicyAllowCreation,
     _WKWebGLLoadPolicyPendingCreation,
-} WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+} WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+#endif
 
 static const WKNavigationActionPolicy _WKNavigationActionPolicyDownload = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 1);
 static const WKNavigationActionPolicy WK_API_AVAILABLE(macosx(10.11), ios(9.0)) _WKNavigationActionPolicyAllowWithoutTryingAppLink = (WKNavigationActionPolicy)(WKNavigationActionPolicyAllow + 2);
@@ -80,11 +82,11 @@
 - (void)_webView:(WKWebView *)webView didStartLoadForQuickLookDocumentInMainFrameWithFileName:(NSString *)fileName uti:(NSString *)uti;
 - (void)_webView:(WKWebView *)webView didFinishLoadForQuickLookDocumentInMainFrame:(NSData *)documentData;
 - (void)_webViewDidRequestPasswordForQuickLookDocument:(WKWebView *)webView WK_API_AVAILABLE(ios(WK_IOS_TBA));
+#else
+- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
+- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
 #endif
 
-- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
-- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
-
 @end
 
 #endif

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (221485 => 221486)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2017-09-01 18:47:41 UTC (rev 221486)
@@ -116,7 +116,7 @@
         void didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData&) override;
 #endif
 
-#if ENABLE(WEBGL)
+#if ENABLE(WEBGL) && 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;
 #endif
@@ -207,7 +207,7 @@
         bool webViewDidRequestPasswordForQuickLookDocument : 1;
 #endif
 
-#if ENABLE(WEBGL)
+#if ENABLE(WEBGL) && PLATFORM(MAC)
         bool webViewWebGLLoadPolicyForURL : 1;
         bool webViewResolveWebGLLoadPolicyForURL : 1;
 #endif

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (221485 => 221486)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2017-09-01 18:47:41 UTC (rev 221486)
@@ -173,7 +173,7 @@
     m_navigationDelegateMethods.webViewDidFinishLoadForQuickLookDocumentInMainFrame = [delegate respondsToSelector:@selector(_webView:didFinishLoadForQuickLookDocumentInMainFrame:)];
     m_navigationDelegateMethods.webViewDidRequestPasswordForQuickLookDocument = [delegate respondsToSelector:@selector(_webViewDidRequestPasswordForQuickLookDocument:)];
 #endif
-#if ENABLE(WEBGL)
+#if ENABLE(WEBGL) && PLATFORM(MAC)
     m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:webGLLoadPolicyForURL:decisionHandler:)];
     m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:)];
 #endif
@@ -289,6 +289,7 @@
 {
 }
 
+#if PLATFORM(MAC)
 inline WebCore::WebGLLoadPolicy toWebCoreWebGLLoadPolicy(_WKWebGLLoadPolicy policy)
 {
     switch (policy) {
@@ -333,6 +334,7 @@
         completionHandler(toWebCoreWebGLLoadPolicy(policy));
     }).get()];
 }
+#endif
 
 static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const String& currentMainFrameURL, WTF::Function<void(bool)>&& completionHandler)
 {

Modified: trunk/Tools/ChangeLog (221485 => 221486)


--- trunk/Tools/ChangeLog	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Tools/ChangeLog	2017-09-01 18:47:41 UTC (rev 221486)
@@ -1,3 +1,12 @@
+2017-09-01  Alex Christensen  <[email protected]>
+
+        Disable ObjC WebGL policy SPI on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=176233
+
+        Reviewed by Tim Horton.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm:
+
 2017-08-31  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Improve the way unit test are run and the results reported

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm (221485 => 221486)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm	2017-09-01 18:37:28 UTC (rev 221485)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebGLPolicy.mm	2017-09-01 18:47:41 UTC (rev 221486)
@@ -25,7 +25,7 @@
 
 #import "config.h"
 
-#if WK_API_ENABLED
+#if WK_API_ENABLED && PLATFORM(MAC)
 
 #import "TestWKWebView.h"
 #import "Utilities.h"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to