Changeset 280078 in webkit
- Timestamp:
- Jul 20, 2021 4:26:28 AM (12 months ago)
- Location:
- trunk
- Files:
-
- 11 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-alignment-implies-size-change-029-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderGrid.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderReplaced.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280075 r280078 1 2021-07-20 Ziran Sun <zsun@igalia.com> 2 3 Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height 4 https://bugs.webkit.org/show_bug.cgi?id=228022 5 6 Reviewed by Javier Fernandez. 7 8 Update TestExpectations as 3 failed grid WPT tests are now passing. 9 10 * TestExpectations: 11 1 12 2021-07-20 Rob Buis <rbuis@igalia.com> 2 13 -
trunk/LayoutTests/TestExpectations
r280075 r280078 1444 1444 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html [ ImageOnlyFailure ] 1445 1445 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ] 1446 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-002.html [ ImageOnlyFailure ]1447 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.html [ ImageOnlyFailure ]1448 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.html [ ImageOnlyFailure ]1449 1446 1450 1447 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-aspect-ratio-001.html [ ImageOnlyFailure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r280075 r280078 1 2021-07-20 Ziran Sun <zsun@igalia.com> 2 3 Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height 4 https://bugs.webkit.org/show_bug.cgi?id=228022 5 6 Reviewed by Javier Fernandez. 7 8 Update test expectations as the sub-tests are now passing. 9 10 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt: 11 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt: 12 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt: 13 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt: 14 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt: 15 1 16 2021-07-20 Rob Buis <rbuis@igalia.com> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt
r279269 r280078 1 1 2 2 3 FAIL .before 1 assert_equals: 4 <img id="item" src="support/100x100-green.png" class=" before" data-expected-width="200" data-expected-height="200"> 5 height expected 200 but got 100 3 PASS .before 1 6 4 PASS .after 2 7 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt
r279269 r280078 2 2 3 3 PASS .before 1 4 FAIL .after 2 assert_equals: 5 <img id="item" src="support/100x100-green.png" class=" before after" data-expected-width="200" data-expected-height="200"> 6 height expected 200 but got 100 4 PASS .after 2 7 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt
r279269 r280078 1 1 2 2 3 FAIL .before 1 assert_equals: 4 <img id="item" src="support/100x100-green.png" class=" before" data-expected-width="200" data-expected-height="200"> 5 height expected 200 but got 100 3 PASS .before 1 6 4 PASS .after 2 7 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt
r279269 r280078 2 2 3 3 PASS .before 1 4 FAIL .after 2 assert_equals: 5 <img id="item" src="support/100x100-green.png" class=" before after" data-expected-width="80" data-expected-height="80"> 6 height expected 80 but got 100 4 PASS .after 2 7 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt
r279269 r280078 1 1 2 2 3 FAIL .before 1 assert_equals: 4 <img id="item" src="support/100x100-green.png" class=" before" data-expected-width="80" data-expected-height="80"> 5 height expected 80 but got 100 3 PASS .before 1 6 4 PASS .after 2 7 5 -
trunk/Source/WebCore/ChangeLog
r280075 r280078 1 2021-07-20 Ziran Sun <zsun@igalia.com> 2 3 Images as grid items should use the overridingLogicalWidth when defined to compute the logical Height 4 https://bugs.webkit.org/show_bug.cgi?id=228022 5 6 Reviewed by Javier Fernandez. 7 8 When computing the logical height using an intrinsic aspect ratio, RenderReplaced should use the 9 overridingLogicalWidth whenever defined just as how it does for flex items. This change is to 10 replace the use of intrinsic (non-stretched) logical width in current code with the overridingLogicalWidth. 11 12 The current code doesn't set overringLogicalWidth while the width changes while stretches along Row Axis. 13 This change adds the logic in. 14 15 * rendering/RenderGrid.cpp: 16 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): 17 * rendering/RenderReplaced.cpp: 18 (WebCore::RenderReplaced::computeReplacedLogicalHeight const): 19 1 20 2021-07-20 Rob Buis <rbuis@igalia.com> 2 21 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r280075 r280078 1150 1150 { 1151 1151 ASSERT(child.overridingContainingBlockContentLogicalHeight()); 1152 1153 // We clear height override values because we will decide now whether it's allowed or 1152 ASSERT(child.overridingContainingBlockContentLogicalWidth()); 1153 1154 // We clear height and width override values because we will decide now whether it's allowed or 1154 1155 // not, evaluating the conditions which might have changed since the old values were set. 1155 1156 child.clearOverridingLogicalHeight(); 1157 child.clearOverridingLogicalWidth(); 1156 1158 1157 1159 GridTrackSizingDirection childBlockDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForRows); 1160 GridTrackSizingDirection childInlineDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForColumns); 1158 1161 bool blockFlowIsColumnAxis = childBlockDirection == ForRows; 1159 1162 bool allowedToStretchChildBlockSize = blockFlowIsColumnAxis ? allowedToStretchChildAlongColumnAxis(child) : allowedToStretchChildAlongRowAxis(child); … … 1171 1174 child.setNeedsLayout(MarkOnlyThis); 1172 1175 } 1173 } 1176 } else if (!allowedToStretchChildBlockSize && allowedToStretchChildAlongRowAxis(child)) { 1177 LayoutUnit stretchedLogicalWidth = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, childInlineDirection).value(), child); 1178 LayoutUnit desiredLogicalWidth = constrainLogicalWidthInFragmentByMinMax(stretchedLogicalWidth, contentWidth(), *this, nullptr); 1179 child.setOverridingLogicalWidth(desiredLogicalWidth); 1180 if (desiredLogicalWidth != child.logicalWidth()) { 1181 child.setLogicalWidth(0_lu); 1182 child.setNeedsLayout(MarkOnlyThis); 1183 } 1184 } 1174 1185 } 1175 1186 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r280024 r280078 624 624 625 625 // See computeReplacedLogicalHeight() for a similar check for heights. 626 if (intrinsicRatio && isFlexItem() && hasOverridingLogicalWidth() && hasIntrinsicHeight && hasIntrinsicWidth)626 if (intrinsicRatio && (isFlexItem() || isGridItem()) && hasOverridingLogicalWidth() && hasIntrinsicHeight && hasIntrinsicWidth) 627 627 return computeReplacedLogicalHeightRespectingMinMaxHeight(roundToInt(round(overridingContentLogicalWidth() / intrinsicRatio))); 628 628
Note: See TracChangeset
for help on using the changeset viewer.