Content-Length: 578809 | pFad | http://github.com/mozilla/gecko-dev/commit/fc057f7641a34454b463a3068ccb43d7e1efb63d

47 Bug 1580068 [wpt PR 18949] - [css-text] Adjust trailing space tests i… · mozilla/gecko-dev@fc057f7 · GitHub
Skip to content

Commit

Permalink
Bug 1580068 [wpt PR 18949] - [css-text] Adjust trailing space tests i…
Browse files Browse the repository at this point in the history
…n response to w3c/csswg-drafts#4180, a=testonly

Automatic update from web-platform-tests
[css-text] Adjust trailing space tests in response to w3c/csswg-drafts#4180 (#18949)

--

wpt-commits: 0bfde9f6a8bfde0fde4dba73d7172a8eed6e946e
wpt-pr: 18949
  • Loading branch information
frivoal authored and moz-wptsync-bot committed Sep 18, 2019
1 parent a72d13a commit fc057f7
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<meta charset="utf-8">
<title>CSS test reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<style>
div {
line-height: 1;
color: transparent;
background: green;
float: left;
clear: left;
}
</style>

<p>Test passes if the characters below are arranged in a square and if there is no red.
<div>ああ<br>ああ</div>
<p>Test passes if the shape below is green and if there is no red.

<div>あああ</div><div>ああ</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS test reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<style>
div {
line-height: 1;
color: transparent;
background: green;
float: left;
clear: left;
}
</style>

<p>Test passes if the shape below is green and if there is no red.

<div>ああああ あ あ</div>
<div>ああ</div>
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test reference</title>
<title>CSS test reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<style>
div { font-family: monospace; }
div {
line-height: 1;
color: transparent;
background: green;
float: left;
clear: left;
white-space: pre;
}
</style>

<p>Test passes if there are two columns of "x" characters below and no red.
<p>Test passes if the shape below is green and if there is no red.

<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx<br>xx</div>
<div>xx&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</div>
<div>xx</div>
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: ideographic space at the end of line must be removed</title>
<title>CSS Text level 3 Test: ideographic space at the end of line must hang</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/trailing-ideographic-space-001-ref.html">
<meta name="assert" content="An ideographic space (U+3000) at the end of the line must be removed.">
<meta name="assert" content="An ideographic space (U+3000) at the end of the line must hang.">
<style>
div { width: 2em; }
span { background: red; } /* If the space hangs instead of being removed, there will be red */
div {
position: absolute;
width: max-content;
line-height: 1;
color: transparent;
}
.red { background: red; }
.green { background: green; }
</style>

<p>Test passes if the characters below are arranged in a square and if there is no red.
<div>ああ<span>&#x3000;</span>ああ</div>
<p>Test passes if the shape below is green and if there is no red.

<div class=red>あああ</div>
<div class=red>ああ<span class=green>&#x3000;</span><br>ああ</div>
<div class=green>ああ<br>ああ</div>
<!-- the ideographic space must not be removed,
so it should hide the third red あ of the first div.
However, it should hang and therefore not extend the width of its parent div,
which would be visible as red on the second line if it were expanded.
-->
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: sequence of spaces and ideographic spaces at the end of line must be removed</title>
<title>CSS Text level 3 Test: sequence of spaces and ideographic spaces at the end of line must hang</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/trailing-ideographic-space-001-ref.html">
<meta name="assert" content="An sequence ideographic space (U+3000) and regular spaces at the end of the line must be removed.">
<link rel="match" href="reference/trailing-ideographic-space-002-ref.html">
<meta name="assert" content="An sequence ideographic space (U+3000) and regular spaces at the end of the line must hang.">
<style>
div { width: 2em; }
span { background: red; } /* If the space hangs instead of being removed, there will be red */
div {
position: absolute;
width: max-content;
line-height: 1;
color: transparent;
}
.red { background: red; }
.green { background: green; }
</style>

<p>Test passes if the characters below are arranged in a square and if there is no red.
<div>ああ<span>&#x3000;&#x3000; &#x3000; &#x3000;</span>ああ</div>
<p>Test passes if the shape below is green and if there is no red.
<div class=red>ああああ あ あ</div>
<div class=red>ああ<span class=green>&#x3000;&#x3000; &#x3000; &#x3000;</span><br>ああ</div>
<div class=green>ああ<br>ああ</div>
<!-- the trailing sequence of spaces must not be removed,
so it should hide all of the first (red) div.
However, it should hang and therefore not extend the width of its parent div,
which would be visible as red on the second line if it were expanded.
-->
Original file line number Diff line number Diff line change
@@ -1,30 +1,46 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: sequence of spaces and other space separators at the end of line must be removed</title>
<title>CSS Text level 3 Test: sequence of spaces and other space separators at the end of line must hang</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/trailing-other-space-separators-001-ref.html">
<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must be removed.">
<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must hang.">
<style>
div { font-family: monospace; width: 2ch; }
span { background: red; } /* If the space hangs instead of being removed, there will be red */
div {
position: absolute;
width: max-content;
line-height: 1;
color: transparent;
}
.red { background: red; }
.green { background: green; }
#pre { white-space:pre; }
</style>
<p>Test passes if the shape below is green and if there is no red.

<p>Test passes if there are two columns of "x" characters below and no red.

<div>xx<span>&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</span>xx</div>
<div>xx<span>&#x1680;</span>xx</div>
<div>xx<span>&#x2000;</span>xx</div>
<div>xx<span>&#x2001;</span>xx</div>
<div>xx<span>&#x2002;</span>xx</div>
<div>xx<span>&#x2003;</span>xx</div>
<div>xx<span>&#x2004;</span>xx</div>
<div>xx<span>&#x2005;</span>xx</div>
<div>xx<span>&#x2006;</span>xx</div>
<div>xx<span>&#x2007;</span><wbr>xx</div>
<div>xx<span>&#x2008;</span>xx</div>
<div>xx<span>&#x2009;</span>xx</div>
<div>xx<span>&#x200A;</span>xx</div>
<div>xx<span>&#x202F;</span><wbr>xx</div>
<div>xx<span>&#x205F;</span>xx</div>
<div>xx<span>&#x3000;</span>xx</div>
<div class=red id=pre>xx&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</div>
<div class=red>xx<span class=green>&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</span><br>xx</div>
<div class=red>xx<span class=green>&#x1680;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2000;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2001;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2002;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2003;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2004;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2005;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2006;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2007;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2008;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2009;</span><br>xx</div>
<div class=red>xx<span class=green>&#x200A;</span><br>xx</div>
<div class=red>xx<span class=green>&#x202F;</span><br>xx</div>
<div class=red>xx<span class=green>&#x205F;</span><br>xx</div>
<div class=red>xx<span class=green>&#x3000;</span><br>xx</div>
<div class=green>xx<br>xx</div>
<!-- the trailing sequence of spaces must not be removed,
so it should hide all of the first (red) div.
However, it should hang and therefore not extend the width of its parent div,
which would be visible as red on the second line if it were expanded.
The extra red divs with one character each are for ease of debugging:
if the first one is fine, they will all be fine,
but if it is not, they should help find which one is wrong.
-->
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,45 @@
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/trailing-other-space-separators-001-ref.html">
<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must be removed, with white-space:pre-line.">
<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must hang, with white-space:pre-line.">
<style>
div { font-family: monospace; width: 2ch; white-space: pre-line; }
span { background: red; } /* If the space hangs instead of being removed, there will be red */
div {
position: absolute;
width: max-content;
line-height: 1;
color: transparent;
white-space: pre-line;
}
.red { background: red; }
.green { background: green; }
#pre { white-space:pre; }
</style>

<p>Test passes if there are two columns of "x" characters below and no red.
<p>Test passes if the shape below is green and if there is no red.

<div>xx<span>&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</span>xx</div>
<div>xx<span>&#x1680;</span>xx</div>
<div>xx<span>&#x2000;</span>xx</div>
<div>xx<span>&#x2001;</span>xx</div>
<div>xx<span>&#x2002;</span>xx</div>
<div>xx<span>&#x2003;</span>xx</div>
<div>xx<span>&#x2004;</span>xx</div>
<div>xx<span>&#x2005;</span>xx</div>
<div>xx<span>&#x2006;</span>xx</div>
<div>xx<span>&#x2007;</span><wbr>xx</div>
<div>xx<span>&#x2008;</span>xx</div>
<div>xx<span>&#x2009;</span>xx</div>
<div>xx<span>&#x200A;</span>xx</div>
<div>xx<span>&#x202F;</span><wbr>xx</div>
<div>xx<span>&#x205F;</span>xx</div>
<div>xx<span>&#x3000;</span>xx</div>
<div class=red id=pre>xx&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</div>
<div class=red>xx<span class=green>&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</span><br>xx</div>
<div class=red>xx<span class=green>&#x1680;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2000;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2001;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2002;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2003;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2004;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2005;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2006;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2007;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2008;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2009;</span><br>xx</div>
<div class=red>xx<span class=green>&#x200A;</span><br>xx</div>
<div class=red>xx<span class=green>&#x202F;</span><br>xx</div>
<div class=red>xx<span class=green>&#x205F;</span><br>xx</div>
<div class=red>xx<span class=green>&#x3000;</span><br>xx</div>
<div class=green>xx<br>xx</div>
<!-- the trailing sequence of spaces must not be removed,
so it should hide all of the first (red) div.
However, it should hang and therefore not extend the width of its parent div,
which would be visible as red on the second line if it were expanded.
The extra red divs with one character each are for ease of debugging:
if the first one is fine, they will all be fine,
but if it is not, they should help find which one is wrong.
-->
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,44 @@
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/trailing-other-space-separators-001-ref.html">
<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must be removed, with white-space:nowrap.">
<meta name="assert" content="An sequence of regular spaces and other space separators at the end of the line must hang, with white-space:nowrap.">
<style>
div { font-family: monospace; width: 2ch; white-space: nowrap; }
span { background: red; } /* If the space hangs instead of being removed, there will be red */
div {
position: absolute;
width: max-content;
line-height: 1;
color: transparent;
white-space: nowrap;
}
.red { background: red; }
.green { background: green; }
#pre { white-space:pre; }
</style>
<p>Test passes if the shape below is green and if there is no red.

<p>Test passes if there are two columns of "x" characters below and no red.

<div>xx<span>&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</span><br>xx</div>
<div>xx<span>&#x1680;</span><br>xx</div>
<div>xx<span>&#x2000;</span><br>xx</div>
<div>xx<span>&#x2001;</span><br>xx</div>
<div>xx<span>&#x2002;</span><br>xx</div>
<div>xx<span>&#x2003;</span><br>xx</div>
<div>xx<span>&#x2004;</span><br>xx</div>
<div>xx<span>&#x2005;</span><br>xx</div>
<div>xx<span>&#x2006;</span><br>xx</div>
<div>xx<span>&#x2007;</span><br>xx</div>
<div>xx<span>&#x2008;</span><br>xx</div>
<div>xx<span>&#x2009;</span><br>xx</div>
<div>xx<span>&#x200A;</span><br>xx</div>
<div>xx<span>&#x202F;</span><br>xx</div>
<div>xx<span>&#x205F;</span><br>xx</div>
<div>xx<span>&#x3000;</span><br>xx</div>
<div class=red id=pre>xx&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</div>
<div class=red>xx<span class=green>&#x1680;&#x2000; &#x2001;&#x2002;&#x2003; &#x2004;&#x2005;&#x2006; &#x2007;&#x2008;&#x2009;&#x200A; &#x202F;&#x205F; &#x3000;</span><br>xx</div>
<div class=red>xx<span class=green>&#x1680;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2000;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2001;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2002;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2003;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2004;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2005;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2006;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2007;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2008;</span><br>xx</div>
<div class=red>xx<span class=green>&#x2009;</span><br>xx</div>
<div class=red>xx<span class=green>&#x200A;</span><br>xx</div>
<div class=red>xx<span class=green>&#x202F;</span><br>xx</div>
<div class=red>xx<span class=green>&#x205F;</span><br>xx</div>
<div class=red>xx<span class=green>&#x3000;</span><br>xx</div>
<div class=green>xx<br>xx</div>
<!-- the trailing sequence of spaces must not be removed,
so it should hide all of the first (red) div.
However, it should hang and therefore not extend the width of its parent div,
which would be visible as red on the second line if it were expanded.
The extra red divs with one character each are for ease of debugging:
if the first one is fine, they will all be fine,
but if it is not, they should help find which one is wrong.
-->

0 comments on commit fc057f7

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/mozilla/gecko-dev/commit/fc057f7641a34454b463a3068ccb43d7e1efb63d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy