Index: third_party/WebKit/Source/core/layout/LayoutListMarker.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp |
index 806cda731dc5b44a357ac400ce827d63b1162abc..5b56ad214f204ff6a8e212eb6cde084e31f8d3ae 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp |
@@ -43,7 +43,7 @@ const int cMarkerPaddingPx = 7; |
const int cUAMarkerMarginEm = 1; |
LayoutListMarker::LayoutListMarker(LayoutListItem* item) |
- : LayoutBox(nullptr), m_listItem(item) { |
+ : LayoutBox(nullptr), m_listItem(item), m_lineOffset() { |
setInline(true); |
setIsAtomicInlineLevel(true); |
} |
@@ -139,6 +139,17 @@ void LayoutListMarker::layout() { |
ASSERT(needsLayout()); |
LayoutAnalyzer::Scope analyzer(*this); |
+ LayoutUnit blockOffset; |
+ for (LayoutBox* o = parentBox(); o != listItem(); o = o->parentBox()) { |
eae
2016/12/07 21:30:45
Is parentBox guaranteed to be non-null? If not we
|
+ blockOffset += o->logicalTop(); |
+ } |
+ if (listItem()->style()->isLeftToRightDirection()) { |
+ m_lineOffset = listItem()->logicalLeftOffsetForLine( |
+ blockOffset, DoNotIndentText, LayoutUnit()); |
+ } else { |
+ m_lineOffset = listItem()->logicalRightOffsetForLine( |
+ blockOffset, DoNotIndentText, LayoutUnit()); |
+ } |
if (isImage()) { |
updateMarginsAndContent(); |
LayoutSize imageSize(imageBulletSize()); |