Changeset 235561 in webkit
- Timestamp:
- Aug 31, 2018, 11:07:46 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r235550 r235561 1 2018-08-31 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin. 4 https://bugs.webkit.org/show_bug.cgi?id=189193 5 6 Reviewed by Antti Koivisto. 7 8 * fast/block/block-only/floating-and-next-previous-inflow-with-margin-with-no-border-expected.txt: Added. 9 * fast/block/block-only/floating-and-next-previous-inflow-with-margin-with-no-border.html: Added. 10 1 11 2018-08-31 Per Arne Vollan <pvollan@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r235560 r235561 1 2018-08-31 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin. 4 https://bugs.webkit.org/show_bug.cgi?id=189193 5 6 Reviewed by Antti Koivisto. 7 8 Use the non-computed margin values to verify correctness. 9 This patch also fixes a margin collapsing issue when the inflow box has a float sibling. The float 10 sibling does not prevent collapsing with the parent's top/bottom margin. 11 12 Test: fast/block/block-only/floating-and-next-previous-inflow-with-margin-with-no-border.html 13 14 * layout/Verification.cpp: 15 (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded): 16 (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree const): 17 * layout/blockformatting/BlockMarginCollapse.cpp: 18 (WebCore::Layout::isMarginTopCollapsedWithParent): 19 (WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent): 20 1 21 2018-08-31 Antti Koivisto <antti@apple.com> 2 22 -
trunk/Source/WebCore/layout/Verification.cpp
r234924 r235561 122 122 }; 123 123 124 auto renderBoxLikeMarginBox = [](auto& displayBox) { 125 // Produce a RenderBox matching margin box. 126 auto borderBox = displayBox.borderBox(); 127 128 return Display::Box::Rect { 129 borderBox.top() - displayBox.nonCollapsedMarginTop(), 130 borderBox.left() - displayBox.nonComputedMarginLeft(), 131 displayBox.nonComputedMarginLeft() + borderBox.width() + displayBox.nonComputedMarginRight(), 132 displayBox.nonCollapsedMarginTop() + borderBox.height() + displayBox.nonCollapsedMarginBottom() 133 }; 134 }; 135 124 136 auto* displayBox = context.displayBoxForLayoutBox(layoutBox); 125 137 ASSERT(displayBox); … … 135 147 } 136 148 149 if (renderer.marginBoxRect() != renderBoxLikeMarginBox(*displayBox)) { 150 outputRect("marginBox", renderer.marginBoxRect(), renderBoxLikeMarginBox(*displayBox)); 151 return true; 152 } 153 137 154 if (renderer.borderBoxRect() != displayBox->borderBox()) { 138 155 outputRect("borderBox", renderer.borderBoxRect(), displayBox->borderBox()); … … 150 167 } 151 168 152 // TODO: The RenderBox::marginBox() does not follow the spec and ignores certain constraints. Skip them for now.153 169 return false; 154 170 } -
trunk/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp
r235170 r235561 98 98 ASSERT(layoutBox.parent()); 99 99 auto& parent = *layoutBox.parent(); 100 // Only the first inlflow child collapses with parent (floating sibling also prevents collapsing).101 if (layoutBox.previousInFlow OrFloatingSibling())100 // Only the first inlflow child collapses with parent. 101 if (layoutBox.previousInFlowSibling()) 102 102 return false; 103 103 … … 275 275 ASSERT(layoutBox.parent()); 276 276 auto& parent = *layoutBox.parent(); 277 // Only the last inlflow child collapses with parent (floating sibling also prevents collapsing).278 if (layoutBox.nextInFlow OrFloatingSibling())277 // Only the last inlflow child collapses with parent. 278 if (layoutBox.nextInFlowSibling()) 279 279 return false; 280 280 -
trunk/Tools/ChangeLog
r235560 r235561 1 2018-08-31 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin. 4 https://bugs.webkit.org/show_bug.cgi?id=189193 5 6 Reviewed by Antti Koivisto. 7 8 * LayoutReloaded/misc/LFC-passing-tests.txt: 9 1 10 2018-08-31 Antti Koivisto <antti@apple.com> 2 11 -
trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt
r235505 r235561 48 48 fast/block/block-only/floating-multiple-lefts.html 49 49 fast/block/block-only/floating-and-next-previous-inflow-with-margin.html 50 fast/block/block-only/floating-and-next-previous-inflow-with-margin-with-no-border.html 50 51 fast/block/block-only/floating-left-and-right-with-clearance.html 51 52 fast/block/block-only/float-and-siblings-with-margins.html
Note:
See TracChangeset
for help on using the changeset viewer.