[webkit-changes] [WebKit/WebKit] 6fad2d: Add bundle SPI to skip decidePolicyForNavigationRe...

Alex Christensen noreply at github.com
Thu Dec 15 11:07:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6fad2d1b1bdba6bf35f2e24987ac2a4f3bd45827
      https://github.com/WebKit/WebKit/commit/6fad2d1b1bdba6bf35f2e24987ac2a4f3bd45827
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
    M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/WebKitCocoa/SkipDecidePolicyForResponsePlugIn.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm
    M Tools/TestWebKitAPI/cocoa/HTTPServer.mm

  Log Message:
  -----------
  Add bundle SPI to skip decidePolicyForNavigationResponse in some cases
https://bugs.webkit.org/show_bug.cgi?id=249334
rdar://102709433

Reviewed by Geoffrey Garen.

This is not ideal, but it's not as bad as bringing WKBundlePagePolicyClient back and hooking it up.
This is needed to fix a performance regression.  It restores pre-existing behavior.
We should consider going from the network process to the UI process without hopping through the web
process for navigation responses to prevent the need for strange performance optimizations like this.

* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetSkipDecidePolicyForResponseIfPossible):
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::shouldSkipDecidePolicyForResponse const):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setSkipDecidePolicyForResponseIfPossible):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SkipDecidePolicyForResponsePlugIn.mm: Added.
(-[SkipDecidePolicyForResponsePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
(TEST):
* Tools/TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::statusText):

Canonical link: https://commits.webkit.org/257942@main




More information about the webkit-changes mailing list