Changeset 244367 in webkit


Ignore:
Timestamp:
Apr 16, 2019 6:32:38 PM (5 years ago)
Author:
Wenson Hsieh
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):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r244365 r244367  
     12019-04-16  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [Cocoa] Add a way for Apple-internal clients to opt into recommended compatibility mode
     4        https://bugs.webkit.org/show_bug.cgi?id=196977
     5        <rdar://problem/49871194>
     6
     7        Reviewed by Tim Horton.
     8
     9        Add a helper method to query whether the navigation client should bypass policy safeguards when determining the
     10        recommended compatibility mode. We bypass policy safeguards in Cocoa platforms if the navigation delegate
     11        implements the new navigation delegate API.
     12
     13        * UIProcess/API/APINavigationClient.h:
     14        (API::NavigationClient::shouldBypassCompatibilityModeSafeguards const):
     15        * UIProcess/Cocoa/NavigationState.h:
     16        * UIProcess/Cocoa/NavigationState.mm:
     17        (WebKit::NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards const):
     18
    1192019-04-16  Per Arne Vollan  <pvollan@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/API/APINavigationClient.h

    r243319 r244367  
    9292
    9393    virtual void didReceiveAuthenticationChallenge(WebKit::WebPageProxy&, WebKit::AuthenticationChallengeProxy& challenge) { challenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling); }
     94    virtual bool shouldBypassCompatibilityModeSafeguards() const { return false; }
    9495
    9596    // FIXME: These function should not be part of this client.
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h

    r243787 r244367  
    110110        void renderingProgressDidChange(WebPageProxy&, OptionSet<WebCore::LayoutMilestone>) override;
    111111
     112        bool shouldBypassCompatibilityModeSafeguards() const final;
     113
    112114        void didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy&) override;
    113115        bool processDidTerminate(WebPageProxy&, ProcessTerminationReason) override;
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm

    r244239 r244367  
    940940}
    941941
     942bool NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards() const
     943{
     944    return m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionWithPreferencesDecisionHandler;
     945}
     946
    942947static AuthenticationChallengeDisposition toAuthenticationChallengeDisposition(NSURLSessionAuthChallengeDisposition disposition)
    943948{
Note: See TracChangeset for help on using the changeset viewer.