[webkit-changes] [WebKit/WebKit] ddb41c: Add a helper function to return the effective Docu...

Wenson Hsieh noreply at github.com
Tue May 23 13:08:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ddb41c0a2bc1ab838e7adad4bc2ae52cb7dbf12a
      https://github.com/WebKit/WebKit/commit/ddb41c0a2bc1ab838e7adad4bc2ae52cb7dbf12a
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp
    M Source/WebKit/WebProcess/WebPage/WebDocumentLoader.h

  Log Message:
  -----------
  Add a helper function to return the effective DocumentLoader for website policies
https://bugs.webkit.org/show_bug.cgi?id=257152

Reviewed by Tim Horton.

Avoid some code duplication by merging all the three (nearly) identical implementations of "get the
effective `WebDocumentLoader` for website policies" in WebKit2 into a single helper method. No
change in behavior.

* Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::policySourceDocumentLoaderForFrame):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::applyToDocumentLoader):
* Source/WebKit/WebProcess/WebPage/WebDocumentLoader.cpp:
(WebKit::WebDocumentLoader::loaderForWebsitePolicies):
* Source/WebKit/WebProcess/WebPage/WebDocumentLoader.h:

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




More information about the webkit-changes mailing list