Index: Source/core/rendering/TextAutosizer.cpp |
diff --git a/Source/core/rendering/TextAutosizer.cpp b/Source/core/rendering/TextAutosizer.cpp |
index f3ebe7f45eb89003dc8e37a9551fbe1aa148e64a..19ef56cff7cc17f8778a4e9bcf84f8fb6c4d72dd 100644 |
--- a/Source/core/rendering/TextAutosizer.cpp |
+++ b/Source/core/rendering/TextAutosizer.cpp |
@@ -32,6 +32,7 @@ |
#include "core/rendering/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(RenderObject* parent, InflateBehavior behavior, flo |
// FIXME: Investigate why MarkOnlyThis is sufficient. |
if (parent->isRenderInline()) |
child->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
+ |
} else if (child->isRenderInline()) { |
multiplier = inflate(child, behavior, multiplier); |
+ |
} else if (child->isRenderBlock() && behavior == DescendToInnerBlocks |
&& !classifyBlock(child, INDEPENDENT | EXPLICIT_WIDTH | SUPPRESSING)) { |
multiplier = inflate(child, behavior, multiplier); |
@@ -470,11 +473,20 @@ float TextAutosizer::inflate(RenderObject* 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)) { |
+ inflateListItem(toRenderListItem(parent), toRenderListMarker(element->renderer())); |
+ element->renderer()->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
+ } |
+ } |
+ |
return multiplier; |
} |