Bug 143235 - [Content Extensions] Correctly handle regular expressions matching everything
Summary: [Content Extensions] Correctly handle regular expressions matching everything
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-30 13:23 PDT by Alex Christensen
Modified: 2015-03-30 17:49 PDT (History)
0 users

See Also:


Attachments
Patch (24.29 KB, patch)
2015-03-30 13:36 PDT, Alex Christensen
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2015-03-30 13:23:20 PDT
There are lots of edge cases.  They should be fixed and tested.
Comment 1 Alex Christensen 2015-03-30 13:36:03 PDT
Created attachment 249758 [details]
Patch
Comment 2 Benjamin Poulain 2015-03-30 17:09:59 PDT
Comment on attachment 249758 [details]
Patch

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

> Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:61
> +        for (unsigned i = 0; i < selectorLength; i++) {

++i

> Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:62
> +            actions.resize(actions.size() + sizeof(UChar));

Probably best doing this out of the loop.

> Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:66
> +        for (unsigned i = 0; i < selectorLength; i++)

++i

> Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:89
> +                    selector.append(",");

','
Comment 3 Alex Christensen 2015-03-30 17:49:36 PDT
http://trac.webkit.org/changeset/182168