| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |