mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 8fed98324bc133df221d778c62cbff210d43b0ce
This commit is contained in:
parent
be902d56c0
commit
8a6476740e
246 changed files with 15482 additions and 1281 deletions
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
position: relative;
|
||||
margin: 20px 0;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border: solid 2px;
|
||||
}
|
||||
|
||||
.result {
|
||||
position: absolute;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div class="result" style="width: 100px; height: 100px; bottom: 0px;"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="result" style="width: 100px; height: 200px;"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="result" style="width: 100px; height: 100px;"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="result" style="width: 200px; height: 100px;"></div>
|
||||
</div>
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
|
||||
<link rel="match" href="auto-block-size-absolute-ref.html">
|
||||
<meta name="assert" content="This test checks that the absolute positioning respects the auto-block-size." />
|
||||
|
||||
<style>
|
||||
.test {
|
||||
position: absolute;
|
||||
background: red;
|
||||
}
|
||||
|
||||
@supports (display: layout(block-size-100)) {
|
||||
.test {
|
||||
display: layout(block-size-100);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
margin: 20px 0;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border: solid 2px;
|
||||
}
|
||||
|
||||
.width-100 {
|
||||
width: 100px;
|
||||
writing-mode: horizontal-tb;
|
||||
}
|
||||
|
||||
.height-100 {
|
||||
height: 100px;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- 100px x 100px, bottom-left -->
|
||||
<div class="container">
|
||||
<div class="test width-100" style="bottom: 0px"></div>
|
||||
</div>
|
||||
|
||||
<!-- 100px x 200px, left, auto-size is ignored. -->
|
||||
<div class="container">
|
||||
<div class="test width-100" style="top: 0px; bottom: 0px"></div>
|
||||
</div>
|
||||
|
||||
<!-- 100px x 100px, top-left -->
|
||||
<div class="container">
|
||||
<div class="test height-100" style="left: 0px;"></div>
|
||||
</div>
|
||||
|
||||
<!-- 100px x 100px, top, auto-size is ignored. -->
|
||||
<div class="container">
|
||||
<div class="test height-100" style="left: 0px; right: 0px;"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
border: solid 2px;
|
||||
display: flow-root;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.child {
|
||||
background: green;
|
||||
border: solid 2px;
|
||||
box-sizing: border-box;
|
||||
float: left;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="child" style="width: 100px;"></div>
|
||||
<div class="child" style="width: 200px;"></div>
|
||||
</div>
|
|
@ -0,0 +1,61 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
|
||||
<link rel="match" href="auto-block-size-flex-ref.html">
|
||||
<meta name="assert" content="This test checks that the flex layout respects the auto-block-size." />
|
||||
|
||||
<style>
|
||||
.flex {
|
||||
width: 300px;
|
||||
display: flex;
|
||||
border: solid 2px;
|
||||
}
|
||||
|
||||
.custom {
|
||||
background: red;
|
||||
box-sizing: border-box;
|
||||
border: solid 2px;
|
||||
height: 100px;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
|
||||
@supports (display: layout(block-size-100)) {
|
||||
.custom-100 {
|
||||
display: layout(block-size-100);
|
||||
background: green;
|
||||
}
|
||||
.custom-50 {
|
||||
display: layout(block-size-50);
|
||||
background: green;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- Tests that floats using an auto block size get positioned correctly. -->
|
||||
<div class="flex">
|
||||
<div class="custom custom-100"></div>
|
||||
<div class="custom custom-50"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
registerLayout('block-size-50', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
return {autoBlockSize: 50};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
width: 150px;
|
||||
border: solid 2px;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
background: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
background: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="left"></div>
|
||||
<div class="right"></div>
|
||||
</div>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
|
||||
<link rel="match" href="auto-block-size-floats-ref.html">
|
||||
<meta name="assert" content="This test checks that if the layout() is a float, the flow layout respects the auto-block-size." />
|
||||
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
}
|
||||
|
||||
@supports (display: layout(block-size-100)) {
|
||||
.test {
|
||||
display: layout(block-size-100);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 150px;
|
||||
border: solid 2px;
|
||||
}
|
||||
|
||||
.left {
|
||||
float: left;
|
||||
width: 100px;
|
||||
writing-mode: horizontal-tb;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
height: 100px;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- Tests that floats using an auto block size get positioned correctly. -->
|
||||
<div class="container">
|
||||
<div class="left test"></div>
|
||||
<div class="right test"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.result {
|
||||
margin: 20px 0;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div class="result" style="width: 100px; height: 100px;"></div>
|
||||
<div class="result" style="width: 100px; height: 150px;"></div>
|
||||
<div class="result" style="width: 100px; height: 50px;"></div>
|
||||
<div class="result" style="width: 100px; height: 100px;"></div>
|
||||
<div class="result" style="width: 150px; height: 100px;"></div>
|
||||
<div class="result" style="width: 50px; height: 100px;"></div>
|
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
|
||||
<link rel="match" href="auto-block-size-inflow-ref.html">
|
||||
<meta name="assert" content="This test checks that min/max-block-size constraints are applied correctly to a layout()." />
|
||||
|
||||
<style>
|
||||
.test {
|
||||
margin: 20px 0;
|
||||
background: red;
|
||||
}
|
||||
|
||||
@supports (display: layout(block-size-100)) {
|
||||
.test {
|
||||
display: layout(block-size-100);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
|
||||
.width-100 {
|
||||
width: 100px;
|
||||
writing-mode: horizontal-tb;
|
||||
}
|
||||
|
||||
.height-100 {
|
||||
height: 100px;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- 100px x 100px -->
|
||||
<div class="test width-100"></div>
|
||||
|
||||
<!-- 100px x 150px -->
|
||||
<div class="test width-100" style="min-height: 150px"></div>
|
||||
|
||||
<!-- 100px x 50px -->
|
||||
<div class="test width-100" style="max-height: 50px"></div>
|
||||
|
||||
<!-- 100px x 100px -->
|
||||
<div class="test height-100"></div>
|
||||
|
||||
<!-- 150px x 100px -->
|
||||
<div class="test height-100" style="min-width: 150px"></div>
|
||||
|
||||
<!-- 50px x 100px -->
|
||||
<div class="test height-100" style="max-width: 50px"></div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.result {
|
||||
background: green;
|
||||
border: solid 2px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="result" style="width: 100px; height: 0px;"></div>
|
||||
<div class="result" style="width: 0px; height: 100px;"></div>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#interaction-sizing">
|
||||
<link rel="match" href="auto-block-size-negative-ref.html">
|
||||
<meta name="assert" content="This test checks that auto-block-size is correctly clamped to zero." />
|
||||
<meta name="assert" content="TODO" />
|
||||
|
||||
<style>
|
||||
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.width-100 {
|
||||
width: 100px;
|
||||
writing-mode: horizontal-tb;
|
||||
}
|
||||
|
||||
.height-100 {
|
||||
height: 100px;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
|
||||
@supports (display: layout(block-size-negative)) {
|
||||
.test {
|
||||
display: layout(block-size-negative);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<div class="test width-100"></div>
|
||||
<div class="test height-100"></div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-negative', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
return {autoBlockSize: -100};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#get-a-layout-class-instance">
|
||||
<link rel="match" href="fallback-ref.html">
|
||||
<meta name="assert" content="This test checks that a layout() class with a throwing constructor will fallback to block layout." />
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.float {
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.fc {
|
||||
display: flow-root;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: layout(throwing-ctor)) {
|
||||
.test {
|
||||
display: layout(throwing-ctor);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- This tests that when the "layout()" constructor fails, it will fallback to block layout. -->
|
||||
<div class="test">
|
||||
<div class="float"></div>
|
||||
<div class="fc"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('throwing-ctor', class {
|
||||
constructor() { throw Error('fail!'); }
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback">
|
||||
<link rel="match" href="fallback-ref.html">
|
||||
<meta name="assert" content="This test checks that a layout() class with a throwing layout function will fallback to block layout." />
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.float {
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.fc {
|
||||
display: flow-root;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: layout(throwing-layout)) {
|
||||
.test {
|
||||
display: layout(throwing-layout);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- This tests that when the "layout()" layout function fails, it will fallback to block layout. -->
|
||||
<div class="test">
|
||||
<div class="float"></div>
|
||||
<div class="fc"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('throwing-layout', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() { throw Error('fail!'); }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback">
|
||||
<link rel="match" href="fallback-ref.html">
|
||||
<meta name="assert" content="This test checks that a layout() class with the layout function returning a bad value will fallback to block layout." />
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.float {
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.fc {
|
||||
display: flow-root;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: layout(bad-return)) {
|
||||
.test {
|
||||
display: layout(bad-return);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<!-- This tests that when the "layout()" layout function returns a bad value, it will fallback to block layout. -->
|
||||
<div class="test">
|
||||
<div class="float"></div>
|
||||
<div class="fc"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('bad-return', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() { return 42; }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.result {
|
||||
background: green;
|
||||
border: solid 2px;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="result"></div>
|
Loading…
Add table
Add a link
Reference in a new issue