Changeset 270288 in webkit
- Timestamp:
- Dec 1, 2020 1:21:49 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r270287 r270288 1 2020-12-01 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] WebKit doesn't preserve aspect ratio when computing cross size of flexed images in auto-height flex container 4 https://bugs.webkit.org/show_bug.cgi?id=209983 5 <rdar://problem/61288094> 6 7 Reviewed by Darin Adler. 8 9 * TestExpectations: Unskipped 2 tests that are working fine now 10 * css3/flexbox/flexitem.html: Updated expectations. Aspect ratio must be preserved. 11 1 12 2020-12-01 Diego Pino Garcia <dpino@igalia.com> 2 13 -
trunk/LayoutTests/TestExpectations
r270237 r270288 3913 3913 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-006.html [ ImageOnlyFailure ] 3914 3914 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-007.html [ ImageOnlyFailure ] 3915 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-008.html [ ImageOnlyFailure ]3916 3915 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-009.html [ ImageOnlyFailure ] 3917 3916 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-010.html [ ImageOnlyFailure ] 3918 3917 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-013.html [ ImageOnlyFailure ] 3919 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-014.html [ ImageOnlyFailure ]3920 3918 3921 3919 webkit.org/b/145176 imported/w3c/web-platform-tests/css/css-flexbox/flexbox_align-items-stretch-3.html [ ImageOnlyFailure ] -
trunk/LayoutTests/css3/flexbox/flexitem.html
r267995 r270288 48 48 <div class="flexbox"> 49 49 <img data-expected-display="block" data-expected-width="200" style="flex: 1 0 auto;" src="../images/resources/blue-100.png"> 50 <img data-expected-display="block" data-expected-width="200" data-expected-height=" 100" style="flex: 2 0 0;" src="doesnotexist.png">51 <img data-expected-display="block" data-expected-width="200" data-expected-height=" 100" style="flex: 2 0 0;" src="doesnotexist.png" alt="placeholder text">50 <img data-expected-display="block" data-expected-width="200" data-expected-height="200" style="flex: 2 0 0;" src="doesnotexist.png"> 51 <img data-expected-display="block" data-expected-width="200" data-expected-height="200" style="flex: 2 0 0;" src="doesnotexist.png" alt="placeholder text"> 52 52 </div> 53 53 -
trunk/LayoutTests/imported/w3c/ChangeLog
r270269 r270288 1 2020-12-01 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] WebKit doesn't preserve aspect ratio when computing cross size of flexed images in auto-height flex container 4 https://bugs.webkit.org/show_bug.cgi?id=209983 5 <rdar://problem/61288094> 6 7 Reviewed by Darin Adler. 8 9 * web-platform-tests/css/css-flexbox/flexitem-stretch-image-expected.txt: Replace FAIL by PASS expectations. 10 1 11 2020-11-30 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexitem-stretch-image-expected.txt
r267650 r270288 1 1 2 FAIL .flexbox 1 assert_equals: 3 <div class="flexbox"> 4 <img data-expected-display="block" data-expected-width="345" data-expected-height="345" style="flex: 1 0 auto;" src="support/100x100-blue.png"> 5 <img data-expected-display="block" data-expected-width="255" data-expected-height="345" style="flex: 1 0 auto;" src="support/10x10-green.png"> 6 </div> 7 height expected 345 but got 100 2 PASS .flexbox 1 8 3 -
trunk/Source/WebCore/ChangeLog
r270281 r270288 1 2020-12-01 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-flexbox] WebKit doesn't preserve aspect ratio when computing cross size of flexed images in auto-height flex container 4 https://bugs.webkit.org/show_bug.cgi?id=209983 5 <rdar://problem/61288094> 6 7 Reviewed by Darin Adler. 8 9 Aspect ratio was not preserved in the cross axis because WebKit was stretching the items (as they're auto sized) without considering 10 the aspect ratio. Instead of letting flexbox code deal with that we basically don't stretch them and let RenderReplaced compute the 11 cross size based on the aspect ratio as it does with other elements that are not flex items. 12 13 This allows us to pass 3 tests from the WPT test suite. 14 15 * rendering/RenderFlexibleBox.cpp: 16 (WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight const): Return false for replaced elements with aspect ratio. 17 1 18 2020-11-30 Andres Gonzalez <andresg_22@apple.com> 2 19 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r269840 r270288 1551 1551 return false; 1552 1552 1553 // Aspect ratio is properly handled by RenderReplaced during layout. 1554 if (child.isRenderReplaced() && child.hasAspectRatio()) 1555 return false; 1556 1553 1557 return child.style().logicalHeight().isAuto(); 1554 1558 }
Note: See TracChangeset
for help on using the changeset viewer.