Index: Source/core/rendering/RenderListItem.cpp |
diff --git a/Source/core/rendering/RenderListItem.cpp b/Source/core/rendering/RenderListItem.cpp |
index b3b57a571bae2dd74b1d3862e806c0178778b0f0..3b6b21cb02b08fd33e2504c331faf990cd082dff 100644 |
--- a/Source/core/rendering/RenderListItem.cpp |
+++ b/Source/core/rendering/RenderListItem.cpp |
@@ -27,6 +27,7 @@ |
#include "HTMLNames.h" |
#include "core/dom/ElementTraversal.h" |
#include "core/html/HTMLOListElement.h" |
+#include "core/rendering/FastTextAutosizer.h" |
#include "core/rendering/LayoutRectRecorder.h" |
#include "core/rendering/RenderListMarker.h" |
#include "core/rendering/RenderView.h" |
@@ -316,6 +317,12 @@ void RenderListItem::layout() |
{ |
ASSERT(needsLayout()); |
+ // The marker must be autosized before calling updateMarkerLocation. |
+ // It cannot be done in the parent's beginLayout because it is not yet in the render tree. |
+ FastTextAutosizer* textAutosizer = document().fastTextAutosizer(); |
+ if (textAutosizer) |
+ textAutosizer->inflateListItem(this, m_marker); |
+ |
LayoutRectRecorder recorder(*this); |
updateMarkerLocation(); |
RenderBlockFlow::layout(); |