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

Side by Side Diff: java/org/chromium/distiller/webdocument/DomConverter.java

Issue 2287113005: Skip unrecognized iframes (Closed) Base URL: git@github.com:chromium/dom-distiller.git@innertext
Patch Set: address comment Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | javatests/org/chromium/distiller/ContentExtractorTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.distiller.webdocument; 5 package org.chromium.distiller.webdocument;
6 6
7 import org.chromium.distiller.DomUtil; 7 import org.chromium.distiller.DomUtil;
8 import org.chromium.distiller.DomWalker; 8 import org.chromium.distiller.DomWalker;
9 import org.chromium.distiller.LogUtil; 9 import org.chromium.distiller.LogUtil;
10 import org.chromium.distiller.TableClassifier; 10 import org.chromium.distiller.TableClassifier;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 case "APPLET": 132 case "APPLET":
133 skip(e); 133 skip(e);
134 return false; 134 return false;
135 135
136 // These types are skipped and don't affect document construction. 136 // These types are skipped and don't affect document construction.
137 case "HEAD": 137 case "HEAD":
138 case "STYLE": 138 case "STYLE":
139 case "SCRIPT": 139 case "SCRIPT":
140 case "LINK": 140 case "LINK":
141 case "NOSCRIPT": 141 case "NOSCRIPT":
142 case "IFRAME":
142 return false; 143 return false;
143 } 144 }
144 builder.startElement(e); 145 builder.startElement(e);
145 return true; 146 return true;
146 } 147 }
147 148
148 @Override 149 @Override
149 public void exit(Node n) { 150 public void exit(Node n) {
150 if (n.getNodeType() == Node.ELEMENT_NODE) { 151 if (n.getNodeType() == Node.ELEMENT_NODE) {
151 Element e = Element.as(n); 152 Element e = Element.as(n);
(...skipping 19 matching lines...) Expand all
171 Element parent = e.getParentElement(); 172 Element parent = e.getParentElement();
172 LogUtil.logToConsole("TABLE: " + type + 173 LogUtil.logToConsole("TABLE: " + type +
173 ", id=" + e.getId() + 174 ", id=" + e.getId() +
174 ", class=" + e.getClassName() + 175 ", class=" + e.getClassName() +
175 ", parent=[" + parent.getTagName() + 176 ", parent=[" + parent.getTagName() +
176 ", id=" + parent.getId() + 177 ", id=" + parent.getId() +
177 ", class=" + parent.getClassName() + 178 ", class=" + parent.getClassName() +
178 "]"); 179 "]");
179 } 180 }
180 } 181 }
OLDNEW
« no previous file with comments | « no previous file | javatests/org/chromium/distiller/ContentExtractorTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698