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

Unified Diff: src/com/dom_distiller/client/DomToSaxVisitor.java

Issue 296113004: Start using computed style instead of default tag actions. (Closed) Base URL: https://code.google.com/p/dom-distiller/@master
Patch Set: Added tests Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/com/dom_distiller/client/DomToSaxVisitor.java
diff --git a/src/com/dom_distiller/client/DomToSaxVisitor.java b/src/com/dom_distiller/client/DomToSaxVisitor.java
index 53974a80a8cac4fc6fe0c7d2b142f186054565ea..9c0e263879d9f2e374c473336cebd6af89dafbe4 100644
--- a/src/com/dom_distiller/client/DomToSaxVisitor.java
+++ b/src/com/dom_distiller/client/DomToSaxVisitor.java
@@ -47,7 +47,7 @@ public class DomToSaxVisitor implements DomWalker.Visitor {
case Node.ELEMENT_NODE:
Element e = Element.as(n);
Attributes attrs = getSaxAttributes(e);
- handler.startElement(sHtmlNamespace, e.getTagName(), e.getTagName(), attrs);
+ handler.startElement(sHtmlNamespace, e.getTagName(), e.getTagName(), e, attrs);
return true;
case Node.DOCUMENT_NODE: // Don't recurse into sub-documents.
default: // This case is for comment nodes.
@@ -58,7 +58,7 @@ public class DomToSaxVisitor implements DomWalker.Visitor {
@Override
public void exit(Node n) {
Element e = Element.as(n);
- handler.endElement(sHtmlNamespace, e.getTagName(), e.getTagName());
+ handler.endElement(sHtmlNamespace, e.getTagName(), e.getTagName(), e);
Yaron 2014/05/29 01:09:10 Why bother continuing to pass getTagName? Can you
nyquist 2014/05/29 23:42:25 Done. Also cleaned up Attributes.
}
/**

Powered by Google App Engine
This is Rietveld 408576698