Changeset 270116 in webkit
- Timestamp:
- Nov 20, 2020 8:09:32 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r270102 r270116 1 2020-11-20 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flex] Images as flex items should use the overridingLogicalWidth when defined to compute the logical height 4 https://bugs.webkit.org/show_bug.cgi?id=219195 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Replaced 15 FAIL by PASS expectations. 9 10 * web-platform-tests/css/css-flexbox/image-as-flexitem-size-001-expected.txt: 11 * web-platform-tests/css/css-flexbox/image-as-flexitem-size-002v-expected.txt: 12 * web-platform-tests/css/css-flexbox/image-as-flexitem-size-005-expected.txt: 13 * web-platform-tests/css/css-flexbox/image-as-flexitem-size-006v-expected.txt: 14 * web-platform-tests/css/css-flexbox/image-as-flexitem-size-007-expected.txt: 15 1 16 2020-11-20 Chris Lord <clord@igalia.com> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/image-as-flexitem-size-001-expected.txt
r269628 r270116 9 9 PASS .flexbox > img 2 10 10 PASS .flexbox > img 3 11 FAIL .flexbox > img 4 assert_equals: 12 <img src="support/solidblue.png" style="flex: 0 0 30px" data-expected-width="30" data-expected-height="30"> 13 height expected 30 but got 16 11 PASS .flexbox > img 4 14 12 PASS .flexbox > img 5 15 13 PASS .flexbox > img 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/image-as-flexitem-size-002v-expected.txt
r269628 r270116 9 9 PASS .flexbox > img 2 10 10 PASS .flexbox > img 3 11 FAIL .flexbox > img 4 assert_equals: 12 <img src="support/solidblue.png" style="flex: 0 0 30px" data-expected-width="30" data-expected-height="30"> 13 width expected 30 but got 16 11 PASS .flexbox > img 4 14 12 PASS .flexbox > img 5 15 13 PASS .flexbox > img 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/image-as-flexitem-size-005-expected.txt
r269628 r270116 6 6 7 7 8 FAIL .flexbox > img 1 assert_equals: 9 <img src="support/solidblue.png" data-expected-width="40" data-expected-height="40"> 10 height expected 40 but got 16 8 PASS .flexbox > img 1 11 9 PASS .flexbox > img 2 12 10 PASS .flexbox > img 3 13 FAIL .flexbox > img 4 assert_equals: 14 <img src="support/solidblue.png" style="flex: 1 1 30px" data-expected-width="40" data-expected-height="40"> 15 height expected 40 but got 16 16 FAIL .flexbox > img 5 assert_equals: 17 <img src="support/solidblue.png" style="min-width: 34px" data-expected-width="40" data-expected-height="40"> 18 height expected 40 but got 34 19 FAIL .flexbox > img 6 assert_equals: 20 <img src="support/solidblue.png" style="min-height: 34px" data-expected-width="40" data-expected-height="40"> 21 height expected 40 but got 34 22 FAIL .flexbox > img 7 assert_equals: 23 <img src="support/solidblue.png" style="min-width: 30px; 24 min-height: 34px" data-expected-width="40" data-expected-height="40"> 25 height expected 40 but got 34 26 FAIL .flexbox > img 8 assert_equals: 27 <img src="support/solidblue.png" style="min-width: 34px; 28 min-height: 30px" data-expected-width="40" data-expected-height="40"> 29 height expected 40 but got 34 11 PASS .flexbox > img 4 12 PASS .flexbox > img 5 13 PASS .flexbox > img 6 14 PASS .flexbox > img 7 15 PASS .flexbox > img 8 30 16 PASS .flexbox > img 9 31 17 PASS .flexbox > img 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/image-as-flexitem-size-006v-expected.txt
r269628 r270116 6 6 7 7 8 FAIL .flexbox > img 1 assert_equals: 9 <img src="support/solidblue.png" data-expected-width="40" data-expected-height="40"> 10 width expected 40 but got 16 8 PASS .flexbox > img 1 11 9 PASS .flexbox > img 2 12 10 PASS .flexbox > img 3 13 FAIL .flexbox > img 4 assert_equals: 14 <img src="support/solidblue.png" style="flex: 1 1 30px" data-expected-width="40" data-expected-height="40"> 15 width expected 40 but got 16 16 FAIL .flexbox > img 5 assert_equals: 17 <img src="support/solidblue.png" style="min-width: 34px" data-expected-width="40" data-expected-height="40"> 18 width expected 40 but got 34 19 FAIL .flexbox > img 6 assert_equals: 20 <img src="support/solidblue.png" style="min-height: 34px" data-expected-width="40" data-expected-height="40"> 21 width expected 40 but got 34 22 FAIL .flexbox > img 7 assert_equals: 23 <img src="support/solidblue.png" style="min-width: 30px; 24 min-height: 34px" data-expected-width="40" data-expected-height="40"> 25 width expected 40 but got 34 26 FAIL .flexbox > img 8 assert_equals: 27 <img src="support/solidblue.png" style="min-width: 34px; 28 min-height: 30px" data-expected-width="40" data-expected-height="40"> 29 width expected 40 but got 34 11 PASS .flexbox > img 4 12 PASS .flexbox > img 5 13 PASS .flexbox > img 6 14 PASS .flexbox > img 7 15 PASS .flexbox > img 8 30 16 PASS .flexbox > img 9 31 17 PASS .flexbox > img 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/image-as-flexitem-size-007-expected.txt
r269628 r270116 11 11 <img src="support/solidblue.png" style="height: 30px" data-expected-width="32" data-expected-height="30"> 12 12 width expected 32 but got 30 13 FAIL .flexbox > img 4 assert_equals: 14 <img src="support/solidblue.png" style="flex: 0 0 30px" data-expected-width="30" data-expected-height="28"> 15 height expected 28 but got 20 13 PASS .flexbox > img 4 16 14 PASS .flexbox > img 5 17 15 PASS .flexbox > img 6 -
trunk/Source/WebCore/ChangeLog
r270115 r270116 1 2020-11-20 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flex] Images as flex items should use the overridingLogicalWidth when defined to compute the logical height 4 https://bugs.webkit.org/show_bug.cgi?id=219195 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 This is the same fix than the one we did in r270073 but for the other axis. RenderReplaced should use the overridingLogicalWidth 9 whenever defined instead of the specified logical width to compute the logical height using an intrinsic aspect ratio. 10 The overriding width is set by flex containers that need to stretch/shrink their items. The current code was not considering 11 this case and thus, the intrinsic (non-stretched) logical height was used to compute the logical width, 12 meaning that the stretching set by the flexbox container was ignored. 13 14 This patch allows WebKit to pass 15 subtests in already existing aspect ratio flexbox tests from WPT. 15 16 * rendering/RenderReplaced.cpp: 17 (WebCore::RenderReplaced::computeReplacedLogicalHeight const): Use the overriding logical width if defined in presence of a valid aspect ratio. 18 1 19 2020-11-20 Don Olmstead <don.olmstead@sony.com> 2 20 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r270073 r270116 582 582 bool widthIsAuto = style().logicalWidth().isAuto(); 583 583 bool hasIntrinsicHeight = constrainedSize.height() > 0; 584 bool hasIntrinsicWidth = constrainedSize.width() > 0; 585 586 // See computeReplacedLogicalHeight() for a similar check for heights. 587 if (intrinsicRatio && isFlexItem() && hasOverridingLogicalWidth() && hasIntrinsicHeight && hasIntrinsicWidth) 588 return computeReplacedLogicalHeightRespectingMinMaxHeight(roundToInt(round(overridingContentLogicalWidth() / intrinsicRatio))); 584 589 585 590 // If 'height' and 'width' both have computed values of 'auto' and the element also has an intrinsic height, then that intrinsic height is the used value of 'height'.
Note: See TracChangeset
for help on using the changeset viewer.