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

Unified Diff: java/org/chromium/distiller/DomDistiller.java

Issue 1131853006: Fix word count issue for Chinese and Japanese (Closed) Base URL: git@github.com:chromium/dom-distiller.git@master
Patch Set: rewrite tests Created 5 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
« no previous file with comments | « no previous file | java/org/chromium/distiller/StringUtil.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/DomDistiller.java
diff --git a/java/org/chromium/distiller/DomDistiller.java b/java/org/chromium/distiller/DomDistiller.java
index 027fde8885350c0705e84649788549b9c5c6f609..37d86cacc245f97b5bfb6a75d17edd91cf60f92e 100644
--- a/java/org/chromium/distiller/DomDistiller.java
+++ b/java/org/chromium/distiller/DomDistiller.java
@@ -7,6 +7,8 @@ package org.chromium.distiller;
import org.chromium.distiller.proto.DomDistillerProtos;
import org.chromium.distiller.proto.DomDistillerProtos.DebugInfo;
import org.chromium.distiller.proto.DomDistillerProtos.TimingInfo;
+import org.chromium.distiller.DomUtil;
+import org.chromium.distiller.StringUtil;
import com.google.gwt.core.client.js.JsExport;
import com.google.gwt.dom.client.Document;
@@ -23,6 +25,8 @@ public class DomDistiller {
public static DomDistillerProtos.DomDistillerResult applyWithOptions(
DomDistillerProtos.DomDistillerOptions options) {
double startTime = DomUtil.getTime();
+ StringUtil.setWordCounter(
+ DomUtil.javascriptTextContent(Document.get().getDocumentElement()));
DomDistillerProtos.DomDistillerResult result =
DomDistillerProtos.DomDistillerResult.create();
ContentExtractor contentExtractor =
« no previous file with comments | « no previous file | java/org/chromium/distiller/StringUtil.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698