Update web-platform-tests to revision 8b1aea6eed110e7900f1df933b24945fbb3c8229

This commit is contained in:
WPT Sync Bot 2020-08-04 08:22:01 +00:00
parent 8bf3440380
commit 1cd53da938
113 changed files with 2292 additions and 900 deletions

View file

@ -17,6 +17,6 @@ test(function() {
var body = document.body;
assert_equals(getComputedStyle(body).getPropertyValue("flex-basis"),
"0px");
"0%");
});
</script>

View file

@ -21,6 +21,6 @@ test(function() {
assert_equals(getComputedStyle(body).getPropertyValue("flex-shrink"),
"1");
assert_equals(getComputedStyle(body).getPropertyValue("flex-basis"),
"0px");
"0%");
});
</script>

View file

@ -0,0 +1,63 @@
<!doctype quirks>
<title>CSS Flexbox: percentage size in flexbox children in quirks mode</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers">
<link rel="help" href="https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk" title="Number 4">
<link rel="help" href="https://crbug.com/1054185">
<meta name="assert" content="This test checks that percentage height/width values in flexbox descendants are correctly resolved in quirks mode.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
.fixed-height { height: 100px; }
.flex {
display: flex;
border: 3px solid black;
}
.pct {
height: 100%;
min-height: 10px;
width: 50px;
display: inline-block;
vertical-align: top;
background: purple;
}
.px {
height: 50px;
width: 50px;
display: inline-block;
vertical-align: top;
background: blue
};
</style>
flex with 1 wrapper div inside:
<div class="fixed-height">
<div class="flex">
<div>
<div class="pct" data-expected-height=50></div>
<div class="px"></div>
</div>
</div>
</div>
flex with several wrapper divs inside:
<div class="fixed-height">
<div class="flex">
<div>
<div>
<div>
<div class="pct" data-expected-height=50></div>
<div class="px"></div>
</div>
</div>
</div>
</div>
</div>
<script>
checkLayout('.pct');
</script>

View file

@ -0,0 +1,82 @@
<!doctype html>
<title>abspos flex children with top margins</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.org">
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items">
<link rel="bookmark" href="https://crbug.com/808750">
<meta name="flags" content="dom">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.container {
display: flex;
background: lightgray;
width: 250px;
height: 48px;
/* Add some margin so that overflowing things don't stomp on each other: */
margin: 50px 10px;
float: left;
position: relative;
}
.contentBox {
position: absolute;
/* Margin-box is 100px tall (2px of border + 98px of content): */
border: 1px solid teal;
height: 98px;
width: 98px;
left: 20px;
}
.marginBox {
position: absolute;
/* Margin-box is 100px tall
(60px of margin-top + 2px of border + 38px of content): */
margin-top: 60px;
border: 1px solid orange;
height: 38px;
width: 100px;
left: 120px;
}
</style>
<div class="container">
<div class="contentBox">
aaa
</div>
<div class="marginBox">
bbb
</div>
</div>
<div class="container" style="align-items: flex-end">
<div class="contentBox">
aaa
</div>
<div class="marginBox">
bbb
</div>
</div>
<div class="container" style="align-items: center">
<div class="contentBox">
aaa
</div>
<div class="marginBox">
bbb
</div>
</div>
<div id=log style="clear:both"></div>
<script>
test(function() {
var elements = document.querySelectorAll(".contentBox, .marginBox");
for (var i = 0; i < elements.length; i+=2) {
assert_equals(elements[i].getBoundingClientRect().bottom,
elements[i+1].getBoundingClientRect().bottom);
}
}, "The bottom of each pair of boxes should be the same");
</script>