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

Issue 29713565: Issue 6437 - Filter out patterns that do not match DOM mutations (Closed)

Created:
March 2, 2018, 1:16 p.m. by Manish Jethani
Modified:
April 30, 2018, 2:23 p.m.
Reviewers:
hub
CC:
kzar, sergei
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

This builds on https://codereview.adblockplus.org/29712655/ There are three types of mutations: "attributes", "characterData", and "childList" If only an attribute has changed, we don't have to process -abp-contains, for example. Similarly if only character data has changed, it should not affect -abp-has (unless it contains a nested -abp-contains) or -abp-properties. We can avoid doing a lot of processing by filtering out the patterns that do not match the given DOM mutations.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix formatting #

Patch Set 3 : Rebase #

Total comments: 1

Patch Set 4 : Rebase #

Patch Set 5 : Add tests #

Total comments: 2

Patch Set 6 : Process plain selectors on DOM mutations #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -5 lines) Patch
M lib/content/elemHideEmulation.js View 1 2 3 4 5 2 chunks +44 lines, -1 line 1 comment Download
M test/browser/elemHideEmulation.js View 1 2 3 4 3 chunks +189 lines, -4 lines 0 comments Download

Messages

Total messages: 9
Manish Jethani
March 2, 2018, 1:16 p.m. (2018-03-02 13:16:34 UTC) #1
Manish Jethani
Patch Set 1 See description. This builds on https://codereview.adblockplus.org/29712655/ There are some obvious optimizations here ...
March 2, 2018, 1:20 p.m. (2018-03-02 13:20:17 UTC) #2
Manish Jethani
https://codereview.adblockplus.org/29713565/diff/29713566/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29713565/diff/29713566/lib/content/elemHideEmulation.js#newcode410 lib/content/elemHideEmulation.js:410: return pattern.selectors.some( One obvious optimization is that a pattern ...
March 2, 2018, 1:23 p.m. (2018-03-02 13:23:42 UTC) #3
Manish Jethani
Patch Set 2: Fix formatting
March 2, 2018, 1:26 p.m. (2018-03-02 13:26:27 UTC) #4
Manish Jethani
Patch Set 3: Rebase You could test this out on my home page https://manishjethani.com/ by ...
March 20, 2018, 9:41 a.m. (2018-03-20 09:41:33 UTC) #5
hub
Do you think it is possible to write a test? (see `test/browser/elemHideEmulation.js`)
April 17, 2018, 9:43 p.m. (2018-04-17 21:43:47 UTC) #6
Manish Jethani
Patch Set 4: Rebase Patch Set 5: Add tests I've added tests now. Unfortunately it's ...
April 24, 2018, 12:43 p.m. (2018-04-24 12:43:02 UTC) #7
Manish Jethani
Patch Set 6: Process plain selectors on DOM mutations https://codereview.adblockplus.org/29713565/diff/29760642/lib/content/elemHideEmulation.js File lib/content/elemHideEmulation.js (right): https://codereview.adblockplus.org/29713565/diff/29760642/lib/content/elemHideEmulation.js#newcode227 lib/content/elemHideEmulation.js:227: ...
April 24, 2018, 1:58 p.m. (2018-04-24 13:58:32 UTC) #8
hub
April 30, 2018, 1:29 p.m. (2018-04-30 13:29:37 UTC) #9
LGTM

Powered by Google App Engine
This is Rietveld