Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b922a9d45b8ac1d34f73a38ad7f8e073b0ccebd7
https://github.com/WebKit/WebKit/commit/b922a9d45b8ac1d34f73a38ad7f8e073b0ccebd7
Author: Wenson Hsieh <[email protected]>
Date: 2023-01-13 (Fri, 13 Jan 2023)
Changed paths:
M Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
M Source/WebCore/page/UserContentProvider.cpp
Log Message:
-----------
Lookalike character sanitization does not work if content blockers are
disabled through SPI
https://bugs.webkit.org/show_bug.cgi?id=250608
Reviewed by Tim Horton.
Allow lookalike character sanitization to remain active even if content
blockers are disabled via
`-[WKWebpagePreferences _setContentBlockersEnabled:NO]`, by hoisting the logic
out of
`ContentExtensionsBackend::processContentRuleListsForLoad` and into the call
site in
`UserContentProvider` instead. This allows us to apply these adjustments, even
in the case where
`contentRuleListsEnabled(initiatingDocumentLoader)` return `false`.
Changes covered by a new API test.
* Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
(WebCore::ContentExtensions::sanitizeLookalikeCharactersIfNecessary): Deleted.
* Source/WebCore/page/UserContentProvider.cpp:
(WebCore::sanitizeLookalikeCharactersIfNeeded):
Move this from `ContentExtensionsBackend` to `UserContentProvider`. No other
change in behavior.
(WebCore::UserContentProvider::processContentRuleListsForLoad):
Canonical link: https://commits.webkit.org/258908@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes