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

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

Issue 449923002: gwt getInnerText -> javascript innerText or textContent (Closed) Base URL: https://code.google.com/p/dom-distiller/@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | src/com/dom_distiller/client/DocumentTitleGetter.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/com/dom_distiller/client/ContentExtractor.java
diff --git a/src/com/dom_distiller/client/ContentExtractor.java b/src/com/dom_distiller/client/ContentExtractor.java
index a3a87ce6cd0594b3c95485724c336f6b21dd8a83..498d36ffb57b4ed59fe8a4078ec1b5ce59a0c774 100644
--- a/src/com/dom_distiller/client/ContentExtractor.java
+++ b/src/com/dom_distiller/client/ContentExtractor.java
@@ -142,21 +142,13 @@ public class ContentExtractor {
// Temporarily add the node to the DOM so that style is calculated.
Document.get().getBody().appendChild(node);
- String output = javascriptInnerText(node);
+ String output = DomUtil.getInnerText(node);
// And remove it again.
Document.get().getBody().removeChild(node);
return output;
}
- /**
- * Use jsni for direct access to javascript's inner text. This avoid's GWT's implementation
- * which is intentionally different to mimic an old IE behaviour.
- */
- private static native String javascriptInnerText(Node node) /*-{
- return node.innerText;
- }-*/;
-
private static List<Node> getContentNodesForTextDocument(TextDocument document) {
List<Node> contentTextNodes = new ArrayList<Node>();
for (TextBlock tb : document.getTextBlocks()) {
« no previous file with comments | « no previous file | src/com/dom_distiller/client/DocumentTitleGetter.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698