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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutListItem.cpp

Issue 2553793003: Establish a list marker's offset before floats have been added to its line (Closed)
Patch Set: bug 548616 Created 4 years 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
Index: third_party/WebKit/Source/core/layout/LayoutListItem.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
index 82abb454cd4ba83c1cc83f38cdfaa0e1ae8c8a4d..56b4c6d190ce1f1dcb9dd4ed1962a24fd708d5e8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
@@ -358,10 +358,7 @@ void LayoutListItem::positionListMarker() {
// pretty wrong (https://crbug.com/554160).
// FIXME: Need to account for relative positioning in the layout overflow.
if (style()->isLeftToRightDirection()) {
- LayoutUnit leftLineOffset = logicalLeftOffsetForLine(
- blockOffset, logicalLeftOffsetForLine(blockOffset, DoNotIndentText),
- DoNotIndentText);
- markerLogicalLeft = leftLineOffset - lineOffset - paddingStart() -
+ markerLogicalLeft = m_marker->lineOffset() - lineOffset - paddingStart() -
borderStart() + m_marker->marginStart();
m_marker->inlineBoxWrapper()->moveInInlineDirection(markerLogicalLeft -
markerOldLogicalLeft);
@@ -393,10 +390,7 @@ void LayoutListItem::positionListMarker() {
hitSelfPaintingLayer = true;
}
} else {
- LayoutUnit rightLineOffset = logicalRightOffsetForLine(
- blockOffset, logicalRightOffsetForLine(blockOffset, DoNotIndentText),
- DoNotIndentText);
- markerLogicalLeft = rightLineOffset - lineOffset + paddingStart() +
+ markerLogicalLeft = m_marker->lineOffset() - lineOffset + paddingStart() +
borderStart() + m_marker->marginEnd();
m_marker->inlineBoxWrapper()->moveInInlineDirection(markerLogicalLeft -
markerOldLogicalLeft);

Powered by Google App Engine
This is Rietveld 408576698