Skip to content

Commit

Permalink
Merge pull request #6936 from frivoal/text-overflow-line-edge
Browse files Browse the repository at this point in the history
[css-ui] Update test to match spec change
  • Loading branch information
frivoal committed Sep 1, 2017
2 parents b8b9886 + fa8c888 commit 48b2e44
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions css/css-ui-3/text-overflow-006.html
Expand Up @@ -5,27 +5,24 @@
<link rel="help" href="http://www.w3.org/TR/css3-ui/#text-overflow">
<link rel="match" href="reference/text-overflow-006-ref.html">
<meta name="flags" content="">
<meta name="assert" content="Checks that the elipsis is applied at the edge of the block container, not the end of the line box, when these are different.">
<meta name="assert" content="Checks that the elipsis is applied at the edge of the line box, not the end of the block container, when these are different.">
<style>
div {
white-space: pre;
font-family: monospace;
text-overflow: ellipsis;
overflow: hidden;
width: calc(5ch + 1px);
/* 5ch ought to be enough,
but Safari seems to have aliasing issues that make the ellipsis character larger than 1ch by a fraction of a pixel.
Adding an extra 1px does not change the validity of the test,
width: 9.5ch;
/* 9ch ought to be enough,
but Safari seems to have aliasing issues that make the ellipsis character larger than 1ch by a bit.
Adding an extra .5 does not change the validity of the test,
and lets safari fit “PASS…” in the space provided.
This issue may be a bug, but if so, it is unrelated to what this test is testing,
so no need to force a fail when an easy workaround is available.

NB: At the time of writing, Safari fails the test anyway,
but I want to make it possible for it to pass just by fixing what is relevant to CSS-UI.
*/
}
span { float: right; }
</style>

<p>Test passes if “PASS…” appears below.</p>
<div><span> </span>PASSfiller text to make things overflow</div>
<div><span> </span>PASS FAIL</div>

0 comments on commit 48b2e44

Please sign in to comment.