Title: [237885] trunk/Source/WebKit
Revision
237885
Author
achristen...@apple.com
Date
2018-11-06 13:53:21 -0800 (Tue, 06 Nov 2018)

Log Message

Add ObjC SPI equivalent of WKContextHandlesSafeBrowsing
https://bugs.webkit.org/show_bug.cgi?id=191329

Reviewed by Tim Horton.

Like WKContextHandlesSafeBrowsing, this is so I can make one change in WebKit and enable safe browsing
in WKWebView and disable it in Safari at the same time without broken revisions between landing two changes
in two repositories.

* UIProcess/API/Cocoa/WKWebView.mm:
(+[WKWebView handlesSafeBrowsing]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (237884 => 237885)


--- trunk/Source/WebKit/ChangeLog	2018-11-06 21:45:40 UTC (rev 237884)
+++ trunk/Source/WebKit/ChangeLog	2018-11-06 21:53:21 UTC (rev 237885)
@@ -1,3 +1,18 @@
+2018-11-06  Alex Christensen  <achristen...@webkit.org>
+
+        Add ObjC SPI equivalent of WKContextHandlesSafeBrowsing
+        https://bugs.webkit.org/show_bug.cgi?id=191329
+
+        Reviewed by Tim Horton.
+
+        Like WKContextHandlesSafeBrowsing, this is so I can make one change in WebKit and enable safe browsing
+        in WKWebView and disable it in Safari at the same time without broken revisions between landing two changes
+        in two repositories.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (+[WKWebView handlesSafeBrowsing]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+
 2018-11-06  Eric Carlson  <eric.carl...@apple.com>
 
         [MediaStream] User should not be prompted again after denying getDisplayMedia request

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


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-11-06 21:45:40 UTC (rev 237884)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2018-11-06 21:53:21 UTC (rev 237885)
@@ -4633,6 +4633,11 @@
 #endif
 }
 
++ (BOOL)_handlesSafeBrowsing
+{
+    return DEFAULT_SAFE_BROWSING_ENABLED;
+}
+
 - (void)_evaluateJavaScriptWithoutUserGesture:(NSString *)_javascript_String completionHandler:(void (^)(id, NSError *))completionHandler
 {
     [self _evaluateJavaScript:_javascript_String forceUserGesture:NO completionHandler:completionHandler];

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


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2018-11-06 21:45:40 UTC (rev 237884)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2018-11-06 21:53:21 UTC (rev 237885)
@@ -188,6 +188,8 @@
 
 - (IBAction)_pasteAsQuotation:(id)sender WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 
++ (BOOL)_handlesSafeBrowsing WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
 #if TARGET_OS_IPHONE
 // DERECATED: The setters of the three following function are deprecated, please use overrideLayoutParameters.
 // Define the smallest size a page take with a regular viewport.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to