Bug 233889 - Allow WKContentRuleList to run regexes on current frame's URL, not just top frame's URL
Summary: Allow WKContentRuleList to run regexes on current frame's URL, not just top f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-06 11:45 PST by Alex Christensen
Modified: 2021-12-13 20:27 PST (History)
5 users (show)

See Also:


Attachments
Patch (10.24 KB, patch)
2021-12-06 11:46 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (36.34 KB, patch)
2021-12-09 14:31 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (100.11 KB, patch)
2021-12-10 18:30 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (110.83 KB, patch)
2021-12-13 15:29 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-12-06 11:45:27 PST
Allow WKContentRuleList to run regexes on current frame's URL, not just top frame's URL
Comment 1 Alex Christensen 2021-12-06 11:46:21 PST
Created attachment 446063 [details]
Patch
Comment 2 Alex Christensen 2021-12-06 11:46:24 PST
<rdar://problem/72203352>
Comment 3 Alex Christensen 2021-12-09 14:31:09 PST
Created attachment 446607 [details]
Patch
Comment 4 Alex Christensen 2021-12-09 21:17:03 PST
Comment on attachment 446607 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=446607&action=review

> Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:134
> +        // FIXME: Do something with this. I might need another bit to indicate whether the conditions are top URL conditions or frameURL conditions, like IfConditionFlag but another bit.

No, I think instead the action needs to include whether it had a condition with if-top-url or if-frame-url.  Right now we use separate state machines with/without conditions and we either need even more state machines and passes or this.
Comment 5 Alex Christensen 2021-12-10 18:30:24 PST
Created attachment 446854 [details]
Patch
Comment 6 Alex Christensen 2021-12-10 18:30:42 PST
Comment on attachment 446854 [details]
Patch

Also not quite there, but getting quite close.
Comment 7 Alex Christensen 2021-12-13 15:29:07 PST
Created attachment 447075 [details]
Patch
Comment 8 EWS 2021-12-13 20:27:46 PST
Committed r287010 (245215@main): <https://commits.webkit.org/245215@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447075 [details].