Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 140446) |
+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy) |
@@ -2283,7 +2283,7 @@ |
} else if (object->isFloating()) { |
// The top margin edge of a self-collapsing block that clears a float intrudes up into it by the height of the margin, |
// so in order to place this child float at the top content edge of the self-collapsing block add the margin back in before placement. |
- LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_block->getClearDelta(m_block, LayoutUnit())) ? m_block->collapsedMarginBeforeForChild(m_block) : LayoutUnit(); |
+ LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_block->style()->clear() && m_block->getClearDelta(m_block, LayoutUnit())) ? m_block->collapsedMarginBeforeForChild(m_block) : LayoutUnit(); |
LayoutUnit oldLogicalHeight = m_block->logicalHeight(); |
m_block->setLogicalHeight(oldLogicalHeight + marginOffset); |
m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine, lineInfo, width); |