Changeset 274596 in webkit
- Timestamp:
- Mar 17, 2021 3:59:09 PM (16 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r274595 r274596 1 2021-03-17 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Incorrect track sizing when using relative sized items in 'auto' column tracks 4 https://bugs.webkit.org/show_bug.cgi?id=191627 5 6 Reviewed by Javier Fernandez. 7 8 * TestExpectations: 9 1 10 2021-03-17 Robert Jenner <jenner@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r274521 r274596 1219 1219 webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html [ ImageOnlyFailure ] 1220 1220 webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html [ ImageOnlyFailure ] 1221 webkit.org/b/191627 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html [ Failure ]1222 1221 webkit.org/b/149890 fast/css-grid-layout/grid-shorthands-style-format.html [ Failure ] 1223 1222 webkit.org/b/191507 fast/css-grid-layout/positioned-grid-container-percentage-tracks.html [ Failure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r274561 r274596 1 2021-03-17 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Incorrect track sizing when using relative sized items in 'auto' column tracks 4 https://bugs.webkit.org/show_bug.cgi?id=191627 5 6 Reviewed by Javier Fernandez. 7 8 Updated expectation file for test grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html. 9 All sub-tests in this test file are now all passed. 10 11 * web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt: 12 1 13 2021-03-17 Alexey Shvayka <shvaikalesh@gmail.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt
r274477 r274596 25 25 PASS .inline-grid 5 26 26 PASS .inline-grid 6 27 FAIL .inline-grid 7 assert_equals: 28 <div class="inline-grid justifyItemsBaseline rows"> 29 <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div> 30 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> 31 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 32 </div> 33 width expected 100 but got 700 34 FAIL .inline-grid 8 assert_equals: 35 <div class="inline-grid justifyItemsBaseline rows min-content-columns"> 36 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 37 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 38 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 39 </div> 40 width expected 160 but got 940 41 FAIL .inline-grid 9 assert_equals: 42 <div class="inline-grid justifyItemsBaseline rows max-content-columns"> 43 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 44 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 45 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 46 </div> 47 width expected 160 but got 940 48 FAIL .inline-grid 10 assert_equals: 49 <div class="inline-grid justifyItemsBaseline rows fit-content-columns"> 50 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 51 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 52 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 53 </div> 54 width expected 160 but got 940 55 FAIL .inline-grid 11 assert_equals: 56 <div class="inline-grid justifyItemsBaseline rows flex-columns"> 57 <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div> 58 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> 59 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 60 </div> 61 width expected 100 but got 700 62 FAIL .inline-grid 12 assert_equals: 63 <div class="inline-grid justifyItemsBaseline rows max-flex-columns"> 64 <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div> 65 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="-50" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> 66 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 67 </div> 68 offsetLeft expected 0 but got 100 27 PASS .inline-grid 7 28 PASS .inline-grid 8 29 PASS .inline-grid 9 30 PASS .inline-grid 10 31 PASS .inline-grid 11 32 PASS .inline-grid 12 69 33 -
trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt
r267658 r274596 19 19 baseline is not applied initially, but orthogonal items force repeating the track sizing and height is not indefinite in that phase. 20 20 21 FAIL .inline-grid 1 assert_equals: 22 <div class="inline-grid justifyItemsBaseline rows max-flex-columns"> 23 <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div> 24 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="-50" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> 25 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 21 PASS .inline-grid 1 22 FAIL .inline-grid 2 assert_equals: 23 <div class="inline-grid alignItemsBaseline columns min-content-rows"> 24 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 25 <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div> 26 <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div> 26 27 </div> 27 offsetLeft expected -50 but got 0 28 FAIL .inline-grid 2assert_equals:29 <div class="inline-grid justifyItemsBaseline rows flex-columns">30 <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div>31 <div class=" secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div>32 <div class=" firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div>28 height expected 80 but got 85 29 FAIL .inline-grid 3 assert_equals: 30 <div class="inline-grid alignItemsBaseline columns max-content-rows"> 31 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 32 <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div> 33 <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div> 33 34 </div> 34 width expected 100 but got 300 35 FAIL .inline-grid 3 assert_equals: 35 height expected 80 but got 85 36 FAIL .inline-grid 4 assert_equals: 37 <div class="inline-grid alignItemsBaseline columns fit-content-rows"> 38 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 39 <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div> 40 <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div> 41 </div> 42 height expected 80 but got 85 43 PASS .inline-grid 5 44 PASS .inline-grid 6 45 PASS .inline-grid 7 46 FAIL .inline-grid 8 assert_equals: 47 <div class="inline-grid justifyItemsBaseline rows min-content-columns"> 48 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 49 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 50 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 51 </div> 52 width expected 80 but got 85 53 FAIL .inline-grid 9 assert_equals: 54 <div class="inline-grid justifyItemsBaseline rows max-content-columns"> 55 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 56 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 57 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 58 </div> 59 width expected 80 but got 85 60 FAIL .inline-grid 10 assert_equals: 36 61 <div class="inline-grid justifyItemsBaseline rows fit-content-columns"> 37 62 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> … … 40 65 </div> 41 66 width expected 80 but got 85 42 FAIL .inline-grid 4 assert_equals: 43 <div class="inline-grid justifyItemsBaseline rows max-content-columns"> 44 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 45 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 46 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 47 </div> 48 width expected 80 but got 85 49 FAIL .inline-grid 5 assert_equals: 50 <div class="inline-grid justifyItemsBaseline rows min-content-columns"> 51 <div class="firstRowFirstColumn verticalRL" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="100">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 52 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="160" data-expected-height="100"></div> 53 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="80" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 54 </div> 55 width expected 80 but got 85 56 FAIL .inline-grid 6 assert_equals: 57 <div class="inline-grid justifyItemsBaseline rows"> 58 <div class="firstRowFirstColumn verticalRL width50" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="100"></div> 59 <div class="secondRowFirstColumn verticalRL width200Percent" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> 60 <div class="firstRowSpanning2AutoColumn verticalRL width25" data-offset-x="50" data-offset-y="0" data-expected-width="25" data-expected-height="200"></div> 61 </div> 62 width expected 100 but got 300 63 PASS .inline-grid 7 64 PASS .inline-grid 8 65 FAIL .inline-grid 9 assert_equals: 66 <div class="inline-grid alignItemsBaseline columns fit-content-rows"> 67 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 68 <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div> 69 <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div> 70 </div> 71 height expected 80 but got 85 72 FAIL .inline-grid 10 assert_equals: 73 <div class="inline-grid alignItemsBaseline columns max-content-rows"> 74 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 75 <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div> 76 <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div> 77 </div> 78 height expected 80 but got 85 79 FAIL .inline-grid 11 assert_equals: 80 <div class="inline-grid alignItemsBaseline columns min-content-rows"> 81 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="80">ÉÉ É ÉÉ ÉÉÉÉ É ÉÉ ÉÉÉ ÉÉ É</div> 82 <div class="firstRowSecondColumn height200Percent" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="160"></div> 83 <div class="autoRowAutoColumnSpanning2 height25" data-offset-x="0" data-offset-y="80" data-expected-width="200" data-expected-height="25"></div> 84 </div> 85 height expected 80 but got 85 67 PASS .inline-grid 11 86 68 PASS .inline-grid 12 87 69 -
trunk/Source/WebCore/ChangeLog
r274589 r274596 1 2021-03-17 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Incorrect track sizing when using relative sized items in 'auto' column tracks 4 https://bugs.webkit.org/show_bug.cgi?id=191627 5 6 Reviewed by Javier Fernandez. 7 8 Containing block for a grid item is the grid area it's located in. During the GridTrackSizingAlgorithm, 9 we determine that this item has a relative size (percent in this case) and that the grid area is still 10 indefinite. Hence, we set nullopt for the grid area width and mark the item for layout. During the item's 11 layout, we call this RenderBox::containingBlockLogicalWidthForContent to determine the available height. 12 However, this method checks the containing block's width if the overridingContentLogicalWidth is nullopt, 13 which is incorrect for grid items. We should never use the grid container for resolving grid item's size. 14 15 This change is to return 0_lu for grid item when overridingContainingBlockContentLogicalHeight() or 16 overridingContainingBlockContentLogicalWidth() returns nullopt rather than use containing block's width 17 or height. 18 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::containingBlockLogicalWidthForContent const): 21 1 22 2021-03-17 Eric Carlson <eric.carlson@apple.com> 2 23 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r274477 r274596 2045 2045 LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const 2046 2046 { 2047 if (hasOverridingContainingBlockContentLogicalWidth()) { 2048 if (auto width = overridingContainingBlockContentLogicalWidth()) 2049 return width.value(); 2050 } 2047 if (hasOverridingContainingBlockContentLogicalWidth()) 2048 return overridingContainingBlockContentLogicalWidth().valueOr(0_lu); 2051 2049 2052 2050 if (RenderBlock* cb = containingBlock()) … … 2058 2056 { 2059 2057 if (hasOverridingContainingBlockContentLogicalHeight()) { 2060 if (auto height = overridingContainingBlockContentLogicalHeight()) 2061 return height.value(); 2058 // FIXME: Containing block for a grid item is the grid area it's located in. We need to return whatever 2059 // height value we get from overridingContainingBlockContentLogicalHeight() here, including WTF::nullopt. 2060 return overridingContainingBlockContentLogicalHeight().valueOr(0_lu); 2062 2061 } 2063 2062
Note: See TracChangeset
for help on using the changeset viewer.