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

Unified Diff: java/org/chromium/distiller/webdocument/WebText.java

Issue 1230583006: Fix for keeping lists structure (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Small code refactor for more appropriate names. Created 5 years, 5 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: java/org/chromium/distiller/webdocument/WebText.java
diff --git a/java/org/chromium/distiller/webdocument/WebText.java b/java/org/chromium/distiller/webdocument/WebText.java
index ae81ee6f97f2d9ca41ddfa00be521cf7646ab7bb..86d56140d591e6ccf17c0c809168e4fb55644932 100644
--- a/java/org/chromium/distiller/webdocument/WebText.java
+++ b/java/org/chromium/distiller/webdocument/WebText.java
@@ -69,10 +69,13 @@ public class WebText extends WebElement {
DomUtil.stripIds(clonedRoot);
DomUtil.stripFontColorAttributes(clonedRoot);
+ Element elementClonedRoot = Element.as(clonedRoot);
if (textOnly) {
- return Element.as(clonedRoot).getInnerText();
+ return elementClonedRoot.getInnerText();
+ } else if (elementClonedRoot.getTagName().equals("LI")) {
+ return elementClonedRoot.getInnerHTML();
wychen 2015/08/01 01:00:20 I see why this is needed in this implementation, b
dalmirdasilva 2015/08/01 16:27:04 Is here the case where we can ask someone else whe
}
- return Element.as(clonedRoot).getString();
+ return elementClonedRoot.getString();
}
public List<Node> getTextNodes() {

Powered by Google App Engine
This is Rietveld 408576698