Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1330)

Unified Diff: Source/core/rendering/RenderListItem.cpp

Issue 145003009: Autosize list markers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tot
Patch Set: Update TestExpectations. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/FastTextAutosizer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « Source/core/rendering/FastTextAutosizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698