| Summary: | content extensions need universal actions | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||
| Component: | WebCore Misc. | Assignee: | Alex Christensen <achristensen> | ||||||
| Status: | RESOLVED DUPLICATE | ||||||||
| Severity: | Normal | CC: | beidson, benjamin | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Alex Christensen
2015-03-04 12:01:01 PST
Created attachment 247878 [details]
Patch
Created attachment 247888 [details]
Patch
Comment on attachment 247888 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247888&action=review > Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:114 > + if (trigger.urlFilter == ".*") We should not do that. There are other ways to write the same thing. You could do "(.+)?" for example. The way to detect that is check if: -There is any final state in the epsilon closure of the start state. -Alternatively, every transition from the epsilon closure of the start state ends in a state closed on a final state. > Source/WebCore/contentextensions/ContentExtensionParser.cpp:54 > + trigger.urlFilter = ".*"; I guess you could also leave the trigger empty and just accept that in the other parts. > LayoutTests/ChangeLog:11 > + * http/tests/usercontentfilter/basic-filter.html: > + * http/tests/usercontentfilter/basic-filter.html.json: > + * http/tests/usercontentfilter/block-all.html: Added. > + * http/tests/usercontentfilter/block-all.html.json: Added. Wooot! More tests. You make me feel bad about my patch :) *** This bug has been marked as a duplicate of bug 142799 *** |