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

Issue 29886555: Issue 6957 - Add generateStyleSheetForDomain function to ElemHide module (Closed)

Created:
Sept. 20, 2018, 12:18 p.m. by Manish Jethani
Modified:
Sept. 27, 2018, 5:21 p.m.
Reviewers:
Jon Sonesen, hub
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Based on https://codereview.adblockplus.org/29882562/ Here we add a new generateStyleSheetForDomain function to the ElemHide module. It combines the computation of the selectors that apply to a domain with the generation of the corresponding CSS code, which is made significantly faster now as the default style sheet is cached. It might also help with memory usage, though that is probably no longer an issue with #6967.

Patch Set 1 : #

Total comments: 15

Patch Set 2 : Rebase, remove getSelectorsForDomain #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -54 lines) Patch
M lib/elemHide.js View 1 6 chunks +99 lines, -46 lines 0 comments Download
M test/elemHide.js View 1 1 chunk +15 lines, -8 lines 0 comments Download

Messages

Total messages: 11
Manish Jethani
Sept. 20, 2018, 12:18 p.m. (2018-09-20 12:18:09 UTC) #1
Manish Jethani
Patch Set 1 Please see the description above. I'll update the Trac issue. https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js File ...
Sept. 20, 2018, 12:27 p.m. (2018-09-20 12:27:25 UTC) #2
Jon Sonesen
https://codereview.adblockplus.org/29886555/diff/29886559/test/elemHide.js File test/elemHide.js (right): https://codereview.adblockplus.org/29886555/diff/29886559/test/elemHide.js#newcode50 test/elemHide.js:50: return selectors.slice().sort().filter((selector, index, sortedSelectors) => On 2018/09/20 12:27:24, Manish ...
Sept. 20, 2018, 8:10 p.m. (2018-09-20 20:10:20 UTC) #3
Manish Jethani
https://codereview.adblockplus.org/29886555/diff/29886559/test/elemHide.js File test/elemHide.js (right): https://codereview.adblockplus.org/29886555/diff/29886559/test/elemHide.js#newcode50 test/elemHide.js:50: return selectors.slice().sort().filter((selector, index, sortedSelectors) => On 2018/09/20 20:10:20, Jon ...
Sept. 21, 2018, 10:53 a.m. (2018-09-21 10:53:05 UTC) #4
Jon Sonesen
https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js File lib/elemHide.js (right): https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js#newcode311 lib/elemHide.js:311: generateStyleSheetForDomain(domain, specificOnly = false) On 2018/09/20 12:27:24, Manish Jethani ...
Sept. 23, 2018, 6:01 p.m. (2018-09-23 18:01:59 UTC) #5
Manish Jethani
https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js File lib/elemHide.js (right): https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js#newcode315 lib/elemHide.js:315: createStyleSheet(selectors); On 2018/09/23 18:01:59, Jon Sonesen wrote: > Regarding ...
Sept. 24, 2018, 11:51 a.m. (2018-09-24 11:51:14 UTC) #6
Jon Sonesen
https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js File lib/elemHide.js (right): https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js#newcode315 lib/elemHide.js:315: createStyleSheet(selectors); On 2018/09/24 11:51:14, Manish Jethani wrote: > On ...
Sept. 24, 2018, 3:09 p.m. (2018-09-24 15:09:44 UTC) #7
Jon Sonesen
LGTM
Sept. 27, 2018, 2:02 p.m. (2018-09-27 14:02:44 UTC) #8
Manish Jethani
Patch Set 2: Rebase, remove getSelectorsForDomain Since Sebastian has agreed to use the new function, ...
Sept. 27, 2018, 3:57 p.m. (2018-09-27 15:57:10 UTC) #9
Manish Jethani
https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js File lib/elemHide.js (right): https://codereview.adblockplus.org/29886555/diff/29886559/lib/elemHide.js#newcode315 lib/elemHide.js:315: createStyleSheet(selectors); On 2018/09/24 15:09:44, Jon Sonesen wrote: > On ...
Sept. 27, 2018, 3:58 p.m. (2018-09-27 15:58:29 UTC) #10
Jon Sonesen
Sept. 27, 2018, 5:15 p.m. (2018-09-27 17:15:05 UTC) #11
LGTM

Powered by Google App Engine
This is Rietveld