mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
Update web-platform-tests to revision 63459a30a61cda53c8c8ab4dc645b142cd2f85ea
This commit is contained in:
parent
005320c08c
commit
40ef4e9705
82 changed files with 986 additions and 154 deletions
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
section {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
.outer {
|
||||
display: inline-block;
|
||||
background: orange;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.inner {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
background: blue;
|
||||
}
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.margin-bottom {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<section>
|
||||
<div class="outer">
|
||||
<div class="inner inline-block">
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section>
|
||||
<div class="outer" style="height: 30px">
|
||||
<div class="inner inline-block">
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section>
|
||||
<div class="outer" style="height: 30px">
|
||||
<div class="inner inline-block">
|
||||
XX
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section>
|
||||
<div class="outer">
|
||||
<div class="inner margin-bottom inline-block">
|
||||
XX
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section class="margin-bottom">
|
||||
<div class="outer" style="height: 60px">
|
||||
<div class="inner margin-bottom inline-block">
|
||||
XX
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
</body>
|
|
@ -0,0 +1,67 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Test: Baseline of blocks with `overflow: hidden`</title>
|
||||
<link rel="match" href="baseline-block-with-overflow-001-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align">
|
||||
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
|
||||
<style>
|
||||
section {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
.outer {
|
||||
display: inline-block;
|
||||
background: orange;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.inner {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
background: blue;
|
||||
}
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.margin-bottom {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<section>
|
||||
<div class="outer">
|
||||
<div class="inner inline-block">
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section>
|
||||
<div class="outer">
|
||||
<div class="inner">
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section>
|
||||
<div class="outer">
|
||||
<div class="inner">
|
||||
XX
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section>
|
||||
<div class="outer">
|
||||
<div class="inner margin-bottom inline-block">
|
||||
XX
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
<section class="margin-bottom">
|
||||
<div class="outer">
|
||||
<div class="inner margin-bottom">
|
||||
XX
|
||||
</div>
|
||||
</div>
|
||||
XX
|
||||
</section>
|
||||
</body>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS basic box model: getComputedStyle().clear</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-clear">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#float-clear">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("clear", "none");
|
||||
test_computed_value("clear", "left");
|
||||
test_computed_value("clear", "right");
|
||||
test_computed_value("clear", "both");
|
||||
|
||||
test_computed_value("clear", "inline-start");
|
||||
test_computed_value("clear", "inline-end");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,9 @@
|
|||
<title>CSS basic box model: parsing clear with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-clear">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#float-clear">
|
||||
<meta name="assert" content="clear supports the full grammar 'none | left | right | both'.">
|
||||
<meta name="assert" content="clear also supports inline-start and inline-end.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
|
@ -16,6 +18,9 @@ test_valid_value("clear", "none");
|
|||
test_valid_value("clear", "left");
|
||||
test_valid_value("clear", "right");
|
||||
test_valid_value("clear", "both");
|
||||
|
||||
test_valid_value("clear", "inline-start");
|
||||
test_valid_value("clear", "inline-end");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS basic box model: getComputedStyle().float</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-float">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#float-clear">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("float", "none");
|
||||
test_computed_value("float", "left");
|
||||
test_computed_value("float", "right");
|
||||
|
||||
test_computed_value("float", "inline-start");
|
||||
test_computed_value("float", "inline-end");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,9 @@
|
|||
<title>CSS basic box model: parsing float with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-float">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-logical/#float-clear">
|
||||
<meta name="assert" content="float supports the full grammar 'left | right | top | bottom | start | end | none | <page-floats>'.">
|
||||
<meta name="assert" content="float supports 'inline-start | inline-end'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
|
@ -16,6 +18,9 @@ test_valid_value("float", "left");
|
|||
test_valid_value("float", "right");
|
||||
test_valid_value("float", "none");
|
||||
|
||||
test_valid_value("float", "inline-start");
|
||||
test_valid_value("float", "inline-end");
|
||||
|
||||
// The following are not yet supported by browsers:
|
||||
// test_valid_value("float", "top");
|
||||
// test_valid_value("float", "bottom");
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Flexible Box Layout Module Level 1: getComputedStyle().order</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-order">
|
||||
<meta name="assert" content="order computed value is the specified integer.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("order", "0");
|
||||
test_computed_value("order", "123");
|
||||
test_computed_value("order", "-45");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Inline Layout: getComputedStyle().alignmentBaseline</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#alignment-baseline-property">
|
||||
<link rel="help" href="https://www.w3.org/TR/SVG11/text.html#AlignmentBaselineProperty">
|
||||
<meta name="assert" content="alignment-baseline computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("alignment-baseline", "baseline");
|
||||
test_computed_value("alignment-baseline", "text-bottom");
|
||||
test_computed_value("alignment-baseline", "alphabetic");
|
||||
test_computed_value("alignment-baseline", "ideographic");
|
||||
test_computed_value("alignment-baseline", "middle");
|
||||
test_computed_value("alignment-baseline", "central");
|
||||
test_computed_value("alignment-baseline", "mathematical");
|
||||
test_computed_value("alignment-baseline", "text-top");
|
||||
test_computed_value("alignment-baseline", "bottom");
|
||||
test_computed_value("alignment-baseline", "center");
|
||||
test_computed_value("alignment-baseline", "top");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Inline Layout: parsing alignment-baseline with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#alignment-baseline-property">
|
||||
<meta name="assert" content="alignment-baseline supports only the grammar 'baseline | text-bottom | alphabetic | ideographic | middle | central | mathematical | text-top | bottom | center | top'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// alignment-baseline 'auto' was valid in SVG 1.1
|
||||
// https://www.w3.org/TR/SVG11/text.html#AlignmentBaselineProperty
|
||||
test_invalid_value("alignment-baseline", "auto");
|
||||
|
||||
test_invalid_value("alignment-baseline", "none");
|
||||
test_invalid_value("alignment-baseline", "baseline text-bottom");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Inline Layout: parsing alignment-baseline with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#alignment-baseline-property">
|
||||
<meta name="assert" content="alignment-baseline supports the full grammar 'baseline | text-bottom | alphabetic | ideographic | middle | central | mathematical | text-top | bottom | center | top'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("alignment-baseline", "baseline");
|
||||
test_valid_value("alignment-baseline", "text-bottom");
|
||||
test_valid_value("alignment-baseline", "alphabetic");
|
||||
test_valid_value("alignment-baseline", "ideographic");
|
||||
test_valid_value("alignment-baseline", "middle");
|
||||
test_valid_value("alignment-baseline", "central");
|
||||
test_valid_value("alignment-baseline", "mathematical");
|
||||
test_valid_value("alignment-baseline", "text-top");
|
||||
test_valid_value("alignment-baseline", "bottom");
|
||||
test_valid_value("alignment-baseline", "center");
|
||||
test_valid_value("alignment-baseline", "top");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Inline Layout: getComputedStyle().baselineShift</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#baseline-shift-property">
|
||||
<meta name="assert" content="baseline-shift computed value is the specified keyword or a computed length-percentage value.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("baseline-shift", "-10px");
|
||||
test_computed_value("baseline-shift", "20%");
|
||||
test_computed_value("baseline-shift", "calc(10px - 0.5em)", "-10px");
|
||||
|
||||
test_computed_value("baseline-shift", "sub");
|
||||
test_computed_value("baseline-shift", "super");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Inline Layout: parsing baseline-shift with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#baseline-shift-property">
|
||||
<meta name="assert" content="baseline-shift supports only the grammar 'length-percentage | sub | super'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// Valid in SVG 1.1. Accepted by Blink and WebKit.
|
||||
// https://github.com/w3c/csswg-drafts/issues/3975
|
||||
test_invalid_value("baseline-shift", "5");
|
||||
|
||||
test_invalid_value("baseline-shift", "-10px 20%");
|
||||
test_invalid_value("baseline-shift", "calc(2em + 3ex), 0");
|
||||
test_invalid_value("baseline-shift", "sub super");
|
||||
test_invalid_value("baseline-shift", "20px sub");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Inline Layout: parsing baseline-shift with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#baseline-shift-property">
|
||||
<meta name="assert" content="baseline-shift supports the full grammar 'length-percentage | sub | super'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("baseline-shift", "-10px");
|
||||
test_valid_value("baseline-shift", "20%");
|
||||
test_valid_value("baseline-shift", "calc(2em + 3ex)");
|
||||
test_valid_value("baseline-shift", "0", "0px");
|
||||
test_valid_value("baseline-shift", "sub");
|
||||
test_valid_value("baseline-shift", "super");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1543599">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers">
|
||||
<style>
|
||||
#hidden {
|
||||
display: none;
|
||||
background: red;
|
||||
}
|
||||
#spacer {
|
||||
height: calc(100vh + 200px); /* At least 200px of scroll range */
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>1
|
||||
<th>1
|
||||
<th>1
|
||||
<th>1
|
||||
</tr>
|
||||
</thead>
|
||||
<thead id="hidden">
|
||||
<tr>
|
||||
<th>1
|
||||
<th>1
|
||||
<th>1
|
||||
<th>1
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
<tr><td>0 <td>0 <td>0 <td>0 </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="spacer"></div>
|
||||
<script>
|
||||
let firstEvent = true;
|
||||
const targetScrollPosition = 100;
|
||||
const hidden = document.querySelector("#hidden");
|
||||
const t = async_test("Scroll offset doesn't change when an element goes back and forth to display: none");
|
||||
window.onscroll = t.step_func(function() {
|
||||
hidden.style.display = "block";
|
||||
hidden.style.position = "absolute";
|
||||
hidden.style.visibility = "hidden";
|
||||
window.unused = hidden.offsetHeight;
|
||||
hidden.style.display = "";
|
||||
hidden.style.position = "";
|
||||
hidden.style.visibility = "";
|
||||
|
||||
if (firstEvent) {
|
||||
firstEvent = false;
|
||||
requestAnimationFrame(t.step_func(function() {
|
||||
requestAnimationFrame(t.step_func_done(function() {
|
||||
assert_equals(document.scrollingElement.scrollTop, targetScrollPosition);
|
||||
}));
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
window.onload = t.step_func(function() {
|
||||
window.scrollTo(0, targetScrollPosition);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Transform Module Level 1: getComputedStyle().transformBox</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-box-property">
|
||||
<meta name="assert" content="Computed transform-box is the specified keyword.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("transform-box", "content-box");
|
||||
test_computed_value("transform-box", "border-box");
|
||||
test_computed_value("transform-box", "fill-box");
|
||||
test_computed_value("transform-box", "stroke-box");
|
||||
test_computed_value("transform-box", "view-box");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue