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
[aspect-ratio] Use correct box-sizing when calculating block size
https://bugs.webkit.org/show_bug.cgi?id=243369 Reviewed by Darin Adler. When calculating block size and having both box-sizing and "auto && <ratio>" aspect ratio specified use the specified box-sizing and not the box-sizing implied by "auto && <ratio>". * LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-033.html: * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalHeight const): Canonical link: https://commits.webkit.org/253064@main
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ed/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-050-expected.xht
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>CSS Reftest Reference</title> | ||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> | ||
<style type="text/css"><![CDATA[ | ||
div | ||
{ | ||
background-color: green; | ||
height: 100px; | ||
width: 100px; | ||
} | ||
]]></style> | ||
</head> | ||
<body> | ||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
<div></div> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
...s/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-050.html
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<title>CSS aspect-ratio: Use correct box-sizing when calculating block size</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#valdef-aspect-ratio-auto--ratio"> | ||
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> | ||
<meta name="assert" content="CSS aspect-ratio: Use correct box-sizing when calculating block size."> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="background: green; width: 100px; aspect-ratio: auto 1/1; box-sizing: border-box; padding-top:10px; padding-left: 50px"> | ||
<div style="height: 90px"></div> | ||
</div> |
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