-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resolving flexible lengths (WPT css/flexbox-multiline-min-max tes…
…t) (#692) * Port failing multiline-min-max tests from WPT * Don't assume that we are flex-shrinking just because we are not flex-growing (we may be exactly sized) * Don't double count margins when calculating free space when resolving flexible lengths
- Loading branch information
Showing
12 changed files
with
2,231 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="../../scripts/gentest/test_helper.js"></script> | ||
<link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css"> | ||
<meta name="wpt-test-port" value="css/css-flexbox/multiline-min-max.html" /> | ||
<meta name="wpt-subtest" value=".flexbox 8" /> | ||
<style type="text/css"> | ||
#test-root { background-color: grey; } | ||
#test-root :nth-child(1) { background-color: blue; } | ||
#test-root :nth-child(2) { background-color: yellow; } | ||
#test-root :nth-child(3) { background-color: salmon; } | ||
#test-root :nth-child(4) { background-color: lime; } | ||
#test-root :nth-child(5) { background-color: red; } | ||
#test-root :nth-child(6) { background-color: orange; } | ||
#test-root :nth-child(7) { background-color: purple; } | ||
</style> | ||
<title> | ||
Test description | ||
</title> | ||
</head> | ||
<body> | ||
|
||
<div id="test-root" style="box-sizing: content-box; display: flex; flex-wrap: wrap; width: 600px; background-color: grey; border: 5px solid black; height: 20px; position: relative;"> | ||
<div style="box-sizing: border-box; height: 10px; max-width: 300px; flex: 1 1 600px; padding-left: 10px;" data-w="300" data-x="0" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="300" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="400" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="500" data-y="0"></div> | ||
</div> | ||
|
||
</body> | ||
</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,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="../../scripts/gentest/test_helper.js"></script> | ||
<link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css"> | ||
<meta name="wpt-test-port" value="css/css-flexbox/multiline-min-max.html" /> | ||
<meta name="wpt-subtest" value=".flexbox 8" /> | ||
<style type="text/css"> | ||
#test-root { background-color: grey; } | ||
#test-root :nth-child(1) { background-color: blue; } | ||
#test-root :nth-child(2) { background-color: yellow; } | ||
#test-root :nth-child(3) { background-color: salmon; } | ||
#test-root :nth-child(4) { background-color: lime; } | ||
#test-root :nth-child(5) { background-color: red; } | ||
#test-root :nth-child(6) { background-color: orange; } | ||
#test-root :nth-child(7) { background-color: purple; } | ||
</style> | ||
<title> | ||
Test description | ||
</title> | ||
</head> | ||
<body> | ||
|
||
<div id="test-root" style="box-sizing: content-box; display: flex; flex-wrap: wrap; width: 600px; background-color: grey; border: 5px solid black; height: 20px; position: relative;"> | ||
<div style="box-sizing: border-box; height: 10px; max-width: 300px; flex: 1 1 600px; border-left: 10px solid red;" data-w="300" data-x="0" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="300" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="400" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="500" data-y="0"></div> | ||
</div> | ||
|
||
</body> | ||
</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,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="../../scripts/gentest/test_helper.js"></script> | ||
<link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css"> | ||
<meta name="wpt-test-port" value="css/css-flexbox/multiline-min-max.html" /> | ||
<meta name="wpt-subtest" value=".flexbox 8" /> | ||
<style type="text/css"> | ||
#test-root { background-color: grey; } | ||
#test-root :nth-child(1) { background-color: blue; } | ||
#test-root :nth-child(2) { background-color: yellow; } | ||
#test-root :nth-child(3) { background-color: salmon; } | ||
#test-root :nth-child(4) { background-color: lime; } | ||
#test-root :nth-child(5) { background-color: red; } | ||
#test-root :nth-child(6) { background-color: orange; } | ||
#test-root :nth-child(7) { background-color: purple; } | ||
</style> | ||
<title> | ||
Test description | ||
</title> | ||
</head> | ||
<body> | ||
|
||
<div id="test-root" style="box-sizing: content-box; display: flex; flex-wrap: wrap; width: 600px; background-color: grey; border: 5px solid black; height: 20px; position: relative;"> | ||
<div style="box-sizing: border-box; height: 10px; max-width: 300px; flex: 1 1 600px; margin-left: 10px;" data-w="300" data-x="10" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="145" data-x="310" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="145" data-x="455" data-y="0"></div> | ||
<div style="box-sizing: border-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="600" data-x="0" data-y="10"></div> | ||
</div> | ||
|
||
</body> | ||
</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,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="../../scripts/gentest/test_helper.js"></script> | ||
<link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css"> | ||
<meta name="wpt-test-port" value="css/css-flexbox/multiline-min-max.html" /> | ||
<meta name="wpt-subtest" value=".flexbox 5" /> | ||
<style type="text/css"> | ||
#test-root { background-color: grey; } | ||
#test-root :nth-child(1) { background-color: blue; } | ||
#test-root :nth-child(2) { background-color: yellow; } | ||
#test-root :nth-child(3) { background-color: salmon; } | ||
#test-root :nth-child(4) { background-color: lime; } | ||
#test-root :nth-child(5) { background-color: red; } | ||
#test-root :nth-child(6) { background-color: orange; } | ||
#test-root :nth-child(7) { background-color: purple; } | ||
</style> | ||
<title> | ||
Test description | ||
</title> | ||
</head> | ||
<body> | ||
|
||
<div id="test-root" style="display: flex; flex-wrap: wrap; width: 600px; border: 5px solid black; height: 20px; position: relative; box-sizing: content-box;"> | ||
<div style="box-sizing: content-box; height: 10px; max-width: 300px; flex: 1 1 600px;" data-w="300" data-x="0" data-y="0"></div> | ||
<div style="box-sizing: content-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="300" data-y="0"></div> | ||
<div style="box-sizing: content-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="400" data-y="0"></div> | ||
<div style="box-sizing: content-box; height: 10px; width: 100px; flex: 1 1 auto;" data-w="100" data-x="500" data-y="0"></div> | ||
</div> | ||
|
||
</body> | ||
</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,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<script src="../../scripts/gentest/test_helper.js"></script> | ||
<link rel="stylesheet" type="text/css" href="../../scripts/gentest/test_base_style.css"> | ||
<meta name="wpt-test-port" value="css/css-flexbox/multiline-min-max.html" /> | ||
<meta name="wpt-subtest" value=".flexbox 8" /> | ||
<style type="text/css"> | ||
#test-root { background-color: grey; } | ||
#test-root :nth-child(1) { background-color: blue; } | ||
#test-root :nth-child(2) { background-color: yellow; } | ||
#test-root :nth-child(3) { background-color: salmon; } | ||
#test-root :nth-child(4) { background-color: lime; } | ||
#test-root :nth-child(5) { background-color: red; } | ||
#test-root :nth-child(6) { background-color: orange; } | ||
#test-root :nth-child(7) { background-color: purple; } | ||
</style> | ||
<title> | ||
Test description | ||
</title> | ||
</head> | ||
<body> | ||
|
||
<div id="test-root" style="display: flex; flex-wrap: wrap; width: 600px; background-color: grey; border: 5px solid black; height: 20px; position: relative; box-sizing: content-box;"> | ||
<div style="height: 10px; max-width: 300px; flex: 1 1 600px; margin-left: 10px;" data-w="300" data-x="10" data-y="0"></div> | ||
<div style="height: 10px; width: 100px; flex: 1 1 auto;" data-w="145" data-x="310" data-y="0"></div> | ||
<div style="height: 10px; width: 100px; flex: 1 1 auto;" data-w="145" data-x="455" data-y="0"></div> | ||
<div style="height: 10px; width: 100px; flex: 1 1 auto;" data-w="600" data-x="0" data-y="10"></div> | ||
</div> | ||
|
||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.