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

Unified Diff: Source/WebCore/rendering/RenderBlockLineLayout.cpp

Issue 12335038: Merge 142659 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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 | « LayoutTests/fast/block/margin-collapse/self-collapsing-block-with-float-children-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 143750)
+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy)
@@ -2281,8 +2281,8 @@
}
} 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->style()->clear() && m_block->getClearDelta(m_block, LayoutUnit())) ? m_block->collapsedMarginBeforeForChild(m_block) : LayoutUnit();
+ // so in order to place this first child float at the top content edge of the self-collapsing block add the margin back in before placement.
+ LayoutUnit marginOffset = (!object->previousSibling() && 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);
« no previous file with comments | « LayoutTests/fast/block/margin-collapse/self-collapsing-block-with-float-children-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698