Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 275493007: filter out invisible elements (Closed)

Created:
6 years, 7 months ago by kuan
Modified:
6 years, 7 months ago
Reviewers:
cjhopman
Base URL:
https://code.google.com/p/dom-distiller/@master
Visibility:
Public.

Description

filter out invisible elements 1) un-nest DomToSaxVisitor from DomToSaxParser and remove DomToSaxParser 2) impl FilteringDomVisitor - ContentExtractor calls FilteringDomVisitor which calls DomToSaxVisitor - filters out invisible nodes, including computed style: display:none, visibility:hidden, hidden attribute - passes other nodes on to DomToSaxVisitor for processing by ContentHandler - added tests BUG=367243 R=cjhopman@chromium.org Committed: 0a31800

Patch Set 1 #

Patch Set 2 : fixed comments #

Patch Set 3 : rm unused import #

Total comments: 4

Patch Set 4 : addressed comment #

Patch Set 5 : reorder import #

Total comments: 2

Patch Set 6 : don't use ContentExtractor.parse in tests, so that it can be private #

Patch Set 7 : addressed comments #

Total comments: 4

Patch Set 8 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -193 lines) Patch
M src/com/dom_distiller/client/ContentExtractor.java View 1 2 3 4 5 6 7 3 chunks +9 lines, -1 line 0 comments Download
D src/com/dom_distiller/client/DomToSaxParser.java View 1 chunk +0 lines, -97 lines 0 comments Download
A src/com/dom_distiller/client/DomToSaxVisitor.java View 1 2 3 1 chunk +89 lines, -0 lines 0 comments Download
M src/com/dom_distiller/client/DomUtil.java View 1 2 3 4 5 6 7 2 chunks +17 lines, -4 lines 0 comments Download
A src/com/dom_distiller/client/FilteringDomVisitor.java View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 0 comments Download
D test/com/dom_distiller/client/DomToSaxParserTest.java View 1 chunk +0 lines, -77 lines 0 comments Download
A + test/com/dom_distiller/client/DomToSaxVisitorTest.java View 1 2 3 4 5 2 chunks +15 lines, -14 lines 0 comments Download
A test/com/dom_distiller/client/FilteringDomVisitorTest.java View 1 2 3 4 5 6 1 chunk +122 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
kuan
6 years, 7 months ago (2014-05-08 16:27:24 UTC) #1
cjhopman
https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java File src/com/dom_distiller/client/FilteringDomVisitor.java (right): https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java#newcode25 src/com/dom_distiller/client/FilteringDomVisitor.java:25: private final DomToSaxVisitor domToSaxVisitor; This shouldn't need to know ...
6 years, 7 months ago (2014-05-09 00:27:31 UTC) #2
kuan
https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java File src/com/dom_distiller/client/FilteringDomVisitor.java (right): https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java#newcode25 src/com/dom_distiller/client/FilteringDomVisitor.java:25: private final DomToSaxVisitor domToSaxVisitor; On 2014/05/09 00:27:31, cjhopman wrote: ...
6 years, 7 months ago (2014-05-09 00:35:20 UTC) #3
cjhopman
https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java File src/com/dom_distiller/client/FilteringDomVisitor.java (right): https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java#newcode25 src/com/dom_distiller/client/FilteringDomVisitor.java:25: private final DomToSaxVisitor domToSaxVisitor; On 2014/05/09 00:35:20, kuan wrote: ...
6 years, 7 months ago (2014-05-09 00:38:04 UTC) #4
kuan
i've addressed ur comment in patch set 4. ptal. thx. https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java File src/com/dom_distiller/client/FilteringDomVisitor.java (right): https://codereview.chromium.org/275493007/diff/40001/src/com/dom_distiller/client/FilteringDomVisitor.java#newcode25 ...
6 years, 7 months ago (2014-05-09 01:05:31 UTC) #5
cjhopman
https://codereview.chromium.org/275493007/diff/80001/src/com/dom_distiller/client/FilteringDomVisitor.java File src/com/dom_distiller/client/FilteringDomVisitor.java (right): https://codereview.chromium.org/275493007/diff/80001/src/com/dom_distiller/client/FilteringDomVisitor.java#newcode35 src/com/dom_distiller/client/FilteringDomVisitor.java:35: e.hasAttribute("hidden") || DomUtil.hasClassName(e, "hidden")) { I don't know how ...
6 years, 7 months ago (2014-05-09 01:44:10 UTC) #6
kuan
i've addressed all comments in patch set 7. ptal. thx. https://codereview.chromium.org/275493007/diff/80001/src/com/dom_distiller/client/FilteringDomVisitor.java File src/com/dom_distiller/client/FilteringDomVisitor.java (right): https://codereview.chromium.org/275493007/diff/80001/src/com/dom_distiller/client/FilteringDomVisitor.java#newcode35 ...
6 years, 7 months ago (2014-05-13 11:21:03 UTC) #7
cjhopman
https://codereview.chromium.org/275493007/diff/110001/src/com/dom_distiller/client/DomUtil.java File src/com/dom_distiller/client/DomUtil.java (right): https://codereview.chromium.org/275493007/diff/110001/src/com/dom_distiller/client/DomUtil.java#newcode68 src/com/dom_distiller/client/DomUtil.java:68: // Standard (includes IE9) We don't care about IE. ...
6 years, 7 months ago (2014-05-13 16:20:53 UTC) #8
kuan
i've addressed all comments in patch set 8 (which also includes rebase). ptal. thx. https://codereview.chromium.org/275493007/diff/110001/src/com/dom_distiller/client/DomUtil.java ...
6 years, 7 months ago (2014-05-13 16:55:43 UTC) #9
cjhopman
lgtm
6 years, 7 months ago (2014-05-13 17:19:19 UTC) #10
kuan
6 years, 7 months ago (2014-05-13 17:21:42 UTC) #11
Message was sent while issue was closed.
Committed patchset #8 manually as r0a31800 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698