Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0d65d2e39211f8530206ac0d251c468d47cb1eaa https://github.com/WebKit/WebKit/commit/0d65d2e39211f8530206ac0d251c468d47cb1eaa Author: Elijah Sawyers <esawy...@apple.com> Date: 2025-06-27 (Fri, 27 Jun 2025)
Changed paths: M Source/WebCore/contentextensions/ContentExtensionCompiler.cpp M Source/WebCore/contentextensions/ContentExtensionParser.cpp M Source/WebCore/contentextensions/ContentExtensionRule.h M Source/WebCore/contentextensions/ContentExtensionsBackend.cpp M Source/WebCore/loader/ResourceLoadInfo.h M Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp Log Message: ----------- Introduce a new WebKit Content Blocking condition to act on the current frame or ancestor frame URL https://bugs.webkit.org/show_bug.cgi?id=295036 rdar://154404658 Reviewed by Brian Weinstein and Timothy Hatcher. This patch introduces a new condition type for WebKit content blockers, if- ancestor-frame-url. The condition makes it so that the rule applies if the current frame's URL, or any of the ancestor frames URLs, are in the provided array of URLs. We need this functionality to be able to support dNR allowAllRequests rules for sub frames. Added a new test to validate the fix. Note: the dNR fix is tracked with https://bugs.webkit.org/show_bug.cgi?id=295043 * Source/WebCore/contentextensions/ContentExtensionCompiler.cpp: (WebCore::ContentExtensions::compileRuleList): * Source/WebCore/contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::loadTrigger): * Source/WebCore/contentextensions/ContentExtensionRule.h: (WebCore::ContentExtensions::Trigger::checkValidity): * Source/WebCore/contentextensions/ContentExtensionsBackend.cpp: (WebCore::ContentExtensions::ContentExtensionsBackend::actionsFromContentRuleList const): (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad): * Source/WebCore/loader/ResourceLoadInfo.h: * Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F(ContentExtensionTest, InvalidJSON)): (TestWebKitAPI::TEST_F(ContentExtensionTest, IfFrameOrAncestorsURL)): Canonical link: https://commits.webkit.org/296754@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes