RESOLVED DUPLICATE of bug 142799 142298
content extensions need universal actions
https://bugs.webkit.org/show_bug.cgi?id=142298
Summary content extensions need universal actions
Alex Christensen
Reported 2015-03-04 12:01:01 PST
Most of the css in content extensions will probably be applied to all pages. We don't want to compile a bunch of .* triggers, so let's add a faster way to do this. This might not be the best way to do this. I'm open to better ideas. We mentioned making a new default style sheet, but I'm not sure if we actually want to do that.
Attachments
Patch (12.19 KB, patch)
2015-03-04 12:08 PST, Alex Christensen
no flags
Patch (12.19 KB, patch)
2015-03-04 13:20 PST, Alex Christensen
benjamin: review-
Alex Christensen
Comment 1 2015-03-04 12:08:05 PST
Alex Christensen
Comment 2 2015-03-04 13:20:50 PST
Benjamin Poulain
Comment 3 2015-03-04 17:58:15 PST
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 :)
Alex Christensen
Comment 4 2015-03-19 08:58:01 PDT
*** This bug has been marked as a duplicate of bug 142799 ***
Note You need to log in before you can comment on or make changes to this bug.