mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 90e1ee27eede63cf117f19c1e55553cc1881aef0
This commit is contained in:
parent
5fd4467cb3
commit
3f940e3f4c
89 changed files with 11097 additions and 382 deletions
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<html lang=en>
|
||||
|
||||
<title>CSS Test: hanging-punctuation - force-end - basic cases</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="http://www.w3.org/TR/css-text-3/#hanging-punctuation">
|
||||
<link rel="match" href="reference/hanging-punctuation-inline-001-ref.html">
|
||||
<meta name="assert" content="hanging punctuation applies to inlines">
|
||||
<style>
|
||||
div { font-size: 2em; }
|
||||
#ref { color: blue; }
|
||||
#test {
|
||||
width: 4em;
|
||||
color: orange;
|
||||
}
|
||||
#test span {
|
||||
hanging-punctuation: last;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the orange and blue pieces of text are laid out identically.
|
||||
|
||||
<div id=ref>字字字字」</div>
|
||||
<div id=test>字字字字<span>」</span></div>
|
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<html lang=en>
|
||||
|
||||
<title>test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<style>
|
||||
div { font-size: 2em; }
|
||||
#ref { color: blue; }
|
||||
#test { color: orange; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if the orange and blue pieces of text are laid out identically.
|
||||
|
||||
<div id=ref>字字字字」</div>
|
||||
<div id=test>字字字字」</div>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Test: Simple line breaking test</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-details">
|
||||
<link rel="match" href="reference/line-breaking-021-ref.html">
|
||||
<meta name=assert content="Line breaking behavior defined for the ZWJ line-breaking classes in [UAX14] must be honored.">
|
||||
<style>
|
||||
div {
|
||||
width: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if there the text below is on a single line.
|
||||
|
||||
<div>じ‍字‍자‍😂‍😭</div>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
</style>
|
||||
|
||||
<p>This test passes if there the text below is on a single line.
|
||||
|
||||
<div>じ‍字‍자‍😂‍😭</div>
|
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<html lang=en>
|
||||
<meta charset=utf-8>
|
||||
<title>test reference</title>
|
||||
<style>
|
||||
div {
|
||||
text-align: right;
|
||||
width: 300px;
|
||||
border: solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the words below are aligned to the right of the box.
|
||||
|
||||
<div>right<br>right</div>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<html lang=en>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS text test: text-align-last has precedence over text-align-all</title>
|
||||
<link rel=help href="https://drafts.csswg.org/css-text-3/#text-align-all-property">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text-3/#text-align-last-property">
|
||||
<link rel="match" href="reference/text-align-last-wins-001-ref.html">
|
||||
<meta name=assert content="If a line is both the first and last line, text-align-last applies">
|
||||
<style>
|
||||
div {
|
||||
text-align-last: right;
|
||||
width: 300px;
|
||||
border: solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if the words below are aligned to the right of the box.
|
||||
|
||||
<div>right<br>right</div>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>test reference</title>
|
||||
<link rel='author' title='Florian Rivoal' href='https://florian.rivoal.net'>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 20px/1 Ahem;
|
||||
white-space: pre;
|
||||
}
|
||||
#ref {
|
||||
color: orange;
|
||||
}
|
||||
#test {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
/* this is just filler content to have an invisible last line, as jutification does not affect the last line */
|
||||
a { color: white; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if the the blue and orange boxes are aligned.
|
||||
|
||||
<div id=ref>X X X X</div>
|
||||
<div id=test>X X X X</div>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS text tests: text-justify applies inline</title>
|
||||
<link rel='author' title='Florian Rivoal' href='https://florian.rivoal.net'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#text-justify-property'>
|
||||
<link rel='match' href='reference/text-justify-006-ref.html'>
|
||||
<meta name="assert" content="text-justify applies to inline elements">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 20px/1 Ahem;
|
||||
width: 11ch;
|
||||
}
|
||||
#ref {
|
||||
white-space: pre;
|
||||
color: orange;
|
||||
}
|
||||
#test {
|
||||
text-align: justify;
|
||||
color: blue;
|
||||
}
|
||||
span {
|
||||
text-justify: none;
|
||||
}
|
||||
|
||||
/* this is just filler content to have an invisible last line, as jutification does not affect the last line */
|
||||
a { color: white; }
|
||||
</style>
|
||||
|
||||
<p>Test passes if the the blue and orange boxes are aligned.
|
||||
|
||||
<div id=ref>X X X X</div>
|
||||
<div id=test>X <span>X X</span> X <a>###########</a></div>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 20px/1 Ahem;
|
||||
margin: 1em 0;
|
||||
white-space: pre;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if all black boxes below have the same width and height and are aligned vertically.
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>test reference</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 10px/1 Ahem;
|
||||
margin: 1em 0;
|
||||
white-space: pre;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if all black boxes below have the same width and height and are aligned vertically.
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
||||
<div> x<br> x</div>
|
|
@ -9,9 +9,11 @@
|
|||
<style>
|
||||
div { font: 50px/1 Ahem; }
|
||||
#test {
|
||||
text-transform: fullwidth;
|
||||
color: green;
|
||||
}
|
||||
span {
|
||||
text-transform: full-width;
|
||||
}
|
||||
#ref {
|
||||
color: red;
|
||||
position: absolute;
|
||||
|
@ -21,4 +23,4 @@ div { font: 50px/1 Ahem; }
|
|||
|
||||
<p>Test passes if there are two green squares and no red.
|
||||
<div id=ref>x x</div>
|
||||
<div id=test>x x</div>
|
||||
<div id=test>x<span> </span>x</div>
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
<style>
|
||||
div { font: 50px/1 Ahem; }
|
||||
#test {
|
||||
text-transform: fullwidth;
|
||||
color: green;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
span {
|
||||
text-transform: full-width;
|
||||
}
|
||||
#ref {
|
||||
color: red;
|
||||
position: absolute;
|
||||
|
@ -22,4 +24,4 @@ div { font: 50px/1 Ahem; }
|
|||
|
||||
<p>Test passes if there are two green squares and no red.
|
||||
<div id=ref>x   x</div>
|
||||
<div id=test>x x</div>
|
||||
<div id=test>x<span> </span>x</div>
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: text-transform:fullwidth and trailing spaces</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-transform-property">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/text-transform-fullwidth-008-ref.html">
|
||||
<meta name="assert" content="full-width does transforms U+0020 spaces to U+3000 after phase 1, but before phase 2, so that end-of-line transformed spaces get the same treatment as natural ones: hang when white-space is normal.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 20px/1 Ahem;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.pre {
|
||||
white-space: pre;
|
||||
}
|
||||
#test, #ref {
|
||||
width: 2em;
|
||||
text-align: right;
|
||||
}
|
||||
span {
|
||||
text-transform: full-width;
|
||||
}
|
||||
#test2, #ref2 {
|
||||
width: min-content;
|
||||
margin-left: 1em;
|
||||
background: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if all black boxes below have the same width and height and are aligned vertically.
|
||||
<div class=pre> x<br> x</div>
|
||||
<div id=ref>x x</div>
|
||||
<div id=test>x<span> </span>x</div>
|
||||
<div id=ref2>x x</div>
|
||||
<div id=test2>x<span> </span>x</div>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: text-transform:fullwidth and trailing spaces, with pre-wrap</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-transform-property">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/text-transform-fullwidth-009-ref.html">
|
||||
<meta name="assert" content="full-width does transforms U+0020 spaces to U+3000 after phase 1, but before phase 2, so that end-of-line transformed spaces get the same treatment as natural ones: hang at the end of soft-wrapped lines, and conditionally hang before forced breaks when white-space is pre-wrap.">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 10px/1 Ahem;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.pre {
|
||||
white-space: pre;
|
||||
}
|
||||
#test, #ref,
|
||||
#test3, #ref3 {
|
||||
width: 2em;
|
||||
text-align: right;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
#test3, #ref3 {
|
||||
margin-left: 1em;
|
||||
}
|
||||
span {
|
||||
text-transform: full-width;
|
||||
}
|
||||
#test2, #ref2,
|
||||
#test4, #ref4 {
|
||||
width: min-content;
|
||||
margin-left: 1em;
|
||||
white-space: pre-wrap;
|
||||
background: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if all black boxes below have the same width and height and are aligned vertically.
|
||||
<div class=pre> x<br> x</div>
|
||||
<div id=ref>x x</div>
|
||||
<div id=test>x<span> </span>x</div>
|
||||
<div id=ref2>x x</div>
|
||||
<div id=test2>x<span> </span>x</div>
|
||||
|
||||
<div id=ref3>x <br>x </div>
|
||||
<div id=test3>x<span> </span><br>x<span> </span></div>
|
||||
<div id=ref4>x <br>x </div>
|
||||
<div id=test4>x<span> </span><br>x<span> </span></div>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: inline element boundary and segment break transformations</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-encoding">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
|
||||
<link rel=match href="../../reference/ref-filled-green-100px-square.xht">
|
||||
<meta name="assert" content="intervening inline box boundaries must be ignored for segment break transformations">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 20px/1 Ahem;
|
||||
color: green;
|
||||
}
|
||||
#b { border-right: solid 20px green; }
|
||||
#p { padding-right: 20px; background: green; }
|
||||
#m { margin-right: 20px; }
|
||||
#m2 { margin-right: -20px; }
|
||||
|
||||
#red {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.
|
||||
|
||||
<div id=red></div>
|
||||
|
||||
<div>aa​
|
||||
bbb</div>
|
||||
|
||||
<div>aa<span>​</span>
|
||||
bbb</div>
|
||||
|
||||
<div>aa<span id=b>​</span>
|
||||
bb</div>
|
||||
|
||||
<div>aa<span id=p>​</span>
|
||||
bb</div>
|
||||
|
||||
<div>aa<span id=m>​</span><span id=m2></span>
|
||||
bbb</div>
|
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: out of flow elements and segment break transformations</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-encoding">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
|
||||
<link rel=match href="../../reference/ref-filled-green-100px-square.xht">
|
||||
<meta name="assert" content="Out-of-flow elements must be ignored for segment break transformations">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
div {
|
||||
font: 20px/1 Ahem;
|
||||
color: green;
|
||||
}
|
||||
aside {
|
||||
color: transparent;
|
||||
}
|
||||
#abs { position: absolute; }
|
||||
#fixed { position: fixed; }
|
||||
#float-r { float: right; }
|
||||
#float-l { float: left; margin-left: -3em; }
|
||||
#red {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.
|
||||
|
||||
<div id=red></div>
|
||||
|
||||
<div>aa​
|
||||
bbb</div>
|
||||
|
||||
<div>aa​<aside id=abs>foo</aside>
|
||||
bbb</div>
|
||||
|
||||
<div>aa​<aside id=fixed>foo</aside>
|
||||
bbb</div>
|
||||
|
||||
<div>aa​<aside id=float-r>foo</aside>
|
||||
bbb</div>
|
||||
|
||||
<div>aa​<aside id=float-l>foo</aside>
|
||||
bbb</div>
|
|
@ -0,0 +1,30 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-Text test: word-break keep-all + pre-wrap does not affect U+3000</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
<meta name=flags content="">
|
||||
<meta name=assert content="U+3000, despite being called Ideographic Space, does not belong to the ID line breaking class, or any other class whose wrapping opportunities are suppressed by word-break:keep-all. A break after it should still be allowed. white-space:pre-wrap doesn't change that.">
|
||||
<link rel="match" href="reference/word-break-keep-all-005-ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<style>
|
||||
div {
|
||||
width: 4em;
|
||||
word-break: keep-all;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if the four characters below are arranged in a two-by-two square.
|
||||
<div lang=ja>字字 字字</div>
|
||||
<!--
|
||||
If keep-all has no effect at all, breaks are allowed everywhere,
|
||||
and the result will be:
|
||||
字字 字
|
||||
字
|
||||
|
||||
If keep-all correctly suppresses wrapping opportunities between CJK ideographs
|
||||
but also incorrectly suppresses the wrapping opportunity after U+3000,
|
||||
no wrapping is possible, and the result will be:
|
||||
字字 字字
|
||||
-->
|
|
@ -0,0 +1,30 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>CSS-Text test: word-break keep-all + break-spaces does not affect U+3000</title>
|
||||
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
|
||||
<meta name=flags content="">
|
||||
<meta name=assert content="U+3000, despite being called Ideographic Space, does not belong to the ID line breaking class, or any other class whose wrapping opportunities are suppressed by word-break:keep-all. A break after it should still be allowed. white-space:break-spaces doesn't change that.">
|
||||
<link rel="match" href="reference/word-break-keep-all-005-ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<style>
|
||||
div {
|
||||
width: 4em;
|
||||
word-break: keep-all;
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>This test passes if the four characters below are arranged in a two-by-two square.
|
||||
<div lang=ja>字字 字字</div>
|
||||
<!--
|
||||
If keep-all has no effect at all, breaks are allowed everywhere,
|
||||
and the result will be:
|
||||
字字 字
|
||||
字
|
||||
|
||||
If keep-all correctly suppresses wrapping opportunities between CJK ideographs
|
||||
but also incorrectly suppresses the wrapping opportunity after U+3000,
|
||||
no wrapping is possible, and the result will be:
|
||||
字字 字字
|
||||
-->
|
Loading…
Add table
Add a link
Reference in a new issue