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

Issue 29324599: Issue 2392/2393 - Created container for CSS property filters (Closed)

Created:
Aug. 25, 2015, 3:35 p.m. by Thomas Greiner
Modified:
Nov. 30, 2015, 1:51 p.m.
Reviewers:
kzar, Wladimir Palant
Visibility:
Public.

Description

I combined the changes for #2392 and #2393 in this review since I implemented both side-by-side and since they're still distinguishable by file. This review also includes a change in the signature of the `ElemHideBase.fromText` method since this appeared to have been overlooked in the past.

Patch Set 1 #

Total comments: 15

Patch Set 2 : Rebased and addressed comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -9 lines) Patch
A lib/cssRules.js View 1 1 chunk +76 lines, -0 lines 2 comments Download
M lib/filterClasses.js View 1 2 chunks +7 lines, -6 lines 0 comments Download
M lib/filterListener.js View 1 4 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 11
Thomas Greiner
Aug. 25, 2015, 4:11 p.m. (2015-08-25 16:11:24 UTC) #1
kzar
https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js File lib/cssRules.js (right): https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js#newcode22 lib/cssRules.js:22: let {ElemHide: {getException}} = require("elemHide"); This results in a ...
Oct. 24, 2015, 5:14 p.m. (2015-10-24 17:14:52 UTC) #2
kzar
https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js File lib/cssRules.js (right): https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js#newcode95 lib/cssRules.js:95: if (specificOnly && (!filter.domains || filter.domains[""])) Use filter.isGeneric() instead? ...
Nov. 2, 2015, 7:33 p.m. (2015-11-02 19:33:46 UTC) #3
kzar
https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js File lib/cssRules.js (right): https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js#newcode86 lib/cssRules.js:86: * @param {Boolean} specificOnly Aren't CSS property filters _always_ ...
Nov. 4, 2015, 1:03 p.m. (2015-11-04 13:03:20 UTC) #4
Wladimir Palant
https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js File lib/cssRules.js (right): https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js#newcode34 lib/cssRules.js:34: let keyByFilter = Object.create(null); The two maps filterByKey and ...
Nov. 5, 2015, 12:46 p.m. (2015-11-05 12:46:19 UTC) #5
kzar
https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js File lib/cssRules.js (right): https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js#newcode95 lib/cssRules.js:95: if (specificOnly && (!filter.domains || filter.domains[""])) On 2015/11/05 12:46:19, ...
Nov. 5, 2015, 2:27 p.m. (2015-11-05 14:27:47 UTC) #6
kzar
In case it helps, here's a diff for what I needed to change to get ...
Nov. 6, 2015, 12:31 p.m. (2015-11-06 12:31:44 UTC) #7
Thomas Greiner
Note that nothing has changed in lib/filterClasses.js. The intermediate diff is caused by the rebase. ...
Nov. 25, 2015, 11:20 a.m. (2015-11-25 11:20:01 UTC) #8
kzar
This now works for me without modifications and the code LGTM :) https://codereview.adblockplus.org/29324599/diff/29324600/lib/cssRules.js File lib/cssRules.js ...
Nov. 25, 2015, 1:12 p.m. (2015-11-25 13:12:26 UTC) #9
Wladimir Palant
LGTM but see nit below. https://codereview.adblockplus.org/29324599/diff/29330769/lib/cssRules.js File lib/cssRules.js (right): https://codereview.adblockplus.org/29324599/diff/29330769/lib/cssRules.js#newcode62 lib/cssRules.js:62: * @return {Array.<CSSPropertyFilter>} Nit: ...
Nov. 26, 2015, 12:52 p.m. (2015-11-26 12:52:47 UTC) #10
Thomas Greiner
Nov. 30, 2015, 1:51 p.m. (2015-11-30 13:51:16 UTC) #11
Message was sent while issue was closed.
https://codereview.adblockplus.org/29324599/diff/29330769/lib/cssRules.js
File lib/cssRules.js (right):

https://codereview.adblockplus.org/29324599/diff/29330769/lib/cssRules.js#new...
lib/cssRules.js:62: * @return {Array.<CSSPropertyFilter>}
On 2015/11/26 12:52:46, Wladimir Palant wrote:
> Nit: We usually use CSSPropertyFilter[] which is shorter and more like
> JavaScript. For sets or maps the awkward template syntax isn't avoidable, here
> it is.

Done. Will include that change in the commit.

Powered by Google App Engine
This is Rietveld