Chromium Code Reviews| Index: Source/core/layout/TextAutosizer.cpp |
| diff --git a/Source/core/layout/TextAutosizer.cpp b/Source/core/layout/TextAutosizer.cpp |
| index 568da42a402b5e6fa9d1d1c72f169184c082d132..8eb3fdca06d0d91f531f2e991a829b79958d76d7 100644 |
| --- a/Source/core/layout/TextAutosizer.cpp |
| +++ b/Source/core/layout/TextAutosizer.cpp |
| @@ -32,6 +32,7 @@ |
| #include "core/layout/TextAutosizer.h" |
| #include "core/dom/Document.h" |
| +#include "core/dom/PseudoElement.h" |
| #include "core/frame/FrameHost.h" |
| #include "core/frame/FrameView.h" |
| #include "core/frame/LocalFrame.h" |
| @@ -459,8 +460,10 @@ float TextAutosizer::inflate(LayoutObject* parent, InflateBehavior behavior, flo |
| // FIXME: Investigate why MarkOnlyThis is sufficient. |
| if (parent->isLayoutInline()) |
| child->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| + |
| } else if (child->isLayoutInline()) { |
| multiplier = inflate(child, behavior, multiplier); |
| + |
| } else if (child->isLayoutBlock() && behavior == DescendToInnerBlocks |
| && !classifyBlock(child, INDEPENDENT | EXPLICIT_WIDTH | SUPPRESSING)) { |
| multiplier = inflate(child, behavior, multiplier); |
| @@ -470,11 +473,20 @@ float TextAutosizer::inflate(LayoutObject* parent, InflateBehavior behavior, flo |
| if (hasTextChild) { |
| applyMultiplier(parent, multiplier); // Parent handles line spacing. |
| + |
| } else if (!parent->isListItem()) { |
| // For consistency, a block with no immediate text child should always have a |
| // multiplier of 1 (except for list items which are handled in inflateListItem). |
| applyMultiplier(parent, 1); |
| } |
| + |
| + if (RuntimeEnabledFeatures::listMarkerPseudoElementEnabled() && parent->isListItem()) { |
| + if (PseudoElement* element = toElement(parent->node())->pseudoElement(MARKER)) { |
|
esprehn
2015/04/22 07:45:46
remove, leave m_marker instead. The attachListMark
dsinclair
2015/04/22 20:00:39
Done.
|
| + inflateListItem(toLayoutListItem(parent), toLayoutListMarker(element->layoutObject())); |
| + element->layoutObject()->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
| + } |
| + } |
| + |
| return multiplier; |
| } |