Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 8790183: Added handling of whitelisting rules like @@||example.com^$document (Closed)

Created:
Nov. 14, 2012, 12:30 p.m. by Wladimir Palant
Modified:
Nov. 14, 2012, 4:25 p.m.
Reviewers:
Felix Dahlke
Visibility:
Public.

Description

Added handling of whitelisting rules like @@||example.com^$document

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -12 lines) Patch
M background.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M lib/matcher.js View 1 2 chunks +70 lines, -7 lines 0 comments Download
M options.html View 2 chunks +1 line, -5 lines 0 comments Download

Messages

Total messages: 5
Wladimir Palant
Nov. 14, 2012, 12:31 p.m. (2012-11-14 12:31:01 UTC) #1
Felix Dahlke
Found two small issues. http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js File lib/matcher.js (right): http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js#newcode218 lib/matcher.js:218: if (!WhitelistFilter) Not a new ...
Nov. 14, 2012, 1:03 p.m. (2012-11-14 13:03:50 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js File lib/matcher.js (right): http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js#newcode218 lib/matcher.js:218: if (!WhitelistFilter) On 2012/11/14 13:03:51, Felix H. Dahlke wrote: ...
Nov. 14, 2012, 1:46 p.m. (2012-11-14 13:46:53 UTC) #3
Felix Dahlke
On 2012/11/14 13:46:53, Wladimir Palant wrote: > http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js > File lib/matcher.js (right): > > http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js#newcode218 ...
Nov. 14, 2012, 4:18 p.m. (2012-11-14 16:18:34 UTC) #4
Felix Dahlke
Nov. 14, 2012, 4:18 p.m. (2012-11-14 16:18:34 UTC) #5
On 2012/11/14 13:46:53, Wladimir Palant wrote:
> http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js
> File lib/matcher.js (right):
> 
> http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js#newcode218
> lib/matcher.js:218: if (!WhitelistFilter)
> On 2012/11/14 13:03:51, Felix H. Dahlke wrote:
> > Not a new problem, but can't we do this earlier? Both remove and
_generateRule
> > rely on add being executed first. (Arguably less of a problem with
> > _generateRule, since it's only invoked from add.)
> 
> Yes, it's ugly. Problem is that matcher.js needs to be included before
> background.js - meaning that it cannot just require() its dependencies while
> loading. Let's try a different hack...
> 
> http://codereview.adblockplus.org/8790183/diff/1/lib/matcher.js#newcode224
> lib/matcher.js:224: if (filter instanceof WhitelistFilter &&
filter.contentType
> == RegExpFilter.typeMap.DOCUMENT)
> Ok, I changed the solution to have maximal code reuse.

LGTM

Powered by Google App Engine
This is Rietveld