Update web-platform-tests to revision b'ee6da9d71d0268d7fdb04e8e5b26858f46ee0cc4'

This commit is contained in:
WPT Sync Bot 2022-01-20 04:38:55 +00:00 committed by cybai
parent 4401622eb1
commit b77ad115f6
16832 changed files with 270819 additions and 87621 deletions

View file

@ -0,0 +1,12 @@
<!doctype html>
<meta charset="utf-8">
<title>Remove display:contents with block child and whitespace sibling</title>
<link rel="help" href="https://drafts.csswg.org/css-display-3/#valdef-display-contents">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-rules">
<link rel="match" href="../../reference/pass_if_two_words.html">
<p>There should be a space between "two" and "words" below.</p>
two<div id="rm" style="display:contents"><div></div></div> <span>words</span>
<script>
rm.offsetTop;
rm.remove();
</script>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Reference File</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
display: inline-block;
width: 3ch;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
box-sizing: content-box;
overflow-y: hidden;
overflow-x: auto;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<div class="left">XXX&#10;X</div>
<div class="center">XXX&#10;X</div>
<div class="right">XXX&#10;X</div>
<div class="start">XXX&#10;X</div>
<div class="end">XXX&#10;X</div>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Reference File</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
display: inline-block;
width: 3ch;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
box-sizing: content-box;
overflow-y: hidden;
overflow-x: auto;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<div class="left">XXXX&#10;X</div>
<div class="center">XXXX&#10;X</div>
<div class="right">XXXX&#10;X</div>
<div class="start">XXXX&#10;X</div>
<div class="end">XXXX&#10;X</div>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Reference File</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
display: inline-block;
width: 3ch;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
box-sizing: content-box;
overflow-y: hidden;
overflow-x: auto;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<div class="left">XXX&#10;X</div>
<div class="center">XXX&#10;X</div>
<div class="right">XXX&#10;X</div>
<div class="start">XXX&#10;X</div>
<div class="end">XXX&#10;X</div>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Reference File</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
display: inline-block;
width: 3ch;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
box-sizing: content-box;
overflow-y: hidden;
overflow-x: auto;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<div class="left">XXXX&#10;X</div>
<div class="center">XXXX&#10;X</div>
<div class="right">XXXX&#10;X</div>
<div class="start">XXXX&#10;X</div>
<div class="end">XXXX&#10;X</div>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Reference File</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
display: inline-block;
width: 3ch;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
box-sizing: content-box;
overflow-y: hidden;
overflow-x: auto;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<div class="left">&nbsp;XXX&#10;X</div>
<div class="center">&nbsp;XXX&#10;X</div>
<div class="right">&nbsp;XXX&#10;X</div>
<div class="start">&nbsp;XXX&#10;X</div>
<div class="end">&nbsp;XXX&#10;X</div>

View file

@ -0,0 +1,139 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reference Test</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
section
{
border: black solid 2px;
float: left;
font-family: monospace;
font-size: 14px;
line-height: 1; /* computes to 14px */
margin-bottom: 10px;
width: 16ch;
}
section.odds
{
clear: both;
}
section.even
{
margin-left: 10em;
}
div.first-subtest
{
white-space: normal;
}
div.second-subtest
{
white-space: nowrap;
}
div.third-subtest
{
white-space: pre;
}
div.fourth-subtest
{
white-space: pre-wrap;
}
div.fifth-subtest
{
white-space: break-spaces;
}
div.sixth-subtest
{
white-space: pre-line;
}
hr
{
clear: both;
margin: 4em auto 1.5em 0em;
width: 480px;
}
</style>
<p>Test passes if the characters inside of each black bordered rectangles on the lefthand side are laid out identically to their counterparts on the righthand side.
<section class="odds">
<div class="first-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="even">
<div class="first-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<hr>
<section class="odds">
<div class="second-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="even">
<div class="second-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<hr>
<section class="odds">
<div class="third-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="even">
<div class="third-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<hr>
<section class="odds">
<div class="fourth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="even">
<div class="fourth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<hr>
<section class="odds">
<div class="fifth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="even">
<div class="fifth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<hr>
<section class="odds">
<div class="sixth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="even">
<div class="sixth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reference Test</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
div
{
border: black solid 2px;
font-family: monospace;
font-size: 32px;
line-height: 1.25; /* computes to 40px */
margin-bottom: 0.25em;
width: 16ch;
overflow: hidden;
}
span
{
background-color: yellow;
}
</style>
<p>Test passes if the characters inside each black-bordered rectangle are laid out identically and if each black-bordered rectangle does not generate a horizontal scrollbar.
<div>Lorem&nbsp;ipsum.<span>&nbsp;&nbsp;&nbsp;&nbsp;</span><br>
Dolor<br>
&nbsp;&nbsp;&nbsp;sit amet. <br>
consectetur</div>
<div>Lorem&nbsp;ipsum.<span>&nbsp;&nbsp;&nbsp;&nbsp;</span><br>
Dolor<br>
&nbsp;&nbsp;&nbsp;sit amet. <br>
consectetur</div>

View file

@ -0,0 +1,11 @@
<!doctype html>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-rules">
<link rel="match" href="../../reference/pass_if_two_words.html">
<p>There should be a space between "two" and "words" below.</p>
<div id="host">two<div id="rm"></div> <span>words</span></div>
<script>
let root = host.attachShadow({mode:"open"});
root.innerHTML = "<slot></slot>";
host.offsetTop;
rm.slot = "unknown";
</script>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-normal">
<link rel="match" href="reference/trailing-space-and-text-alignment-001-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: normal' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: normal;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre">
<link rel="match" href="reference/trailing-space-and-text-alignment-002-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre' shouldn't hang and may cause overflow and activate the scrollbars.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: pre;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX &#10;X</textarea>
<textarea class="center">XXX &#10;X</textarea>
<textarea class="right">XXX &#10;X</textarea>
<textarea class="start">XXX &#10;X</textarea>
<textarea class="end">XXX &#10;X</textarea>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="match" href="reference/trailing-space-and-text-alignment-001-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre-wrap' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: pre-wrap;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="match" href="reference/trailing-space-and-text-alignment-002-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: break-spaces' shouldn't hang and may cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: break-spaces;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-line">
<link rel="match" href="reference/trailing-space-and-text-alignment-001-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre-line' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: pre-line;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing RTL white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-normal">
<link rel="match" href="reference/trailing-space-and-text-alignment-rtl-001-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: normal' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: normal;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing RTL white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre">
<link rel="match" href="reference/trailing-space-and-text-alignment-rtl-002-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre' shouldn't hang and may cause overflow and activate the scrollbars.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: pre;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX &#10;X</textarea>
<textarea class="center">XXX &#10;X</textarea>
<textarea class="right">XXX &#10;X</textarea>
<textarea class="start">XXX &#10;X</textarea>
<textarea class="end">XXX &#10;X</textarea>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="match" href="reference/trailing-space-and-text-alignment-rtl-001-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre-wrap' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: pre-wrap;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing RTL white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces">
<link rel="match" href="reference/trailing-space-and-text-alignment-rtl-005-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: break-spaces' shouldn't hang and may cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: break-spaces;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: preserved trailing RTL white space that hang in a textarea</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="6.1. Text Alignment: the text-align shorthand" href="https://drafts.csswg.org/css-text-3/#text-align-property">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-line">
<link rel="match" href="reference/trailing-space-and-text-alignment-rtl-001-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre-line' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
textarea {
/* Reset user-agent style */
margin: initial;
padding: initial;
border: initial;
outline: initial;
resize: initial;
overflow-wrap: initial;
height: 100px;
font: 40px/1 Ahem;
border: 1px solid black;
overflow-y: hidden;
overflow-x: auto;
/* testing */
width: 3ch;
white-space: pre-line;
direction: rtl;
}
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.start { text-align: start; }
.end { text-align: end; }
</style>
<textarea class="left">XXX X</textarea>
<textarea class="center">XXX X</textarea>
<textarea class="right">XXX X</textarea>
<textarea class="start">XXX X</textarea>
<textarea class="end">XXX X</textarea>

View file

@ -0,0 +1,150 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text Test: white-space property applies to text</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-processing">
<link rel="help" href="https://www.w3.org/TR/css-display-3/#box-generation">
<link rel="match" href="reference/white-space-applies-to-text-001-ref.html">
<meta content="" name="flags">
<meta content="This test checks that 'white-space', which applies to inlines, also applies to text. In this test, we verify that 'white-space: normal', 'white-space: nowrap', 'white-space: pre', 'white-space: pre-wrap', 'white-space: break-spaces' and 'white-space: pre-line' apply to text." name="assert">
<style>
section
{
border: black solid 2px;
float: left;
font-family: monospace;
font-size: 14px;
line-height: 1; /* computes to 14px */
margin-bottom: 10px;
width: 16ch;
}
section.applies-to-text
{
clear: both;
}
section.applies-to-inline
{
margin-left: 10em;
}
div
{
display: contents;
}
div.first-subtest
{
white-space: normal;
}
div.second-subtest
{
white-space: nowrap;
}
div.third-subtest
{
white-space: pre;
}
div.fourth-subtest
{
white-space: pre-wrap;
}
div.fifth-subtest
{
white-space: break-spaces;
}
div.sixth-subtest
{
white-space: pre-line;
}
hr
{
clear: both;
margin: 4em auto 1.5em 0em;
width: 480px;
}
</style>
<p>Test passes if the characters inside of each black bordered rectangles on the lefthand side are laid out identically to their counterparts on the righthand side.
<section class="applies-to-text">
<div class="first-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="applies-to-inline">
<div class="first-subtest"><span>Lorem ipsum. Dolor&NewLine;
sit.</span></div>
</section>
<hr>
<section class="applies-to-text">
<div class="second-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="applies-to-inline">
<div class="second-subtest"><span>Lorem ipsum. Dolor&NewLine;
sit.</span></div>
</section>
<hr>
<section class="applies-to-text">
<div class="third-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="applies-to-inline">
<div class="third-subtest"><span>Lorem ipsum. Dolor&NewLine;
sit.</span></div>
</section>
<hr>
<section class="applies-to-text">
<div class="fourth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="applies-to-inline">
<div class="fourth-subtest"><span>Lorem ipsum. Dolor&NewLine;
sit.</span></div>
</section>
<hr>
<section class="applies-to-text">
<div class="fifth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="applies-to-inline">
<div class="fifth-subtest"><span>Lorem ipsum. Dolor&NewLine;
sit.</span></div>
</section>
<hr>
<section class="applies-to-text">
<div class="sixth-subtest">Lorem ipsum. Dolor&NewLine;
sit.</div>
</section>
<section class="applies-to-inline">
<div class="sixth-subtest"><span>Lorem ipsum. Dolor&NewLine;
sit.</span></div>
</section>

View file

@ -0,0 +1,63 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text Test: Overflowing hanging spaces should be ink overflow</title>
<!--
Issue 4297: [css-text-3] Hanging spaces can't be scrollable overflow
https://github.com/w3c/csswg-drafts/issues/4297
Resolution:
Hanging spaces are ink overflow by default.
UAs may make them scrollable overflow when
they think that would be useful.
-->
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#hanging">
<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#ink">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-021-ref.html">
<meta content="should" name="flags">
<meta content="This test checks that overflowing hanging spaces at end of line are treated as ink overflow. The overflowing hanging spaces at end of line should not extend the scrollable overflow area of the tested box. Therefore the no horizontal scrollbar condition of the test." name="assert">
<style>
div
{
border: black solid 2px;
font-family: monospace;
font-size: 32px;
line-height: 1.25; /* computes to 40px */
margin-bottom: 0.25em;
width: 16ch;
}
span
{
background-color: yellow;
}
div#test
{
overflow: auto;
white-space: pre-wrap;
}
div#reference
{
white-space: normal;
}
</style>
<p>Test passes if the characters inside each black-bordered rectangle are laid out identically and if each black-bordered rectangle does not generate a horizontal scrollbar.
<div id="test">Lorem ipsum.<span> </span>Dolor
sit amet. <br>consectetur</div>
<div id="reference">Lorem&nbsp;ipsum.<span>&nbsp;&nbsp;&nbsp;&nbsp;</span><br>
Dolor<br>
&nbsp;&nbsp;&nbsp;sit amet. <br>
consectetur</div>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="assert" content="preserved trailing spaces under 'white-space: pre-wrap' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
width: 2ch;
height: 100px;
font: 50px/1 Ahem;
color: green;
overflow-y: hidden;
overflow-x: auto;
white-space: pre-wrap;
}
</style>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div>XX XX</div>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property">
<link rel="help" title="4.1.2. Phase II: Trimming and Positioning" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap">
<link rel="match" href="reference/white-space-break-spaces-005-ref.html">
<meta name="assert" content="preserved RTL trailing spaces under 'white-space: pre-wrap' hang and shouldn't cause overflow and activate the horizontal scrollbar.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
width: 2ch;
height: 100px;
font: 50px/1 Ahem;
color: green;
overflow-y: hidden;
overflow-x: auto;
white-space: pre-wrap;
direction: rtl;
}
</style>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div>XX XX</div>