Changeset 284793 in webkit
- Timestamp:
- Oct 25, 2021, 10:52:41 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r284774 r284793 1 2021-10-25 Ziran Sun <zsun@igalia.com> 2 3 [CSS-grid] Need to set prefer width dirty for the child that has constraints to the grid area 4 https://bugs.webkit.org/show_bug.cgi?id=232140 5 6 Reviewed by Sergio Villar Senin. 7 8 Update the test expectation file for the following tests. These tests are now passing. 9 * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt: 10 * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt: 11 * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt: 12 1 13 2021-10-25 Tim Nguyen <ntim@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt
r281662 r284793 1 1 2 FAIL .grid 1 assert_equals: 3 <div class="grid"> 4 <div class="paddingLeft50Percent" data-expected-padding-left="50" data-expected-width="60" data-expected-height="10">X</div> 5 <div data-offset-x="0" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div> 6 </div> 7 width expected 60 but got 50 8 FAIL .grid 2 assert_equals: 9 <div class="grid"> 10 <div class="paddingRight50Percent" data-expected-padding-right="50" data-expected-width="60" data-expected-height="10">X</div> 11 <div data-offset-x="0" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div> 12 </div> 13 width expected 60 but got 50 2 PASS .grid 1 3 PASS .grid 2 14 4 PASS .grid 3 15 5 PASS .grid 4 16 FAIL .grid 5 assert_equals: 17 <div class="grid directionRTL"> 18 <div class="paddingLeft50Percent" data-expected-padding-left="50" data-expected-width="60" data-expected-height="10">X</div> 19 <div data-offset-x="400" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div> 20 </div> 21 width expected 60 but got 50 22 FAIL .grid 6 assert_equals: 23 <div class="grid directionRTL"> 24 <div class="paddingRight50Percent" data-expected-padding-right="50" data-expected-width="60" data-expected-height="10">X</div> 25 <div data-offset-x="400" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div> 26 </div> 27 width expected 60 but got 50 6 PASS .grid 5 7 PASS .grid 6 28 8 PASS .grid 7 29 9 PASS .grid 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt
r281662 r284793 2 2 PASS .grid 1 3 3 PASS .grid 2 4 FAIL .grid 3 assert_equals: 5 <div class="grid"> 6 <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div> 7 <div data-offset-x="10" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div> 8 </div> 9 height expected 60 but got 50 10 FAIL .grid 4 assert_equals: 11 <div class="grid"> 12 <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div> 13 <div data-offset-x="10" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div> 14 </div> 15 height expected 60 but got 50 4 PASS .grid 3 5 PASS .grid 4 16 6 PASS .grid 5 17 7 PASS .grid 6 18 FAIL .grid 7 assert_equals: 19 <div class="grid directionRTL"> 20 <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div> 21 <div data-offset-x="10" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div> 22 </div> 23 height expected 60 but got 50 24 FAIL .grid 8 assert_equals: 25 <div class="grid directionRTL"> 26 <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div> 27 <div data-offset-x="10" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div> 28 </div> 29 height expected 60 but got 50 8 PASS .grid 7 9 PASS .grid 8 30 10 Direction LTR 31 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt
r281662 r284793 2 2 PASS .grid 1 3 3 PASS .grid 2 4 FAIL .grid 3 assert_equals: 5 <div class="grid"> 6 <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div> 7 <div data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div> 8 </div> 9 height expected 60 but got 50 10 FAIL .grid 4 assert_equals: 11 <div class="grid"> 12 <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div> 13 <div data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div> 14 </div> 15 height expected 60 but got 50 4 PASS .grid 3 5 PASS .grid 4 16 6 PASS .grid 5 17 7 PASS .grid 6 18 FAIL .grid 7 assert_equals: 19 <div class="grid directionRTL"> 20 <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div> 21 <div data-offset-x="0" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div> 22 </div> 23 height expected 60 but got 50 24 FAIL .grid 8 assert_equals: 25 <div class="grid directionRTL"> 26 <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div> 27 <div data-offset-x="0" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div> 28 </div> 29 height expected 60 but got 50 8 PASS .grid 7 9 PASS .grid 8 30 10 Direction LTR 31 11 -
trunk/Source/WebCore/ChangeLog
r284792 r284793 1 2021-10-25 Ziran Sun <zsun@igalia.com> 2 3 [CSS-grid] Need to set prefer width dirty for the child that has constraints to the grid area 4 https://bugs.webkit.org/show_bug.cgi?id=232140 5 6 Reviewed by Sergio Villar Senin. 7 8 For a child with relative width constraints to the grid area, such as percentaged paddings, we reset the 9 overridingContainingBlockContentSizeForChild value for columns when we are executing a definite strategy 10 for columns. Since we have updated the overridingContainingBlockContentSizeForChild inline-axis/width value 11 in GridTrackSizingAlgorithmStrategy::minContentForChild, we might need to recompute the child's relative 12 width. For some cases, we probably will not be able to do it during the RenderGrid::layoutGridItems() function 13 as the grid area does't change there any more. Since we are doing a layout inside 14 GridTrackSizingAlgorithmStrategy::logicalHeightForChild() function, this CL takes the advantage and set the 15 preferredLogicalWidth dirty before this layout call. 16 17 * rendering/GridTrackSizingAlgorithm.cpp: 18 (WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const): 19 1 20 2021-10-25 Gabriel Nava Marino <gnavamarino@apple.com> 2 21 -
trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
r283439 r284793 810 810 } 811 811 812 if (updateOverridingContainingBlockContentSizeForChild(child, childInlineDirection)) 812 if (updateOverridingContainingBlockContentSizeForChild(child, childInlineDirection)) { 813 813 child.setNeedsLayout(MarkOnlyThis); 814 // For a child with relative width constraints to the grid area, such as percentaged paddings, we reset the overridingContainingBlockContentSizeForChild value for columns when we are executing a definite strategy 815 // for columns. Since we have updated the overridingContainingBlockContentSizeForChild inline-axis/width value here, we might need to recompute the child's relative width. For some cases, we probably will not 816 // be able to do it during the RenderGrid::layoutGridItems() function as the grid area does't change there any more. Also, as we are doing a layout inside GridTrackSizingAlgorithmStrategy::logicalHeightForChild() 817 // function, let's take the advantage and set it here. 818 if (shouldClearOverridingContainingBlockContentSizeForChild(child, childInlineDirection)) 819 child.setPreferredLogicalWidthsDirty(true); 820 } 814 821 return logicalHeightForChild(child); 815 822 }
Note:
See TracChangeset
for help on using the changeset viewer.