[webkit-changes] [WebKit/WebKit] ce3796: Refactor some lookalike character string replaceme...

Wenson Hsieh noreply at github.com
Mon Jan 30 15:08:02 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ce3796e77e74f8bc09b40944a74ac1b094b0daef
      https://github.com/WebKit/WebKit/commit/ce3796e77e74f8bc09b40944a74ac1b094b0daef
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M Source/WebKit/Platform/cocoa/NetworkConnectionIntegrityHelpers.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h

  Log Message:
  -----------
  Refactor some lookalike character string replacement logic
https://bugs.webkit.org/show_bug.cgi?id=251335
rdar://104801247

Reviewed by Tim Horton.

Refactor some existing logic around lookalike characters strings; see below for more details.

* Source/WebKit/Platform/cocoa/NetworkConnectionIntegrityHelpers.h:
(WebKit::LookalikeCharacters::cachedStrings const):
(WebKit::LookalikeCharacters::Observer::Observer):
(WebKit::LookalikeCharacters::Observer::create):
(WebKit::LookalikeCharacters::Observer::invokeCallback):

Consolidate some static helper functions in WebPageProxy into a separate singleton object in
`NetworkConnectionIntegrityHelpers`.

* Source/WebKit/UIProcess/WebPageProxy.cpp:

Additionally begin observing lookalike character string updates upon initialization.

(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::creationParameters):

Use the new helper class above.

(WebKit::WebPageProxy::sendCachedLookalikeCharacterStrings):
(WebKit::WebPageProxy::waitForInitialLookalikeCharacterStrings):
(WebKit::WebPageProxy::cachedLookalikeStrings): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:

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




More information about the webkit-changes mailing list