Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[css-flexbox] WebKit doesn't preserve aspect ratio when computing cro…
…ss size of flexed images in auto-height flex container https://bugs.webkit.org/show_bug.cgi?id=209983 <rdar://problem/61288094> Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/css/css-flexbox/flexitem-stretch-image-expected.txt: Replace FAIL by PASS expectations. Source/WebCore: Aspect ratio was not preserved in the cross axis because WebKit was stretching the items (as they're auto sized) without considering the aspect ratio. Instead of letting flexbox code deal with that we basically don't stretch them and let RenderReplaced compute the cross size based on the aspect ratio as it does with other elements that are not flex items. This allows us to pass 3 tests from the WPT test suite. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight const): Return false for replaced elements with aspect ratio. LayoutTests: * TestExpectations: Unskipped 2 tests that are working fine now * css3/flexbox/flexitem.html: Updated expectations. Aspect ratio must be preserved. Canonical link: https://commits.webkit.org/231990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
7 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
...Tests/imported/w3c/web-platform-tests/css/css-flexbox/flexitem-stretch-image-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
|
||
FAIL .flexbox 1 assert_equals: | ||
<div class="flexbox"> | ||
<img data-expected-display="block" data-expected-width="345" data-expected-height="345" style="flex: 1 0 auto;" src="support/100x100-blue.png"> | ||
<img data-expected-display="block" data-expected-width="255" data-expected-height="345" style="flex: 1 0 auto;" src="support/10x10-green.png"> | ||
</div> | ||
height expected 345 but got 100 | ||
PASS .flexbox 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters