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 6c989742027127c6dc1661a27923892756f73f93..0612d3dde724aa6677f2c3e70c59995609e79a29 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp |
@@ -257,6 +257,11 @@ static LayoutObject* getParentOfFirstLineBox(LayoutBlockFlow* curr, |
if (currChild == marker) |
continue; |
+ // Shouldn't add marker into Overflow box, instead, add marker |
+ // into listitem |
+ if (currChild->hasOverflowClip()) |
+ break; |
+ |
if (currChild->isInline() && |
(!currChild->isLayoutInline() || |
curr->generatesLineBoxesForInlineChild(currChild))) |
@@ -336,6 +341,16 @@ void LayoutListItem::addOverflowFromChildren() { |
positionListMarker(); |
} |
+void LayoutListItem::addLogicalHeightFromChild(const LayoutBox& child) { |
+ // Outside marker inside an anonymous box with sibling shouldn't effect the |
+ // height of listitem, so that marker can be positioned at the left of sibling |
+ // not top-left. |
+ if (m_marker && !m_marker->isInside() && child.isAnonymous() && |
+ child.isLayoutBlock() && firstChild() == child && child.nextSibling()) |
+ return; |
+ setLogicalHeight(logicalHeight() + logicalHeightForChild(child)); |
+} |
+ |
void LayoutListItem::positionListMarker() { |
if (m_marker && m_marker->parent() && m_marker->parent()->isBox() && |
!m_marker->isInside() && m_marker->inlineBoxWrapper()) { |