Chromium Code Reviews| 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..4f46c3c822d845155de0ebd7dc96184eab3a55af 100644 |
| --- a/java/org/chromium/distiller/webdocument/ElementAction.java |
| +++ b/java/org/chromium/distiller/webdocument/ElementAction.java |
| @@ -25,6 +25,7 @@ public class ElementAction { |
| public static ElementAction getForElement(Element element) { |
| Style style = DomUtil.getComputedStyle(element); |
| ElementAction action = new ElementAction(); |
| + String tagName = element.getTagName(); |
| switch (style.getDisplay()) { |
| case "inline": |
| break; |
| @@ -32,10 +33,17 @@ public class ElementAction { |
| case "inline-flex": |
| action.changesTagLevel = true; |
| break; |
| + case "block": |
|
mdjones
2016/03/14 16:58:27
Please add a comment outlining that the float prop
wychen
2016/03/15 20:47:59
Done.
|
| + // Special casing for drop cap letter with "float". |
| + // Ref: http://crbug.com/593128 |
| + if (!"none".equals(style.getProperty("float")) && |
| + "SPAN".equals(tagName)) { |
| + break; |
| + } |
| + // Intentional fall through. |
| // 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: |
| - // block |
| // list-item |
| // inline-table |
| // table-row |
| @@ -53,7 +61,6 @@ public class ElementAction { |
| break; |
| } |
| - String tagName = element.getTagName(); |
| if (!"HTML".equals(tagName) && !"BODY".equals(tagName)) { |
| String className = element.getAttribute("class"); |
| int classCount = DomUtil.getClassList(element).length(); |