Bug 233889

Summary: Allow WKContentRuleList to run regexes on current frame's URL, not just top frame's URL
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, ews-watchlist, japhet, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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].