mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Update web-platform-tests to revision fb15e14b52049f952612623ee0d7fb7a620a57c9
This commit is contained in:
parent
200cc8aa6b
commit
4a942c982f
141 changed files with 2563 additions and 1589 deletions
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test: hanging punctuation is scrollable overflow</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#hanging-punctuation-property">
|
||||
<meta name="flags" content="">
|
||||
<link rel="match" href="reference/hanging-scrollable-001-ref.html">
|
||||
<meta name="assert" content="Hanging characters that overflow their block container are treated as scrollable overflow. ">
|
||||
<style>
|
||||
div {
|
||||
font-family: monospace;
|
||||
font-size: 50px;
|
||||
hanging-punctuation: last;
|
||||
overflow: hidden;
|
||||
color: red;
|
||||
}
|
||||
span {color: white; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is no red below.
|
||||
<table><tr><td><div id="t">X<span>”</span></div></table>
|
||||
<!--
|
||||
The table is to do sizing based on the min content size.
|
||||
A simpler test could be written using `div { width: min-content; }`,
|
||||
but that is not widely supported yet.
|
||||
-->
|
||||
|
||||
<script>
|
||||
document.getElementById("t").scrollLeft=100;
|
||||
</script>
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
|
||||
<p>Test passes if there is no red below.
|
|
@ -19,7 +19,7 @@
|
|||
<body>
|
||||
<p>Test passes if there is no red visible on the page.</p>
|
||||
<div id="parent">
|
||||
<div>X</div>
|
||||
<div style="padding-left: 100px">X</div>
|
||||
</div>
|
||||
<p>Test passes if the following two text blocks look same in terms of margin-left and text-indent respectively.</p>
|
||||
<div>
|
||||
|
@ -31,4 +31,4 @@
|
|||
ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ.<br />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<title>CSS Text Test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<style>
|
||||
body { background: white; }
|
||||
div {
|
||||
padding-left: 50px;
|
||||
font-family: Ahem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a single black X below and no red.
|
||||
<div>X</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#reference1
|
||||
{
|
||||
color: red;
|
||||
left: 0;
|
||||
left: 100px; /* see comments for #test1 below */
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
|
@ -29,8 +29,8 @@
|
|||
}
|
||||
#test1
|
||||
{
|
||||
text-indent: 50%;
|
||||
margin-left: -50%;
|
||||
margin-left: -50%; /* -50% * 400px = -200px which makes the inline-size of this block 600px */
|
||||
text-indent: 50%; /* 50% * 600px = 300px (which is 100px from the start of #parent due to the negative margin) */
|
||||
}
|
||||
#test2
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
|
||||
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box">
|
||||
<style>
|
||||
section { position: absolute; }
|
||||
body { background: white; }
|
||||
section, div {
|
||||
border-right: 10px solid white;
|
||||
margin-right: 10px;
|
||||
|
@ -19,10 +19,7 @@ div {
|
|||
box-sizing: border-box;
|
||||
width: 120px;
|
||||
}
|
||||
.test div { text-indent: 50%; color: red; }
|
||||
.ref div { text-indent: 50px; }
|
||||
.test div { text-indent: 50%; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a single black X below and no red.
|
||||
<section class=test><div>X</div></section>
|
||||
<section class=ref><div>X</div></section>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
|
||||
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box">
|
||||
<style>
|
||||
section { position: absolute; }
|
||||
body { background: white; }
|
||||
section, div {
|
||||
border-right: 10px solid white;
|
||||
margin-right: 10px;
|
||||
|
@ -19,10 +19,7 @@ div {
|
|||
box-sizing: border-box;
|
||||
width: 120px;
|
||||
}
|
||||
.test div { text-indent: 50%; color: red; overflow: hidden; } /* overflow:hidden should not make any difference, but it does in some browsers */
|
||||
.ref div { text-indent: 50px; }
|
||||
.test div { text-indent: 50%; overflow: hidden; } /* overflow:hidden should not make any difference, but it does in some browsers */
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a single black X below and no red.
|
||||
<section class=test><div>X</div></section>
|
||||
<section class=ref><div>X</div></section>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
|
||||
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box, when used in a calc expression">
|
||||
<style>
|
||||
section { position: absolute; }
|
||||
body { background: white; }
|
||||
section, div {
|
||||
border-right: 10px solid white;
|
||||
margin-right: 10px;
|
||||
|
@ -19,10 +19,7 @@ div {
|
|||
box-sizing: border-box;
|
||||
width: 120px;
|
||||
}
|
||||
.test div { text-indent: calc(25px + 25%); color: red; }
|
||||
.ref div { text-indent: 50px; }
|
||||
.test div { text-indent: calc(25px + 25%); }
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a single black X below and no red.
|
||||
<section class=test><div>X</div></section>
|
||||
<section class=ref><div>X</div></section>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
|
||||
<style>
|
||||
div {
|
||||
white-space: pre-wrap;
|
||||
font-family: monospace;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if the 4 letters below are verticaly aligned.
|
||||
|
||||
<div> P</div>
|
||||
<div> A</div>
|
||||
<div> S</div>
|
||||
<div> S</div>
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS test Reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
|
||||
<p>This test passes if you can see the word PASS below, without any extra spaces.
|
||||
|
||||
<div>PASS</div>
|
|
@ -0,0 +1,31 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-001-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap.">
|
||||
|
||||
<style>
|
||||
div {
|
||||
white-space: pre-wrap;
|
||||
font-family: monospace;
|
||||
}
|
||||
div:nth-of-type(1),
|
||||
div:nth-of-type(2) {
|
||||
width: 5ch;
|
||||
text-align: right;
|
||||
}
|
||||
div:nth-of-type(3),
|
||||
div:nth-of-type(4) {
|
||||
width: 9ch;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if the 4 letters below are verticaly aligned.
|
||||
|
||||
<div>P</div>
|
||||
<div>A </div>
|
||||
<div>S</div>
|
||||
<div>S </div>
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: intrinsic maximum sizing of trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (maximum) intrinsic size.">
|
||||
|
||||
<style>
|
||||
span {
|
||||
display: inline-block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#s1 { text-align: right; }
|
||||
#s2 { text-align: center; }
|
||||
</style>
|
||||
|
||||
<p>This test passes if you can see the word PASS below, without any extra spaces.
|
||||
|
||||
<div><span id=s1>P </span><span id=s2>A </span>SS</div>
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS Text test: intrinsic minimum sizing of trailing spaces with white-space:pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
|
||||
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size.">
|
||||
|
||||
<style>
|
||||
/* Make the table invisible */
|
||||
table { border-collapse: collapse; }
|
||||
td { padding: 0; }
|
||||
|
||||
/* for the content of the table to be sized to their mininum intrinsic size */
|
||||
table { width: 0; }
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#s1 { text-align: right; }
|
||||
#s2 { text-align: center; }
|
||||
</style>
|
||||
|
||||
<p>This test passes if you can see the word PASS below, without any extra spaces.
|
||||
|
||||
<table><td><span id=s1>P </span><td><span id=s2>A </span><td>SS</table>
|
Loading…
Add table
Add a link
Reference in a new issue