Detect when url filter pattern with groups match the empty string
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2015 02:04:11 +0000 (02:04 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2015 02:04:11 +0000 (02:04 +0000)
commit488d76bc3d83ba09b5403d69bcd66afce71f36ff
tree5fdf0e8d2e53af3aca16fede5c55a3769916047c
parent66721e67ecd5a3fcf0732350bb4fc13bddb45142
Detect when url filter pattern with groups match the empty string
https://bugs.webkit.org/show_bug.cgi?id=142930

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-22
Reviewed by Sam Weinig.

Source/WebCore:

The previous test was only accounting for simple atoms. This patch extends
it to groups.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::Term::quantify):
(WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::Term::quantifier): Deleted.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/contentextensions/URLFilterParser.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp