Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[margin-trim][block layout] Nested self-collapsing children at block-…
…end should also be trimmed. https://bugs.webkit.org/show_bug.cgi?id=255736 rdar://108327029 Reviewed by Alan Baradlay. When walking back up the block container for the purposes of block-end margin trimming we may run into a self collapsing child that needs to have both of its margins trimmed and its position adjusted. However, it is also possible that these self-collapsing children may also have other self-collapsing children nested arbitrarily within. If that is the case, we need to also trim the margins of all of its descendants. * LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-nested-child-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-with-self-collapsing-children-expected.txt: * Source/WebCore/rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::trimBlockEndChildrenMargins): Canonical link: https://commits.webkit.org/263439@main
- Loading branch information
Showing
3 changed files
with
36 additions
and
128 deletions.
There are no files selected for viewing
47 changes: 7 additions & 40 deletions
47
...ox/margin-trim/computed-margin-values/block-container-block-end-nested-child-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,13 @@ | ||
|
||
PASS item 1 | ||
FAIL item 2 assert_equals: | ||
<item data-expected-margin-bottom="0" style="block-size: auto;"> | ||
<div><item data-expected-margin-bottom="10"></item></div> | ||
<div> | ||
<item data-expected-margin-bottom="0" style="block-size: auto;"> | ||
<div><item data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
</div> | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
PASS item 2 | ||
PASS item 3 | ||
PASS item 4 | ||
PASS item 5 | ||
FAIL item 6 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 7 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 8 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 9 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 10 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 11 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
PASS item 6 | ||
PASS item 7 | ||
PASS item 8 | ||
PASS item 9 | ||
PASS item 10 | ||
PASS item 11 | ||
|
103 changes: 15 additions & 88 deletions
103
...mputed-margin-values/block-container-block-end-with-self-collapsing-children-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,20 @@ | ||
|
||
PASS item 1 | ||
PASS item 2 | ||
FAIL item 3 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
</item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 4 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 5 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 6 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 7 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 8 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 9 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
</item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 10 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 11 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 12 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 13 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 14 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 15 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 16 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"> | ||
<div><item class="collapsed" data-expected-margin-bottom="0"></item></div> | ||
</item> | ||
margin-bottom expected "0" but got "10" | ||
FAIL item 17 assert_equals: | ||
<item class="collapsed" data-expected-margin-bottom="0"></item> | ||
margin-bottom expected "0" but got "10" | ||
PASS item 3 | ||
PASS item 4 | ||
PASS item 5 | ||
PASS item 6 | ||
PASS item 7 | ||
PASS item 8 | ||
PASS item 9 | ||
PASS item 10 | ||
PASS item 11 | ||
PASS item 12 | ||
PASS item 13 | ||
PASS item 14 | ||
PASS item 15 | ||
PASS item 16 | ||
PASS item 17 | ||
PASS item 18 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters