Changeset 285998 in webkit
- Timestamp:
- Nov 18, 2021, 5:12:28 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (2 diffs)
-
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)
-
LayoutTests/platform/win/TestExpectations (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
r285993 r285998 1 2021-11-18 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 * TestExpectations: unskip tests that are now passing. 9 1 10 2021-11-18 Youenn Fablet <youenn@apple.com> 2 11 -
trunk/LayoutTests/TestExpectations
r285989 r285998 1389 1389 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-001.html [ ImageOnlyFailure ] 1390 1390 webkit.org/b/216146 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-justify-001.html [ ImageOnlyFailure ] 1391 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-002.html [ ImageOnlyFailure ]1392 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.html [ ImageOnlyFailure ]1393 imported/w3c/web-platform-tests/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.html [ ImageOnlyFailure ]1394 1391 1395 1392 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-dynamic-001.html [ ImageOnlyFailure ] … … 4327 4324 webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html [ ImageOnlyFailure ] 4328 4325 webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html [ ImageOnlyFailure ] 4329 webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-3.html [ ImageOnlyFailure ]4330 webkit.org/b/227900 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-4.html [ ImageOnlyFailure ]4331 4326 webkit.org/b/212246 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-baseline-align-cycles-001.html [ ImageOnlyFailure ] 4332 4327 webkit.org/b/231021 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-baseline.html [ ImageOnlyFailure ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r285995 r285998 1 2021-11-18 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 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt: 9 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-030-expected.txt: 10 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-031-expected.txt: 11 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-035-expected.txt: 12 * web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-036-expected.txt: 13 1 14 2021-11-18 Arcady Goldmints-Orlov <agoldmints@igalia.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-alignment-implies-size-change-029-expected.txt
r285857 r285998 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
r285857 r285998 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
r285857 r285998 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
r285857 r285998 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
r285857 r285998 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/LayoutTests/platform/win/TestExpectations
r285936 r285998 3825 3825 webkit.org/b/177216 fast/images/animated-image-mp4.html [ Skip ] 3826 3826 3827 webkit.org/b/228325 fast/images/exif-orientation-composited.html [ Pass ImageOnlyFailure ]3828 3829 3827 webkit.org/b/177234 http/wpt/resource-timing/rt-cors.html [ Skip ] 3830 3828 webkit.org/b/177234 http/wpt/resource-timing/rt-cors.worker.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r285997 r285998 1 2021-11-18 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 This is a re-land of r280078 and r282008. r280078 has caused a crash. Details on the crash test case is 7 at https://bugs.webkit.org/show_bug.cgi?id=232922. The reason for the crash is that, when recomputing the 8 intrinsic width we need to recompute the intrinsic width of the caller, which is the grid item, rather than 9 the grid in this case. 10 11 This patch addresses the original issue and the cause for the crash. 12 13 When computing the logical height using an intrinsic aspect ratio, RenderReplaced should use the 14 overridingLogicalWidth whenever defined just as how it does for flex items. This change is to 15 replace the use of intrinsic (non-stretched) logical width in current code with the overridingLogicalWidth. 16 17 The current code doesn't set overringLogicalWidth while the width changes while stretches along Row Axis. 18 This change adds the logic in. 19 20 Reviewed by Javier Fernandez. 21 22 * rendering/RenderGrid.cpp: 23 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): 24 * rendering/RenderReplaced.cpp: 25 (WebCore::RenderReplaced::computeReplacedLogicalHeight const): 26 1 27 2021-10-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 28 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r285987 r285998 1184 1184 { 1185 1185 ASSERT(child.overridingContainingBlockContentLogicalHeight()); 1186 1187 // We clear height override values because we will decide now whether it's allowed or 1186 ASSERT(child.overridingContainingBlockContentLogicalWidth()); 1187 1188 // We clear height and width override values because we will decide now whether it's allowed or 1188 1189 // not, evaluating the conditions which might have changed since the old values were set. 1189 1190 child.clearOverridingLogicalHeight(); 1191 child.clearOverridingLogicalWidth(); 1190 1192 1191 1193 GridTrackSizingDirection childBlockDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForRows); 1194 GridTrackSizingDirection childInlineDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForColumns); 1192 1195 bool blockFlowIsColumnAxis = childBlockDirection == ForRows; 1193 1196 bool allowedToStretchChildBlockSize = blockFlowIsColumnAxis ? allowedToStretchChildAlongColumnAxis(child) : allowedToStretchChildAlongRowAxis(child); … … 1205 1208 child.setNeedsLayout(MarkOnlyThis); 1206 1209 } 1207 } 1210 } else if (!allowedToStretchChildBlockSize && allowedToStretchChildAlongRowAxis(child)) { 1211 LayoutUnit stretchedLogicalWidth = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, childInlineDirection).value(), child); 1212 LayoutUnit desiredLogicalWidth = child.constrainLogicalWidthInFragmentByMinMax(stretchedLogicalWidth, contentWidth(), *this, nullptr); 1213 child.setOverridingLogicalWidth(desiredLogicalWidth); 1214 if (desiredLogicalWidth != child.logicalWidth()) 1215 child.setNeedsLayout(MarkOnlyThis); 1216 } 1208 1217 } 1209 1218 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r285987 r285998 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.