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

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

Issue 1190343004: Process ordered list items as a single WebText (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: Created 5 years, 6 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 | javatests/org/chromium/distiller/ContentExtractorTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/webdocument/ElementAction.java
diff --git a/java/org/chromium/distiller/webdocument/ElementAction.java b/java/org/chromium/distiller/webdocument/ElementAction.java
index 1dbc88baf240b81966e47218812187858c63a1fd..05d0e7848b2bcebbbea28d423c86e8321dca0a56 100644
--- a/java/org/chromium/distiller/webdocument/ElementAction.java
+++ b/java/org/chromium/distiller/webdocument/ElementAction.java
@@ -32,6 +32,13 @@ public class ElementAction {
case "inline-flex":
action.changesTagLevel = true;
break;
+ case "list-item":
+ Element parentElement = element.getParentElement();
+ if (parentElement == null || !parentElement.getTagName().equals("OL")) {
+ action.flush = true;
+ action.changesTagLevel = true;
+ }
+ break;
// See http://www.w3.org/TR/CSS2/tables.html#table-display
// and http://www.w3.org/TR/css-flexbox-1/#flex-containers
// The default case includes the following display types:
« no previous file with comments | « no previous file | javatests/org/chromium/distiller/ContentExtractorTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698