Changeset 140358 in webkit
- Timestamp:
- Jan 21, 2013 1:58:23 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140355 r140358 1 2013-01-21 Robert Hogan <robert@webkit.org> 2 3 Misaligned logo on www.nzherald.co.nz possibly due to negative margin-top 4 https://bugs.webkit.org/show_bug.cgi?id=14664 5 6 Reviewed by David Hyatt. 7 8 * fast/block/float/clear-negative-margin-top-expected.html: Added. 9 * fast/block/float/clear-negative-margin-top.html: Added. 10 * platform/chromium-win/fast/block/float/024-expected.txt: 11 * platform/chromium-win/fast/block/margin-collapse/empty-clear-blocks-expected.txt: 12 1 13 2013-01-21 Zan Dobersek <zdobersek@igalia.com> 2 14 -
trunk/LayoutTests/platform/chromium-win/fast/block/float/024-expected.txt
r127163 r140358 19 19 RenderBlock {DIV} at (0,293) size 800x72 [bgcolor=#DDDDDD] [border: (2px solid #000000)] 20 20 RenderBlock (floating) {DIV} at (2,2) size 32x32 [bgcolor=#FFFFFF] 21 RenderBlock {DIV} at (2, 50) size 796x021 RenderBlock {DIV} at (2,34) size 796x0 22 22 RenderBlock (anonymous) at (2,50) size 796x20 23 23 RenderText {#text} at (0,0) size 488x19 -
trunk/LayoutTests/platform/chromium-win/fast/block/margin-collapse/empty-clear-blocks-expected.txt
r127163 r140358 77 77 RenderText {#text} at (100,0) size 271x19 78 78 text run at (100,0) width 271: "This paragraph has a bottom margin of 50px." 79 RenderBlock {SPAN} at (0, 825) size 769x079 RenderBlock {SPAN} at (0,795) size 769x0 80 80 RenderBlock {SPAN} at (0,825) size 769x20 81 81 RenderText {#text} at (0,0) size 242x19 … … 102 102 RenderText {#text} at (100,0) size 271x19 103 103 text run at (100,0) width 271: "This paragraph has a bottom margin of 50px." 104 RenderBlock {SPAN} at (10,1 40) size 749x0104 RenderBlock {SPAN} at (10,110) size 749x0 -
trunk/Source/WebCore/ChangeLog
r140352 r140358 1 2013-01-21 Robert Hogan <robert@webkit.org> 2 3 Misaligned logo on www.nzherald.co.nz possibly due to negative margin-top 4 https://bugs.webkit.org/show_bug.cgi?id=14664 5 6 Reviewed by David Hyatt. 7 8 Test: fast/block/float/clear-negative-margin-top.html 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::collapseMargins): If a negative margin pulls a block up so that floats from 12 siblings overhang, then ensure addOverHangingFloats() uses the revised logical top position when 13 deciding whether a float does indeed overhang into the block after margin-collapsing. 14 (WebCore::RenderBlock::clearFloatsIfNeeded): 15 1 16 2013-01-21 Rik Cabanier <cabanier@adobe.com> 2 17 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r140244 r140358 2058 2058 // overhang from the previous sibling are added to our parent. If the child's previous sibling itself is a float the child will avoid 2059 2059 // or clear it anyway, so don't worry about any floating children it may contain. 2060 LayoutUnit oldLogicalHeight = logicalHeight(); 2061 setLogicalHeight(logicalTop); 2060 2062 RenderObject* prev = child->previousSibling(); 2061 2063 if (prev && prev->isBlockFlow() && !prev->isFloatingOrOutOfFlowPositioned()) { … … 2064 2066 addOverhangingFloats(block, false); 2065 2067 } 2068 setLogicalHeight(oldLogicalHeight); 2066 2069 2067 2070 return logicalTop; … … 2099 2102 LayoutUnit collapsedMargin = collapsedMarginBeforeForChild(child); 2100 2103 setLogicalHeight(child->logicalTop() - collapsedMargin); 2101 heightIncrease -= collapsedMargin; 2104 // A negative collapsed margin-top value cancels itself out as it has already been factored into |yPos| above. 2105 heightIncrease -= max(LayoutUnit(), collapsedMargin); 2102 2106 } else 2103 2107 // Increase our height by the amount we had to clear.
Note: See TracChangeset
for help on using the changeset viewer.