Title: [244367] trunk/Source/WebKit
- Revision
- 244367
- Author
- [email protected]
- Date
- 2019-04-16 18:32:38 -0700 (Tue, 16 Apr 2019)
Log Message
[Cocoa] Add a way for Apple-internal clients to opt into recommended compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196977
<rdar://problem/49871194>
Reviewed by Tim Horton.
Add a helper method to query whether the navigation client should bypass policy safeguards when determining the
recommended compatibility mode. We bypass policy safeguards in Cocoa platforms if the navigation delegate
implements the new navigation delegate API.
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::shouldBypassCompatibilityModeSafeguards const):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards const):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (244366 => 244367)
--- trunk/Source/WebKit/ChangeLog 2019-04-17 01:27:21 UTC (rev 244366)
+++ trunk/Source/WebKit/ChangeLog 2019-04-17 01:32:38 UTC (rev 244367)
@@ -1,3 +1,21 @@
+2019-04-16 Wenson Hsieh <[email protected]>
+
+ [Cocoa] Add a way for Apple-internal clients to opt into recommended compatibility mode
+ https://bugs.webkit.org/show_bug.cgi?id=196977
+ <rdar://problem/49871194>
+
+ Reviewed by Tim Horton.
+
+ Add a helper method to query whether the navigation client should bypass policy safeguards when determining the
+ recommended compatibility mode. We bypass policy safeguards in Cocoa platforms if the navigation delegate
+ implements the new navigation delegate API.
+
+ * UIProcess/API/APINavigationClient.h:
+ (API::NavigationClient::shouldBypassCompatibilityModeSafeguards const):
+ * UIProcess/Cocoa/NavigationState.h:
+ * UIProcess/Cocoa/NavigationState.mm:
+ (WebKit::NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards const):
+
2019-04-16 Per Arne Vollan <[email protected]>
-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:] never returns _WKWebsiteDataTypeCredentials
Modified: trunk/Source/WebKit/UIProcess/API/APINavigationClient.h (244366 => 244367)
--- trunk/Source/WebKit/UIProcess/API/APINavigationClient.h 2019-04-17 01:27:21 UTC (rev 244366)
+++ trunk/Source/WebKit/UIProcess/API/APINavigationClient.h 2019-04-17 01:32:38 UTC (rev 244367)
@@ -91,6 +91,7 @@
virtual void renderingProgressDidChange(WebKit::WebPageProxy&, OptionSet<WebCore::LayoutMilestone>) { }
virtual void didReceiveAuthenticationChallenge(WebKit::WebPageProxy&, WebKit::AuthenticationChallengeProxy& challenge) { challenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling); }
+ virtual bool shouldBypassCompatibilityModeSafeguards() const { return false; }
// FIXME: These function should not be part of this client.
virtual bool processDidTerminate(WebKit::WebPageProxy&, WebKit::ProcessTerminationReason) { return false; }
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (244366 => 244367)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h 2019-04-17 01:27:21 UTC (rev 244366)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h 2019-04-17 01:32:38 UTC (rev 244367)
@@ -109,6 +109,8 @@
void renderingProgressDidChange(WebPageProxy&, OptionSet<WebCore::LayoutMilestone>) override;
+ bool shouldBypassCompatibilityModeSafeguards() const final;
+
void didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy&) override;
bool processDidTerminate(WebPageProxy&, ProcessTerminationReason) override;
void processDidBecomeResponsive(WebPageProxy&) override;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (244366 => 244367)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2019-04-17 01:27:21 UTC (rev 244366)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2019-04-17 01:32:38 UTC (rev 244367)
@@ -939,6 +939,11 @@
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView renderingProgressDidChange:renderingProgressEvents(layoutMilestones)];
}
+bool NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards() const
+{
+ return m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionWithPreferencesDecisionHandler;
+}
+
static AuthenticationChallengeDisposition toAuthenticationChallengeDisposition(NSURLSessionAuthChallengeDisposition disposition)
{
switch (disposition) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes