Changeset 240546 in webkit
- Timestamp:
- Jan 26, 2019 7:01:34 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r240540 r240546 1 2019-01-26 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][BFC] Ignore last inflow child's collapsed through margin after when computing containing block's height. 4 https://bugs.webkit.org/show_bug.cgi?id=193865 5 6 Reviewed by Antti Koivisto. 7 8 * fast/block/margin-collapse/collapsed-through-child-simple-expected.html: Added. 9 * fast/block/margin-collapse/collapsed-through-child-simple.html: Added. 10 1 11 2019-01-25 Devin Rousso <drousso@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r240545 r240546 1 2019-01-26 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][BFC] Ignore last inflow child's collapsed through margin after when computing containing block's height. 4 https://bugs.webkit.org/show_bug.cgi?id=193865 5 6 Reviewed by Antti Koivisto. 7 8 Height computation -> 9 // 10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible' 10 // ...the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom 11 // margin does not collapse with the element's bottom margin 12 13 <div style="border: 1px solid green"> 14 <div style="margin-top: 100px;"></div> 15 </div> 16 17 When the child vertical margins collapse through (margin-top = margin-bottom = 100px), the bottom edge of the bottom margin is 18 the same as the bottom edge of the top margin which is alredy taken into use while positioning so technically the bottom margin value should be ignored. 19 20 Test: fast/block/margin-collapse/collapsed-through-child-simple.html 21 22 * layout/MarginTypes.h: 23 (WebCore::Layout::UsedVerticalMargin::isCollapsedThrough const): 24 * layout/blockformatting/BlockFormattingContextGeometry.cpp: 25 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): 26 * layout/displaytree/DisplayBox.h: 27 (WebCore::Display::Box::hasCollapsedThroughMargin const): 28 1 29 2019-01-26 Zalan Bujtas <zalan@apple.com> 2 30 -
trunk/Source/WebCore/layout/MarginTypes.h
r239863 r240546 41 41 LayoutUnit before() const { return m_collapsedValues.before.valueOr(m_nonCollapsedValues.before); } 42 42 LayoutUnit after() const { return m_collapsedValues.after.valueOr(m_nonCollapsedValues.after); } 43 bool isCollapsedThrough() const { return m_collapsedValues.isCollapsedThrough; } 43 44 44 45 struct NonCollapsedValues { -
trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
r240337 r240546 86 86 if (!MarginCollapse::marginAfterCollapsesWithParentMarginAfter(layoutState, *lastInFlowChild)) { 87 87 auto& lastInFlowDisplayBox = layoutState.displayBoxForLayoutBox(*lastInFlowChild); 88 return { lastInFlowDisplayBox.bottom() + lastInFlowDisplayBox.marginAfter() - borderAndPaddingTop, nonCollapsedMargin }; 88 auto bottomEdgeOfBottomMargin = lastInFlowDisplayBox.bottom() + (lastInFlowDisplayBox.hasCollapsedThroughMargin() ? LayoutUnit() : lastInFlowDisplayBox.marginAfter()); 89 return { bottomEdgeOfBottomMargin - borderAndPaddingTop, nonCollapsedMargin }; 89 90 } 90 91 -
trunk/Source/WebCore/layout/displaytree/DisplayBox.h
r240475 r240546 144 144 LayoutUnit marginAfter() const; 145 145 LayoutUnit marginEnd() const; 146 bool hasCollapsedThroughMargin() const { return m_verticalMargin.isCollapsedThrough(); } 146 147 bool hasClearance() const { return m_hasClearance; } 147 148 -
trunk/Tools/ChangeLog
r240541 r240546 1 2019-01-26 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][BFC] Ignore last inflow child's collapsed through margin after when computing containing block's height. 4 https://bugs.webkit.org/show_bug.cgi?id=193865 5 6 Reviewed by Antti Koivisto. 7 8 * LayoutReloaded/misc/LFC-passing-tests.txt: 9 1 10 2019-01-25 Ryosuke Niwa <rniwa@webkit.org> 2 11 -
trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt
r240475 r240546 135 135 fast/block/margin-collapse/040.html 136 136 fast/block/margin-collapse/044.html 137 fast/block/margin-collapse/collapsed-through-child-simple.html 137 138 fast/block/positioning/003.html 138 139 fast/block/positioning/004.html
Note: See TracChangeset
for help on using the changeset viewer.