Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b6e3f2ab478195c20afce5b163a9c31f82cdd96
https://github.com/WebKit/WebKit/commit/9b6e3f2ab478195c20afce5b163a9c31f82cdd96
Author: Brian Weinstein <[email protected]>
Date: 2024-11-06 (Wed, 06 Nov 2024)
Changed paths:
M Source/WebCore/loader/SubframeLoader.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm
Log Message:
-----------
Content blockers don't hide content in about:blank iframes
https://bugs.webkit.org/show_bug.cgi?id=282621
rdar://134273470
Reviewed by Timothy Hatcher and Alex Christensen.
When loading about:blank iframes, we would never consult the
ContentExtensionsBackend about if the
load should be blocked, which meant we were never adding the global display
none stylesheet to the
frame's document.
To fix this, explicitly add the global display none stylesheets from the
content blockers when
loading an about:blank frame.
* Source/WebCore/loader/SubframeLoader.cpp:
(WebCore::FrameLoader::SubframeLoader::loadSubframe):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST(ContentRuleList, DisplayNoneInAboutBlankIFrame)): Make sure that the h1
is correctly hidden.
(TEST(ContentRuleList, DisplayNoneInSrcDocIFrame)): Ditto.
Canonical link: https://commits.webkit.org/286221@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes