Changeset 139337 in webkit
- Timestamp:
- Jan 10, 2013, 10:39:17 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139335 r139337 1 2013-01-10 Robert Hogan <robert@webkit.org> 2 3 REGRESSION(r136967): margin-top + overflow:hidden causes incorrect layout for internal floated elements 4 https://bugs.webkit.org/show_bug.cgi?id=106374 5 6 Reviewed by David Hyatt. 7 8 * fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-and-float-child-expected.txt: Added. 9 * fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-and-float-child.html: Added. 10 1 11 2013-01-10 Dimitri Glazkov <dglazkov@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r139334 r139337 1 2013-01-10 Robert Hogan <robert@webkit.org> 2 3 REGRESSION(r136967): margin-top + overflow:hidden causes incorrect layout for internal floated elements 4 https://bugs.webkit.org/show_bug.cgi?id=106374 5 6 Reviewed by David Hyatt. 7 8 r136397 treated any self-collapsing block that had a clearance delta as though it was clearing a float, but 9 blocks that avoid floats can get a clearance delta too. So just ensure there is clearance on the block when deciding 10 whether we need to add the margin back in before placing the float. 11 12 Test: fast/block/margin-collapse/self-collapsing-block-with-overflow-hidden-and-float-child.html 13 14 * rendering/RenderBlockLineLayout.cpp: 15 (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): 16 1 17 2013-01-10 Alexander Pavlov <apavlov@chromium.org> 2 18 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r138654 r139337 2285 2285 // The top margin edge of a self-collapsing block that clears a float intrudes up into it by the height of the margin, 2286 2286 // 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. 2287 LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_block-> getClearDelta(m_block, LayoutUnit())) ? m_block->collapsedMarginBeforeForChild(m_block) : LayoutUnit();2287 LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_block->style()->clear() && m_block->getClearDelta(m_block, LayoutUnit())) ? m_block->collapsedMarginBeforeForChild(m_block) : LayoutUnit(); 2288 2288 LayoutUnit oldLogicalHeight = m_block->logicalHeight(); 2289 2289 m_block->setLogicalHeight(oldLogicalHeight + marginOffset);
Note:
See TracChangeset
for help on using the changeset viewer.