mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 5721f7843f406054b8e02b0e33ff8e733830cc3d
This commit is contained in:
parent
f9e7c6b9dc
commit
1dbfe69c91
124 changed files with 2796 additions and 350 deletions
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Flexbox: flex-flow auto margin with no available space</title>
|
||||
<title>CSS Flexbox: flex-flow percentage margin with no available space</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-shrink-property">
|
||||
<link rel="help" href="https://crbug.com/380201">
|
||||
<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=380201">
|
||||
<meta name="assert" content="This test checks that a flexbox doesn't shrink below border/padding
|
||||
when stretching children with no available space.">
|
||||
<style>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Flexbox: column-* properties are ignored.</title>
|
||||
<link rel="stylesheet" href="support/flexbox.css">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#propdef-column-count">
|
||||
<link rel="match" href="reference/flexbox-with-multi-column-property-ref.html">
|
||||
<meta name="assert" content="This test ensures that column-* properties (in the Multicol module) have no effect on a flex container."/>
|
||||
<style>
|
||||
.flexbox, .inline-flexbox {
|
||||
column-count: 2;
|
||||
column-gap: 100px;
|
||||
width: 20em;
|
||||
}
|
||||
</style>
|
||||
<div class="flexbox">
|
||||
AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC DDDDDDDDDD
|
||||
</div>
|
||||
|
||||
<div class="inline-flexbox">
|
||||
AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC DDDDDDDDDD
|
||||
</div>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>CSS Flexbox: image stretch</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto">
|
||||
<link href="support/flexbox.css" rel="stylesheet">
|
||||
<meta name="assert" content="This test ensures that flexbox stretches a given image
|
||||
to fit the size of flexitem according to flex values.">
|
||||
<style>
|
||||
.flexbox {
|
||||
width: 600px;
|
||||
display: flex;
|
||||
background-color: #aaa;
|
||||
position: relative;
|
||||
min-height: 10px;
|
||||
}
|
||||
.flexbox > * {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<body onload="checkLayout('.flexbox')">
|
||||
<div id=log></div>
|
||||
|
||||
<div class="flexbox">
|
||||
<img data-expected-display="block" data-expected-width="345" style="flex: 1 0 auto;" src="support/100x100-blue.png">
|
||||
<img data-expected-display="block" data-expected-width="255" data-expected-height="100" style="flex: 1 0 auto;" src="support/10x10-green.png">
|
||||
</div>
|
||||
|
||||
</body>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>CSS Flexbox: range stretch</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto">
|
||||
<link rel="match" href="reference/flexitem-stretch-range-ref.html">
|
||||
<link href="support/flexbox.css" rel="stylesheet">
|
||||
<meta name="assert" content="This test ensures that the thumb should be centered vertically
|
||||
when stretching a range input.">
|
||||
<body>
|
||||
<p>When stretching a range input, the thumb should be centered vertically.</p>
|
||||
<div class="flexbox" style="height: 200px;">
|
||||
<input type="range" style="flex: 1; margin: 0;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,151 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Flexbox: multiline flexbox and line breaks.</title>
|
||||
<link rel="stylesheet" href="support/flexbox.css" >
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-main-item">
|
||||
<meta name="assert" content="This test ensures that multiline flexbox uses min/max constraints when finding line breaks."/>
|
||||
<style>
|
||||
.flexbox {
|
||||
width: 600px;
|
||||
background-color: grey;
|
||||
border: 5px solid black;
|
||||
height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.flexbox > div {
|
||||
height: 10px;
|
||||
}
|
||||
.children-border-box > div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flexbox :nth-child(1) {
|
||||
background-color: blue;
|
||||
}
|
||||
.flexbox :nth-child(2) {
|
||||
background-color: yellow;
|
||||
}
|
||||
.flexbox :nth-child(3) {
|
||||
background-color: salmon;
|
||||
}
|
||||
.flexbox :nth-child(4) {
|
||||
background-color: lime;
|
||||
}
|
||||
.flexbox :nth-child(5) {
|
||||
background-color: red;
|
||||
}
|
||||
.flexbox :nth-child(6) {
|
||||
background-color: orange;
|
||||
}
|
||||
.flexbox :nth-child(7) {
|
||||
background-color: purple;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
</head>
|
||||
<body onload="checkLayout('.flexbox')">
|
||||
<div id=log></div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div class="flex-one" style="min-width: 400px" data-expected-width="400" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="400" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div class="flex-one" style="min-width: 400px; padding-left: 10px;" data-expected-width="500" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="100" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div class="flex-one" style="min-width: 400px; border-left: 10px solid red;" data-expected-width="500" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="100" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div class="flex-one" style="min-width: 400px; margin-left: 10px;" data-expected-width="490" data-offset-x="10" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="100" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px;" data-expected-width="300" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="300" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="400" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px; padding-left: 10px;" data-expected-width="310" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="310" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="455" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="600" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px; border-left: 10px solid red;" data-expected-width="310" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="310" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="455" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="600" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px; margin-left: 10px;" data-expected-width="300" data-offset-x="10" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="310" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="455" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="600" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap children-border-box">
|
||||
<div class="flex-one" style="min-width: 400px; padding-left: 10px;" data-expected-width="400" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="400" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap children-border-box">
|
||||
<div class="flex-one" style="min-width: 400px; border-left: 10px solid red;" data-expected-width="400" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="400" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap children-border-box">
|
||||
<div class="flex-one" style="min-width: 400px; margin-left: 10px;" data-expected-width="490" data-offset-x="10" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="0" data-offset-y="10"></div>
|
||||
<div class="flex-none" style="width: 100px" data-expected-width="100" data-offset-x="100" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap children-border-box">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px; padding-left: 10px;" data-expected-width="300" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="300" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="400" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap children-border-box">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px; border-left: 10px solid red;" data-expected-width="300" data-offset-x="0" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="300" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="400" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="100" data-offset-x="500" data-offset-y="0"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap children-border-box">
|
||||
<div style="flex: 1 1 600px; flex: 1 1 600px; max-width: 300px; margin-left: 10px;" data-expected-width="300" data-offset-x="10" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="310" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="145" data-offset-x="455" data-offset-y="0"></div>
|
||||
<div class="flex-one-one-auto" style="width: 100px" data-expected-width="600" data-offset-x="0" data-offset-y="10"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Flexbox: align-items: center/flex-end and bottom padding.</title>
|
||||
<link rel="stylesheet" href="support/flexbox.css" >
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#align-items-property">
|
||||
<meta name="assert" content="This test ensures that flexbox containers with 'align-items: center|flex-end' and 'overflow: auto/scroll' have no extra bottom padding."/>
|
||||
<style>
|
||||
.flexbox {
|
||||
overflow: auto;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
background-color: red;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.vertical-padding {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 10px;
|
||||
background-color: lime;
|
||||
}
|
||||
|
||||
.vertical-border {
|
||||
border-top: 2px solid black;
|
||||
border-bottom: 8px solid lightblue;
|
||||
}
|
||||
|
||||
.flexbox > div {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
checkLayout('.flexbox');
|
||||
|
||||
// Make failures more obvious by showing the red background that should have been clipped.
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".flexbox"), function(element) {
|
||||
element.scrollTop = 1000;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id=log></div>
|
||||
|
||||
<div class="flexbox align-items-flex-end" data-expected-scroll-height="50">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox align-items-flex-end" data-expected-scroll-height="150">
|
||||
<div></div>
|
||||
<div style="position: absolute; left: 0; top: 50px;"></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox align-items-center" data-expected-scroll-height="75">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox" data-expected-scroll-height="100">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap-reverse" data-expected-scroll-height="50">
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox align-items-flex-end vertical-padding" data-expected-scroll-height="65">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox align-items-flex-end vertical-padding vertical-border" data-expected-scroll-height="65">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox align-items-center vertical-padding" data-expected-scroll-height="90">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox vertical-padding" data-expected-scroll-height="115">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox vertical-padding vertical-border" data-expected-scroll-height="115">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="flexbox wrap-reverse vertical-padding" data-expected-scroll-height="65">
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Flexbox: percentage height of flex item</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property">
|
||||
<link href="support/flexbox.css" rel="stylesheet">
|
||||
<meta name="assert" content="This test checks that the height of flexitems work properly
|
||||
with percentage value and 'overflow-y' auto.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/check-layout-th.js"></script>
|
||||
<script>
|
||||
window.onload = function()
|
||||
{
|
||||
var outer = document.getElementById("outer");
|
||||
outer.style.height = "300px";
|
||||
outer.offsetLeft;
|
||||
outer.style.height = "100px";
|
||||
checkLayout('#outer');
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id=log></div>
|
||||
<div id="outer" data-expected-height="100">
|
||||
<div class="flexbox" data-expected-height="100" style="height: 100%">
|
||||
<div class="flex-one" data-expected-height="100" style="overflow-y: auto; height: 100%">
|
||||
<div data-expected-height="100" style="height: 100%">
|
||||
<div data-expected-height="100" style="width: 100px; height: 100px; background-color: green"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<link href="resources/flexbox.css" rel="stylesheet">
|
||||
<style>
|
||||
.flexbox, .inline-flexbox {
|
||||
width: 20em;
|
||||
font-kerning: none;
|
||||
}
|
||||
</style>
|
||||
<div class="flexbox">
|
||||
AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC DDDDDDDDDD
|
||||
</div>
|
||||
|
||||
<div class="inline-flexbox">
|
||||
AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC DDDDDDDDDD
|
||||
</div>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<p>When stretching a range input, the thumb should be centered vertically.</p>
|
||||
<div style="height: 200px;">
|
||||
<input type="range" style="width: 100%; height: 100%; margin: 0;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 92 B |
Loading…
Add table
Add a link
Reference in a new issue