Changeset 260546 in webkit


Ignore:
Timestamp:
Apr 22, 2020 5:38:55 PM (4 years ago)
Author:
Chris Dumez
Message:

[iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache:
https://bugs.webkit.org/show_bug.cgi?id=210878
<rdar://problem/62202276>

Reviewed by Alex Christensen.

Source/WebKit:

Expose -_webView:willGoToBackForwardListItem:inPageCache: on iOS.

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):

Tools:

Enable corresponding API test on iOS.

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r260544 r260546  
     12020-04-22  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache:
     4        https://bugs.webkit.org/show_bug.cgi?id=210878
     5        <rdar://problem/62202276>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Expose -_webView:willGoToBackForwardListItem:inPageCache: on iOS.
     10
     11        * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
     12        * UIProcess/Cocoa/NavigationState.h:
     13        * UIProcess/Cocoa/NavigationState.mm:
     14        (WebKit::NavigationState::setNavigationDelegate):
     15        (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
     16
    1172020-04-22  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h

    r260497 r260546  
    118118- (void)_webView:(WKWebView *)webView webGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macos(10.13.4));
    119119- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macos(10.13.4));
    120 - (void)_webView:(WKWebView *)webView willGoToBackForwardListItem:(WKBackForwardListItem *)item inPageCache:(BOOL)inPageCache WK_API_AVAILABLE(macos(10.13.4));
    121120- (void)_webView:(WKWebView *)webView didFailToInitializePlugInWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macos(10.13.4));
    122121- (void)_webView:(WKWebView *)webView didBlockInsecurePluginVersionWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macos(10.14));
     
    125124#endif
    126125
     126- (void)_webView:(WKWebView *)webView willGoToBackForwardListItem:(WKBackForwardListItem *)item inPageCache:(BOOL)inPageCache WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
    127127- (void)_webView:(WKWebView *)webView decidePolicyForSOAuthorizationLoadWithCurrentPolicy:(_WKSOAuthorizationLoadPolicy)policy forExtension:(NSString *)extension completionHandler:(void (^)(_WKSOAuthorizationLoadPolicy policy))completionHandler WK_API_AVAILABLE(macos(10.15), ios(13.0));
    128128
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h

    r260497 r260546  
    134134        void webGLLoadPolicy(WebPageProxy&, const URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
    135135        void resolveWebGLLoadPolicy(WebPageProxy&, const URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
    136         bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inBackForwardCache) final;
    137136        bool didFailToInitializePlugIn(WebPageProxy&, API::Dictionary&) final;
    138137        bool didBlockInsecurePluginVersion(WebPageProxy&, API::Dictionary&) final;
     
    140139        bool didChangeBackForwardList(WebPageProxy&, WebBackForwardListItem*, const Vector<Ref<WebBackForwardListItem>>&) final;
    141140#endif
     141        bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inBackForwardCache) final;
    142142
    143143        void contentRuleListNotification(WebPageProxy&, URL&&, WebCore::ContentRuleListResults&&) final;
     
    255255        bool webViewDidFailToInitializePlugInWithInfo : 1;
    256256        bool webViewDidBlockInsecurePluginVersionWithInfo : 1;
     257        bool webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler : 1;
     258#endif
    257259        bool webViewWillGoToBackForwardListItemInBackForwardCache : 1;
    258         bool webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler : 1;
    259 #endif
    260260
    261261#if HAVE(APP_SSO)
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm

    r260497 r260546  
    201201    m_navigationDelegateMethods.webViewWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:webGLLoadPolicyForURL:decisionHandler:)];
    202202    m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:)];
    203     m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInBackForwardCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
    204203    m_navigationDelegateMethods.webViewDidFailToInitializePlugInWithInfo = [delegate respondsToSelector:@selector(_webView:didFailToInitializePlugInWithInfo:)];
    205204    m_navigationDelegateMethods.webViewDidBlockInsecurePluginVersionWithInfo = [delegate respondsToSelector:@selector(_webView:didBlockInsecurePluginVersionWithInfo:)];
     
    207206    m_navigationDelegateMethods.webViewDecidePolicyForPluginLoadWithCurrentPolicyPluginInfoCompletionHandler = [delegate respondsToSelector:@selector(_webView:decidePolicyForPluginLoadWithCurrentPolicy:pluginInfo:completionHandler:)];
    208207#endif
     208    m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInBackForwardCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
    209209#if HAVE(APP_SSO)
    210210    m_navigationDelegateMethods.webViewDecidePolicyForSOAuthorizationLoadWithCurrentPolicyForExtensionCompletionHandler = [delegate respondsToSelector:@selector(_webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:)];
     
    470470    return true;
    471471}
     472#endif
    472473
    473474bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inBackForwardCache)
     
    483484    return true;
    484485}
    485 #endif
    486486
    487487static void trySOAuthorization(Ref<API::NavigationAction>&& navigationAction, WebPageProxy& page, Function<void(bool)>&& completionHandler)
  • trunk/Tools/ChangeLog

    r260541 r260546  
     12020-04-22  Chris Dumez  <cdumez@apple.com>
     2
     3        [iOS] Expose -_webView:willGoToBackForwardListItem:inPageCache:
     4        https://bugs.webkit.org/show_bug.cgi?id=210878
     5        <rdar://problem/62202276>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Enable corresponding API test on iOS.
     10
     11        * TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
     12
    1132020-04-22  Daniel Bates  <dabates@apple.com>
    214
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm

    r260366 r260546  
    581581}
    582582
    583 #if PLATFORM(MAC)
    584 
    585583static bool navigationComplete;
    586584
     
    616614    TestWebKitAPI::Util::run(&isDone);
    617615}
     616
     617#if PLATFORM(MAC)
    618618
    619619RetainPtr<WKBackForwardListItem> firstItem;
Note: See TracChangeset for help on using the changeset viewer.