#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"
void RenderListItem::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
- RenderBlock::styleDidChange(diff, oldStyle);
+ RenderBlockFlow::styleDidChange(diff, oldStyle);
if (style()->listStyleType() != NoneListStyle
|| (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) {
{
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.
+ if (m_marker) {
+ FastTextAutosizer* textAutosizer = document().fastTextAutosizer();
+ if (textAutosizer)
+ textAutosizer->inflateListItem(this, m_marker);
+ }
+
LayoutRectRecorder recorder(*this);
updateMarkerLocation();
RenderBlockFlow::layout();