mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
Update web-platform-tests to revision 58b72393db0bd273bb93268c33666cf893feb985
This commit is contained in:
parent
43a4f01647
commit
64e0a52537
12717 changed files with 59835 additions and 59820 deletions
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap is not wrapped</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on word-break:break-all</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if word-break is break-all">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on word-break:keep-all</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if word-break is keep-all.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
word-break: keep-all;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on line-break:loose</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if line-break is loose.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
line-break: loose;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on line-break:normal</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if line-break is normal.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
line-break: normal;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on line-break:strict</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if line-break is strict.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
line-break: strict;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on overflow-wrap:break-word</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if overflow-wrap is break-word.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
word-wrap: break-word; /* deprecated alias */
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap is wrapped when overflow-wrap is break-spaces</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-spaces">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is wrapped when the white-space property is set to pre-wrap and overflow-wrap is break-spaces.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
overflow-wrap: break-spaces;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div> XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: single preserved white space at the end of with white-space:pre-wrap overflow-wrap:break-spaces</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-spaces">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="a single preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap and overflow-wrap is break-spaces.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 2ch;
|
||||
overflow-wrap: break-spaces;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: single preserved white space at the end of with white-space:pre-wrap overflow-wrap:break-spaces break-word</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="a single preserved white space at the end of the line is wrapped when the white-space property is set to pre-wrap and overflow-wrap is break-spaces break-word.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
overflow-wrap: break-spaces break-word;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div> XX XX</div>
|
||||
</body>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not cause wrapping</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When the white-space property is set to pre-wrap, preserved white space at the end of the line must hang or be collapsed, and must not cause preceeding content to be wrapped.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div> XX 
|
||||
XX </div>
|
||||
</body>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with right alignement</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when right-aligning.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX 
|
||||
XX </div>
|
||||
</body>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with center alignement</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when centering.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX 
|
||||
XX </div>
|
||||
</body>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with justification</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when justifying.">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: justify;
|
||||
text-justify: inter-character;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>X​X 
|
||||
X​X </div>
|
||||
</body>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test reference file</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<style>
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<div>XX<br>XX</div>
|
||||
</body>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test reference file</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<!-- pre-wrap-001-ref.html could probably be used instead,
|
||||
but since textarea is a form control that's not fully specified,
|
||||
using a separate reference just in case something is indeed different
|
||||
is safer. -->
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
color: green;
|
||||
white-space: pre;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX
|
||||
XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: white-space-collapsing - discard - basic cases Reftest Reference</title>
|
||||
<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
span {
|
||||
color: Blue;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Test passes if the first sentence matches the second one.
|
||||
</p>
|
||||
<div>
|
||||
<span>AllWhiteSpaceInTheElementShouldBeDiscarded.</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>AllWhiteSpaceInTheElementShouldBeDiscarded.</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: white-space-collapsing - preserve-breaks - basic cases Reftest Reference</title>
|
||||
<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
span {
|
||||
color: Blue;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Test passes if the first two sentences matches the second one.
|
||||
</p>
|
||||
<p>
|
||||
<span>
|
||||
Sequences of white space should collapse into a single character.<br />
|
||||
But segment breaks as forced line breaks are preserved.
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>
|
||||
Sequences of white space should collapse into a single character.<br />
|
||||
But segment breaks as forced line breaks are preserved.
|
||||
</span>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: white-space-collapsing - trim-inner - basic cases Reftest Reference</title>
|
||||
<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
span {
|
||||
color: Blue;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Test passes if each text positions in the first line match the corresponding positions in the second line.
|
||||
</p>
|
||||
<div>
|
||||
<span>1 2</span>
|
||||
<span> 3 4 </span>
|
||||
<span>5 6</span>
|
||||
<span>7
|
||||
|
||||
8</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>1 2</span>
|
||||
<span> 3 4 </span>
|
||||
<span>5 6</span>
|
||||
<span>7
|
||||
|
||||
8</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Whitespace and line break transformation</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="All spaces and tabs immediately preceding or following a segment break are removed. If no F, H, W or ZWSP characters involved, the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color:#2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color:#270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>hello
|
||||
there</span></div>
|
||||
<div id='test2' class="test"><span>hello   
|
||||
there</span></div>
|
||||
<div id='test3' class="test"><span>hello
|
||||
     there</span></div>
|
||||
<div id='test4' class="test"><span>hello   
|
||||
     there</span></div>
|
||||
<div id='test5' class="test"><span>hello
|
||||
|
||||
|
||||
there</span></div>
|
||||
<div id='test6' class="test"><span>hello  
|
||||
   
|
||||
   
|
||||
   there</span></div>
|
||||
<div id="ref" class="ref"><span>hello there</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if more than one space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Wide characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is W and neither side is Hangul, then the segment break is removed.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color:#2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color:#270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>日本語
|
||||
中国话</span></div>
|
||||
<div id='test2' class="test"><span>日本語   
|
||||
中国话</span></div>
|
||||
<div id='test3' class="test"><span>日本語
|
||||
        中国话</span></div>
|
||||
<div id='test4' class="test"><span>日本語   
|
||||
     中国话</span></div>
|
||||
<div id='test5' class="test"><span>日本語
|
||||
|
||||
|
||||
中国话</span></div>
|
||||
<div id='test6' class="test"><span>日本語  
|
||||
   
|
||||
   
|
||||
   中国话</span></div>
|
||||
<div id="ref" class="ref"><span>日本語中国话</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fullwidth characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F and neither side is Hangul, then the segment break is removed.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>FULL
|
||||
WIDTH</span></div>
|
||||
<div id='test2' class="test"><span>FULL   
|
||||
WIDTH</span></div>
|
||||
<div id='test3' class="test"><span>FULL
|
||||
        WIDTH</span></div>
|
||||
<div id='test4' class="test"><span>FULL   
|
||||
     WIDTH</span></div>
|
||||
<div id='test5' class="test"><span>FULL
|
||||
|
||||
|
||||
WIDTH</span></div>
|
||||
<div id='test6' class="test"><span>FULL  
|
||||
   
|
||||
   
|
||||
   WIDTH</span></div>
|
||||
<div id="ref" class="ref"><span>FULLWIDTH</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Halfwidth characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is H and neither side is Hangul, then the segment break is removed.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>ハン
|
||||
カク</span></div>
|
||||
<div id='test2' class="test"><span>ハン   
|
||||
カク</span></div>
|
||||
<div id='test3' class="test"><span>ハン
|
||||
        カク</span></div>
|
||||
<div id='test4' class="test"><span>ハン   
|
||||
     カク</span></div>
|
||||
<div id='test5' class="test"><span>ハン
|
||||
|
||||
|
||||
カク</span></div>
|
||||
<div id='test6' class="test"><span>ハン  
|
||||
   
|
||||
   
|
||||
   カク</span></div>
|
||||
<div id="ref" class="ref"><span>ハンカク</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Won and halfwidth characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F or H and neither side is Hangul, then the segment break is removed.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>₩
|
||||
24</span></div>
|
||||
<div id='test2' class="test"><span>₩   
|
||||
24</span></div>
|
||||
<div id='test3' class="test"><span>₩
|
||||
        24</span></div>
|
||||
<div id='test4' class="test"><span>₩   
|
||||
     24</span></div>
|
||||
<div id='test5' class="test"><span>₩
|
||||
|
||||
|
||||
24</span></div>
|
||||
<div id='test6' class="test"><span>₩  
|
||||
   
|
||||
   
|
||||
   24</span></div>
|
||||
<div id="ref1" class="ref"><span>₩24</span></div>
|
||||
<div id='test7' class="test"><span>24
|
||||
₩</span></div>
|
||||
<div id='test8' class="test"><span>24   
|
||||
₩</span></div>
|
||||
<div id='test9' class="test"><span>24
|
||||
        ₩</span></div>
|
||||
<div id='test10' class="test"><span>24   
|
||||
     ₩</span></div>
|
||||
<div id='test11' class="test"><span>24
|
||||
|
||||
|
||||
₩</span></div>
|
||||
<div id='test12' class="test"><span>24  
|
||||
   
|
||||
   
|
||||
   ₩</span></div>
|
||||
<div id="ref2" class="ref"><span>24₩</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "linebreak only ₩24");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "spaces linebreak ₩24");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "linebreak spaces ₩24");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces ₩24");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks ₩24");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces ₩24");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test7').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "linebreak only 24₩");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test8').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "spaces linebreak 24₩");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test9').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "linebreak spaces 24₩");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test10').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces 24₩");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test11').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks 24₩");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test12').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces 24₩");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Wide character and non-wide character around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of only one character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>漢字
|
||||
kanji</span></div>
|
||||
<div id='test2' class="test"><span>漢字   
|
||||
kanji</span></div>
|
||||
<div id='test3' class="test"><span>漢字
|
||||
        kanji</span></div>
|
||||
<div id='test4' class="test"><span>漢字   
|
||||
     kanji</span></div>
|
||||
<div id='test5' class="test"><span>漢字
|
||||
|
||||
|
||||
kanji</span></div>
|
||||
<div id='test6' class="test"><span>漢字  
|
||||
   
|
||||
   
|
||||
   kanji</span></div>
|
||||
<div id="ref" class="ref"><span>漢字 kanji</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if more or less than one space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fullwidth character and non-fullwidth character around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of only one character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>FULL
|
||||
width</span></div>
|
||||
<div id='test2' class="test"><span>FULL   
|
||||
width</span></div>
|
||||
<div id='test3' class="test"><span>FULL
|
||||
        width</span></div>
|
||||
<div id='test4' class="test"><span>FULL   
|
||||
     width</span></div>
|
||||
<div id='test5' class="test"><span>FULL
|
||||
|
||||
|
||||
width</span></div>
|
||||
<div id='test6' class="test"><span>FULL  
|
||||
   
|
||||
   
|
||||
   width</span></div>
|
||||
<div id="ref" class="ref"><span>FULL width</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if more or less than one space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Halfwidth character and non-halfwidth character around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of only one character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>han
|
||||
カク</span></div>
|
||||
<div id='test2' class="test"><span>han   
|
||||
カク</span></div>
|
||||
<div id='test3' class="test"><span>han
|
||||
        カク</span></div>
|
||||
<div id='test4' class="test"><span>han   
|
||||
     カク</span></div>
|
||||
<div id='test5' class="test"><span>han
|
||||
|
||||
|
||||
カク</span></div>
|
||||
<div id='test6' class="test"><span>han  
|
||||
   
|
||||
   
|
||||
   カク</span></div>
|
||||
<div id="ref" class="ref"><span>han カク</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if more or less than one space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Wide and fullwidth characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>日本語
|
||||
WIDTH</span></div>
|
||||
<div id='test2' class="test"><span>日本語   
|
||||
WIDTH</span></div>
|
||||
<div id='test3' class="test"><span>日本語
|
||||
        WIDTH</span></div>
|
||||
<div id='test4' class="test"><span>日本語   
|
||||
     WIDTH</span></div>
|
||||
<div id='test5' class="test"><span>日本語
|
||||
|
||||
|
||||
WIDTH</span></div>
|
||||
<div id='test6' class="test"><span>日本語  
|
||||
   
|
||||
   
|
||||
   WIDTH</span></div>
|
||||
<div id="ref" class="ref"><span>日本語WIDTH</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Fullwidth and halfwidth characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>FULL
|
||||
カク</span></div>
|
||||
<div id='test2' class="test"><span>FULL   
|
||||
カク</span></div>
|
||||
<div id='test3' class="test"><span>FULL
|
||||
        カク</span></div>
|
||||
<div id='test4' class="test"><span>FULL   
|
||||
     カク</span></div>
|
||||
<div id='test5' class="test"><span>FULL
|
||||
|
||||
|
||||
カク</span></div>
|
||||
<div id='test6' class="test"><span>FULL  
|
||||
   
|
||||
   
|
||||
   カク</span></div>
|
||||
<div id="ref" class="ref"><span>FULLカク</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hangul characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed. Otherwise, the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>한글
|
||||
쓰기</span></div>
|
||||
<div id='test2' class="test"><span>한글   
|
||||
쓰기</span></div>
|
||||
<div id='test3' class="test"><span>한글
|
||||
        쓰기</span></div>
|
||||
<div id='test4' class="test"><span>한글   
|
||||
     쓰기</span></div>
|
||||
<div id='test5' class="test"><span>한글
|
||||
|
||||
|
||||
쓰기</span></div>
|
||||
<div id='test6' class="test"><span>한글  
|
||||
   
|
||||
   
|
||||
   쓰기</span></div>
|
||||
<div id="ref" class="ref"><span>한글 쓰기</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if more or less than one space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hangul jamo characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed. Otherwise, the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>하ᄂ
|
||||
그ᄅ</span></div>
|
||||
<div id='test2' class="test"><span>하ᄂ   
|
||||
그ᄅ</span></div>
|
||||
<div id='test3' class="test"><span>하ᄂ
|
||||
        그ᄅ</span></div>
|
||||
<div id='test4' class="test"><span>하ᄂ   
|
||||
     그ᄅ</span></div>
|
||||
<div id='test5' class="test"><span>하ᄂ
|
||||
|
||||
|
||||
그ᄅ</span></div>
|
||||
<div id='test6' class="test"><span>하ᄂ  
|
||||
   
|
||||
   
|
||||
   그ᄅ</span></div>
|
||||
<div id="ref" class="ref"><span>하ᄂ 그ᄅ</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hangul halfwidth jamo characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed. Otherwise, the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>하ᄂ
|
||||
그ᄅ</span></div>
|
||||
<div id='test2' class="test"><span>하ᄂ   
|
||||
그ᄅ</span></div>
|
||||
<div id='test3' class="test"><span>하ᄂ
|
||||
        그ᄅ</span></div>
|
||||
<div id='test4' class="test"><span>하ᄂ   
|
||||
     그ᄅ</span></div>
|
||||
<div id='test5' class="test"><span>하ᄂ
|
||||
|
||||
|
||||
그ᄅ</span></div>
|
||||
<div id='test6' class="test"><span>하ᄂ  
|
||||
   
|
||||
   
|
||||
   그ᄅ</span></div>
|
||||
<div id="ref" class="ref"><span>하ᄂ 그ᄅ</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Thai characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed. Otherwise, the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>ภาษา
|
||||
ไทย</span></div>
|
||||
<div id='test2' class="test"><span>ภาษา   
|
||||
ไทย</span></div>
|
||||
<div id='test3' class="test"><span>ภาษา
|
||||
        ไทย</span></div>
|
||||
<div id='test4' class="test"><span>ภาษา   
|
||||
     ไทย</span></div>
|
||||
<div id='test5' class="test"><span>ภาษา
|
||||
|
||||
|
||||
ไทย</span></div>
|
||||
<div id='test6' class="test"><span>ภาษา  
|
||||
   
|
||||
   
|
||||
   ไทย</span></div>
|
||||
<div id="ref" class="ref"><span>ภาษา ไทย</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if more or less than one space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Thai and Latin characters around line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the East Asian Width property of both the character before and after the line feed is F, W or H and neither side is Hangul, then the segment break is removed. Otherwise, the segment break is converted to a space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>ภาษา
|
||||
latin</span></div>
|
||||
<div id='test2' class="test"><span>ภาษา   
|
||||
latin</span></div>
|
||||
<div id='test3' class="test"><span>ภาษา
|
||||
        latin</span></div>
|
||||
<div id='test4' class="test"><span>ภาษา   
|
||||
     latin</span></div>
|
||||
<div id='test5' class="test"><span>ภาษา
|
||||
|
||||
|
||||
latin</span></div>
|
||||
<div id='test6' class="test"><span>ภาษา  
|
||||
   
|
||||
   
|
||||
   latin</span></div>
|
||||
<div id="ref1" class="ref"><span>ภาษา latin</span></div>
|
||||
|
||||
<div id='test7' class="test"><span>latin
|
||||
ภาษา</span></div>
|
||||
<div id='test8' class="test"><span>latin   
|
||||
ภาษา</span></div>
|
||||
<div id='test9' class="test"><span>latin
|
||||
        ภาษา</span></div>
|
||||
<div id='test10' class="test"><span>latin   
|
||||
     ภาษา</span></div>
|
||||
<div id='test11' class="test"><span>latin
|
||||
|
||||
|
||||
ภาษา</span></div>
|
||||
<div id='test12' class="test"><span>latin  
|
||||
   
|
||||
   
|
||||
   ภาษา</span></div>
|
||||
<div id="ref2" class="ref"><span>latin ภาษา</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "linebreak only thai latin");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "spaces linebreak thai latin");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "linebreak spaces thai latin");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces thai latin");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks thai latin");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref1').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces thai latin");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test7').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "linebreak only latin thai");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test8').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "spaces linebreak latin thai");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test9').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "linebreak spaces latin thai");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test10').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces latin thai");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test11').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks latin thai");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test12').firstChild.offsetWidth, document.getElementById('ref2').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces latin thai");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Thai with ZWSP before line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the character immediately before or immediately after the segment break is the zero-width space character (U+200B), then the break is removed, leaving behind the zero-width space.">
|
||||
<style type='text/css'>
|
||||
/* the CSS below is not part of the test */
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>ภาษา​
|
||||
ไทย</span></div>
|
||||
<div id='test2' class="test"><span>ภาษา​   
|
||||
ไทย</span></div>
|
||||
<div id='test3' class="test"><span>ภาษา​
|
||||
        ไทย</span></div>
|
||||
<div id='test4' class="test"><span>ภาษา​   
|
||||
     ไทย</span></div>
|
||||
<div id='test5' class="test"><span>ภาษา​
|
||||
|
||||
|
||||
ไทย</span></div>
|
||||
<div id='test6' class="test"><span>ภาษา​  
|
||||
   
|
||||
   
|
||||
   ไทย</span></div>
|
||||
<div id="ref" class="ref"><span>ภาษาไทย</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
var matches = document.getElementById('test1').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 1");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
var matches = document.getElementById('test2').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 2");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
var matches = document.getElementById('test3').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 3");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
var matches = document.getElementById('test4').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 4");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
var matches = document.getElementById('test5').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 5");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
var matches = document.getElementById('test6').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 6");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if a normal space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Thai with ZWSP after line break</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="If the character immediately before or immediately after the segment break is the zero-width space character (U+200B), then the break is removed, leaving behind the zero-width space.">
|
||||
<style type='text/css'>
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test1' class="test"><span>ภาษา
|
||||
​ไทย</span></div>
|
||||
<div id='test2' class="test"><span>ภาษา
|
||||
   ​ไทย</span></div>
|
||||
<div id='test3' class="test"><span>ภาษา        
|
||||
​ไทย</span></div>
|
||||
<div id='test4' class="test"><span>ภาษา   
|
||||
     ​ไทย</span></div>
|
||||
<div id='test5' class="test"><span>ภาษา
|
||||
|
||||
|
||||
​ไทย</span></div>
|
||||
<div id='test6' class="test"><span>ภาษา  
|
||||
   
|
||||
   
|
||||
   ​ไทย</span></div>
|
||||
<div id="ref" class="ref"><span>ภาษาไทย</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test1').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak only");
|
||||
var matches = document.getElementById('test1').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 1");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test2').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak");
|
||||
var matches = document.getElementById('test2').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 2");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test3').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "linebreak spaces");
|
||||
var matches = document.getElementById('test3').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 3");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test4').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces linebreak spaces");
|
||||
var matches = document.getElementById('test4').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 4");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test5').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks");
|
||||
var matches = document.getElementById('test5').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 5");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test6').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "multiple linebreaks + spaces");
|
||||
var matches = document.getElementById('test6').firstChild.textContent.match(/\u200B/g)
|
||||
test(function() {
|
||||
assert_equals(matches.length, 1);
|
||||
}, "zwsp retained 6");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap is not wrapped in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap in a textarea">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on word-break:break-all in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if word-break is break-all in a textarea">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on word-break:keep-all in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if word-break is keep-all in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
word-break: keep-all;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on line-break:loose in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if line-break is loose in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
line-break: loose;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on line-break:normal in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if line-break is normal in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
line-break: normal;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on line-break:strict in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if line-break is strict in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
line-break: strict;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not change based on overflow-wrap:break-word in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap, even if overflow-wrap is break-word in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
word-wrap: break-word; /* deprecated alias */
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap is wrapped when overflow-wrap is break-spaces in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-spaces">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="preserved white space at the end of the line is wrapped when the white-space property is set to pre-wrap and overflow-wrap is break-spaces in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 4ch;
|
||||
overflow-wrap: break-spaces;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea> XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: single preserved white space at the end of with white-space:pre-wrap overflow-wrap:break-spaces in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-spaces">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="a single preserved white space at the end of the line is not wrapped when the white-space property is set to pre-wrap and overflow-wrap is break-spaces in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 2ch;
|
||||
overflow-wrap: break-spaces;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: single preserved white space at the end of with white-space:pre-wrap overflow-wrap:break-spaces break-word in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="a single preserved white space at the end of the line is wrapped when the white-space property is set to pre-wrap and overflow-wrap is break-spaces break-word in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
overflow-wrap: break-spaces break-word;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea> XX XX</textarea>
|
||||
</body>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap does not cause wrapping in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When the white-space property is set to pre-wrap, preserved white space at the end of the line must hang or be collapsed, and must not cause preceeding content to be wrapped in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
margin-left: -1ch;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea> XX 
|
||||
XX </textarea>
|
||||
</body>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with right alignement in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when right-aligning in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX 
|
||||
XX </textarea>
|
||||
</body>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with center alignement in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when centering in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>XX 
|
||||
XX </textarea>
|
||||
</body>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with justification in a textarea</title>
|
||||
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
|
||||
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html">
|
||||
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when justifying in a textarea.">
|
||||
<style>
|
||||
textarea {
|
||||
word-wrap: initial; /*deprecated alias*/
|
||||
overflow-wrap: initial;
|
||||
line-break: initial;
|
||||
word-break: initial;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
overflow: hidden; /* I don't want scrollbars, and overflow:visible isn't typically supported on textarea */
|
||||
|
||||
font-size: 20px;
|
||||
font-family: ahem;
|
||||
line-height: 1em;
|
||||
white-space: pre-wrap;
|
||||
color: green;
|
||||
|
||||
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat;
|
||||
|
||||
width: 3ch;
|
||||
text-align: justify;
|
||||
text-justify: inter-character;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
|
||||
<textarea>X​X 
|
||||
X​X </textarea>
|
||||
</body>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>White space collapse</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="Every tab is converted to a space. Any space immediately following another collapsible space is collapsed to have zero advance width.">
|
||||
<style type='text/css'>
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='test' class="test"><span>hello   	       there</span></div>
|
||||
<div id="ref" class="ref"><span>hello there</span></div>
|
||||
<div id='testW' class="test"><span>缔造真正全球通行       	   的万维网</span></div>
|
||||
<div id="refW" class="ref"><span>缔造真正全球通行 的万维网</span></div>
|
||||
<div id='testF' class="test"><span>FULL   	        WIDTH</span></div>
|
||||
<div id="refF" class="ref"><span>FULL  WIDTH</span></div>
|
||||
<div id='testH' class="test"><span>ハン   	         カク</span></div>
|
||||
<div id="refH" class="ref"><span>ハン   カク</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('test').firstChild.offsetWidth, document.getElementById('ref').firstChild.offsetWidth);
|
||||
}, "spaces removed");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testW').firstChild.offsetWidth, document.getElementById('refW').firstChild.offsetWidth);
|
||||
}, "spaces removed between Wide characters");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testF').firstChild.offsetWidth, document.getElementById('refF').firstChild.offsetWidth);
|
||||
}, "spaces removed between Fullwidth characters");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testH').firstChild.offsetWidth, document.getElementById('refH').firstChild.offsetWidth);
|
||||
}, "spaces removed between Halfwidth characters");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>White space and non-ASCII spaces</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="Any space immediately following another collapsible space is collapsed to have zero advance width. Only refers to U+0020, not other Unicode spaces.">
|
||||
<style type='text/css'>
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color: #2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color: #270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='testNB' class="test"><span>hello           there</span></div>
|
||||
<div id="refNB" class="ref"><span>hello   there</span></div>
|
||||
<div id='testEN' class="test"><span>hello           there</span></div>
|
||||
<div id="refEN" class="ref"><span>hello   there</span></div>
|
||||
<div id='testEM' class="test"><span>hello           there</span></div>
|
||||
<div id="refEM" class="ref"><span>hello   there</span></div>
|
||||
<div id='testTS' class="test"><span>hello           there</span></div>
|
||||
<div id="refTS" class="ref"><span>hello   there</span></div>
|
||||
<div id='testZW' class="test"><span>hello   ​       there</span></div>
|
||||
<div id="refZW" class="ref"><span>hello ​ there</span></div>
|
||||
<div id='testNNB' class="test"><span>hello           there</span></div>
|
||||
<div id="refNNB" class="ref"><span>hello   there</span></div>
|
||||
<div id='testIS' class="test"><span>hello           there</span></div>
|
||||
<div id="refIS" class="ref"><span>hello   there</span></div>
|
||||
<div id='testIS2' class="test"><span>缔造真正全球通行           的万维网</span></div>
|
||||
<div id="refIS2" class="ref"><span>缔造真正全球通行   的万维网</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testNB').firstChild.offsetWidth, document.getElementById('refNB').firstChild.offsetWidth);
|
||||
}, "no-break space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testEN').firstChild.offsetWidth, document.getElementById('refEN').firstChild.offsetWidth);
|
||||
}, "en space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testEM').firstChild.offsetWidth, document.getElementById('refEM').firstChild.offsetWidth);
|
||||
}, "em space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testTS').firstChild.offsetWidth, document.getElementById('refTS').firstChild.offsetWidth);
|
||||
}, "thin space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testZW').firstChild.offsetWidth, document.getElementById('refZW').firstChild.offsetWidth);
|
||||
}, "zero width space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testZW').firstChild.offsetWidth, document.getElementById('refZW').firstChild.offsetWidth);
|
||||
}, "narrow no-break space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testIS').firstChild.offsetWidth, document.getElementById('refIS').firstChild.offsetWidth);
|
||||
}, "ideographic space");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testIS2').firstChild.offsetWidth, document.getElementById('refIS2').firstChild.offsetWidth);
|
||||
}, "ideographic space inside ideographic text");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The assertion will fail if space is produced for any line in the test paragraph.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Whitespace and bidi control characters</title>
|
||||
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
|
||||
<link rel='help' href='https://drafts.csswg.org/css-text-3/#line-break-transform'>
|
||||
<meta name="assert" content="All spaces and tabs immediately preceding or following a segment break are removed, ignoring bidi formatting characters as if they were not there.">
|
||||
<style type='text/css'>
|
||||
.test span { font-size: 24px; font-family: sans-serif; background-color:#2AA5F7; color: white; }
|
||||
.ref span { font-size: 24px; font-family: sans-serif; background-color:#270CEF; color: white; }
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='log'></div>
|
||||
<div id='testRLO1' class="test"><span>RLO‮
|
||||
level‬here</span></div>
|
||||
<div id="refRLO1" class="ref"><span>RLOlevel here</span></div>
|
||||
<div id='testRLO2' class="test"><span>RLO  ‮ 
|
||||
level‬</span></div>
|
||||
<div id="refRLO2" class="ref"><span>RLO level</span></div>
|
||||
<div id='testRLO3' class="test"><span>RLO
|
||||
   ‮     level‬</span></div>
|
||||
<div id="refRLO3" class="ref"><span>RLO level</span></div>
|
||||
<div id='testRLO4' class="test"><span>RLO ‮  
|
||||
     level‬</span></div>
|
||||
<div id="refRLO4" class="ref"><span>RLO level</span></div>
|
||||
<div id='testRLO5' class="test"><span>RLO
|
||||
|
||||
‮
|
||||
|
||||
level‬</span></div>
|
||||
<div id="refRLO5" class="ref"><span>RLO level</span></div>
|
||||
<div id='testRLE1' class="test"><span>RLE‫
|
||||
level‬here</span></div>
|
||||
<div id="refRLE1" class="ref"><span>RLElevel here</span></div>
|
||||
<div id='testRLE2' class="test"><span>RLE  ‫ 
|
||||
level‬</span></div>
|
||||
<div id="refRLE2" class="ref"><span>RLE level</span></div>
|
||||
<div id='testRLE3' class="test"><span>RLE
|
||||
   ‫     level‬</span></div>
|
||||
<div id="refRLE3" class="ref"><span>RLE level</span></div>
|
||||
<div id='testRLE4' class="test"><span>RLE ‫  
|
||||
     level‬</span></div>
|
||||
<div id="refRLE4" class="ref"><span>RLE level</span></div>
|
||||
<div id='testRLE5' class="test"><span>RLE
|
||||
|
||||
‫
|
||||
|
||||
level‬</span></div>
|
||||
<div id="refRLE5" class="ref"><span>RLE level</span></div>
|
||||
<div id='testRLI1' class="test"><span>RLI⁧
|
||||
level⁩here</span></div>
|
||||
<div id="refRLI1" class="ref"><span>RLIlevel here</span></div>
|
||||
<div id='testRLI2' class="test"><span>RLI  ⁧ 
|
||||
level⁩</span></div>
|
||||
<div id="refRLI2" class="ref"><span>RLI level</span></div>
|
||||
<div id='testRLI3' class="test"><span>RLI
|
||||
   ⁧     level⁩</span></div>
|
||||
<div id="refRLI3" class="ref"><span>RLI level</span></div>
|
||||
<div id='testRLI4' class="test"><span>RLI ⁧  
|
||||
     level⁩</span></div>
|
||||
<div id="refRLI4" class="ref"><span>RLI level</span></div>
|
||||
<div id='testRLI5' class="test"><span>RLI
|
||||
|
||||
⁧
|
||||
|
||||
level⁩</span></div>
|
||||
<div id="refRLI5" class="ref"><span>RLI level</span></div>
|
||||
<div id='testRLM1' class="test"><span>RLM‏
|
||||
mark</span></div>
|
||||
<div id="refRLM1" class="ref"><span>RLM mark</span></div>
|
||||
<div id='testRLM2' class="test"><span>RLM  ‏ 
|
||||
mark</span></div>
|
||||
<div id="refRLM2" class="ref"><span>RLM mark</span></div>
|
||||
<div id='testRLM3' class="test"><span>RLM
|
||||
   ‏     mark</span></div>
|
||||
<div id="refRLM3" class="ref"><span>RLM mark</span></div>
|
||||
<div id='testRLM4' class="test"><span>RLM ‏  
|
||||
     mark</span></div>
|
||||
<div id="refRLM4" class="ref"><span>RLM mark</span></div>
|
||||
<div id='testRLM5' class="test"><span>RLM
|
||||
|
||||
‏
|
||||
|
||||
mark</span></div>
|
||||
<div id="refRLM5" class="ref"><span>RLM mark</span></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLO1').firstChild.offsetWidth, document.getElementById('refRLO1').firstChild.offsetWidth);
|
||||
}, "RLO 1");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLO2').firstChild.offsetWidth, document.getElementById('refRLO2').firstChild.offsetWidth);
|
||||
}, "RLO 2");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLO3').firstChild.offsetWidth, document.getElementById('refRLO3').firstChild.offsetWidth);
|
||||
}, "RLO 3");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLO4').firstChild.offsetWidth, document.getElementById('refRLO4').firstChild.offsetWidth);
|
||||
}, "RLO 4");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLO5').firstChild.offsetWidth, document.getElementById('refRLO5').firstChild.offsetWidth);
|
||||
}, "RLO 5");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLE1').firstChild.offsetWidth, document.getElementById('refRLE1').firstChild.offsetWidth);
|
||||
}, "RLE 1");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLE2').firstChild.offsetWidth, document.getElementById('refRLE2').firstChild.offsetWidth);
|
||||
}, "RLE 2");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLE3').firstChild.offsetWidth, document.getElementById('refRLE3').firstChild.offsetWidth);
|
||||
}, "RLE 3");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLE4').firstChild.offsetWidth, document.getElementById('refRLE4').firstChild.offsetWidth);
|
||||
}, "RLE 4");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLE5').firstChild.offsetWidth, document.getElementById('refRLE5').firstChild.offsetWidth);
|
||||
}, "RLE 5");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLI1').firstChild.offsetWidth, document.getElementById('refRLI1').firstChild.offsetWidth);
|
||||
}, "RLI 1");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLI2').firstChild.offsetWidth, document.getElementById('refRLI2').firstChild.offsetWidth);
|
||||
}, "RLI 2");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLI3').firstChild.offsetWidth, document.getElementById('refRLI3').firstChild.offsetWidth);
|
||||
}, "RLI 3");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLI4').firstChild.offsetWidth, document.getElementById('refRLI4').firstChild.offsetWidth);
|
||||
}, "RLI 4");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLI5').firstChild.offsetWidth, document.getElementById('refRLI5').firstChild.offsetWidth);
|
||||
}, "RLI 5");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLM1').firstChild.offsetWidth, document.getElementById('refRLM1').firstChild.offsetWidth);
|
||||
}, "RLM 1");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLM2').firstChild.offsetWidth, document.getElementById('refRLM2').firstChild.offsetWidth);
|
||||
}, "RLM 2");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLM3').firstChild.offsetWidth, document.getElementById('refRLM3').firstChild.offsetWidth);
|
||||
}, "RLM 3");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLM4').firstChild.offsetWidth, document.getElementById('refRLM4').firstChild.offsetWidth);
|
||||
}, "RLM 4");
|
||||
test(function() {
|
||||
assert_equals(document.getElementById('testRLM5').firstChild.offsetWidth, document.getElementById('refRLM5').firstChild.offsetWidth);
|
||||
}, "RLM 5");
|
||||
</script>
|
||||
<!-- Notes:
|
||||
The first test has an extra word to make the reference easier to create, given that the space ends up at the end of the sequence.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: white-space-collapsing - discard - basic cases</title>
|
||||
<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
|
||||
<link rel="help" title="CSS Text Level 3: 4.1. White Space Collapsing: the ‘white-space-collapsing’ property" href="http://www.w3.org/TR/css-text-3/#white-space-collapsing" />
|
||||
<link rel="match" href="reference/white-space-collapsing-discard-001-ref.xht"/>
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The UA should discard all white space in the element when white-space-collapsing is set to discard." />
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.test span {
|
||||
white-space-collapsing: discard;
|
||||
}
|
||||
/* the CSS below is not part of the test */
|
||||
span {
|
||||
color: Blue;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Test passes if the first sentence matches the second one.
|
||||
</p>
|
||||
<div class="test">
|
||||
<span>All White Space In The Element Should Be Discarded.</span>
|
||||
</div>
|
||||
<div class="control">
|
||||
<span>AllWhiteSpaceInTheElementShouldBeDiscarded.</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: white-space-collapsing - preserve-breaks - basic cases</title>
|
||||
<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
|
||||
<link rel="help" title="CSS Text Level 3: 4.1. White Space Collapsing: the ‘white-space-collapsing’ property" href="http://www.w3.org/TR/css-text-3/#white-space-collapsing" />
|
||||
<link rel="match" href="reference/white-space-collapsing-preserve-breaks-001-ref.xht"/>
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The UA should collapse sequences of white space into a single character when white-space-collapsing is set to preserve." />
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.test span {
|
||||
white-space-collapsing: preserve-breaks;
|
||||
}
|
||||
/* the CSS below is not part of the test */
|
||||
span {
|
||||
color: Blue;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Test passes if the first two sentences matches the second one.
|
||||
</p>
|
||||
<p class="test">
|
||||
<span>
|
||||
Sequences of white space should collapse into a single character.
|
||||
But segment breaks as forced line breaks are preserved.
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>
|
||||
Sequences of white space should collapse into a single character.<br />
|
||||
But segment breaks as forced line breaks are preserved.
|
||||
</span>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CSS Test: white-space-collapsing - trim-inner - basic cases</title>
|
||||
<link rel="author" title="Satoshi Umehara" href="mailto:umehara@est.co.jp" />
|
||||
<link rel="help" title="CSS Text Level 3: 4.1. White Space Collapsing: the ‘white-space-collapsing’ property" href="http://www.w3.org/TR/css-text-3/#white-space-collapsing" />
|
||||
<link rel="match" href="reference/white-space-collapsing-trim-inner-001-ref.xht"/>
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The UA should discard all white space at the beginning of a block and all white space at the end of a block when white-space-collapsing is set to trim-inner." />
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.test span {
|
||||
white-space-collapsing: trim-inner;
|
||||
}
|
||||
/* the CSS below is not part of the test */
|
||||
div {
|
||||
color: Blue;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Test passes if each text positions in the first line match the corresponding positions in the second line.
|
||||
</p>
|
||||
<div>
|
||||
<div class="test">
|
||||
<span> 1 2 </span>
|
||||
<span> 3 4 </span>
|
||||
<span> 5 6 </span>
|
||||
<span>
|
||||
|
||||
7
|
||||
|
||||
8
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>1 2</span>
|
||||
<span> 3 4 </span>
|
||||
<span>5 6</span>
|
||||
<span>7
|
||||
|
||||
8</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue