mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1726416 - Update testcase for Arabic subtending marks (from bug 1599841) now that harfbuzz handles the number-directionality issue internally. r=emilio
We can no longer use direction overrides to create the test vs reference renderings here, because of how harfbuzz now handles the numeral directionality internally. So it's difficult to come up with a testcase that verifies the exact rendering of the subtending mark + digit(s) combinations. What we can do, though, is verify that a single digit combines with the subtending mark without affecting its overall width; and that a double-digit number *does* increase the width. These two conditions are unlikely to both hold unless the rendering is behaving correctly. (FWIW, Chrome Canary passes these new test versions, as it also uses a recent harfbuzz; Safari currently fails, as Core Text doesn't support the subtending marks in the same way, if at all.) Differential Revision: https://phabricator.services.mozilla.com/D124902
This commit is contained in:
parent
f2c97ff01c
commit
39811f1b68
@ -9,36 +9,37 @@
|
||||
src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
ul {
|
||||
text-align: right;
|
||||
p {
|
||||
margin-right: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul {
|
||||
font-family: "NotoNastaliqUrduWeb", sans-serif;
|
||||
counter-reset: c;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul li::before {
|
||||
content: counter(c, arabic-indic) "";
|
||||
counter-increment: c;
|
||||
unicode-bidi: bidi-override;
|
||||
ul.ref li::before {
|
||||
content: "\0602";
|
||||
background: blue;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Force double-digit numbers to render "backwards" to match the testcase */
|
||||
ul li:nth-child(10)::before {
|
||||
content: "٠١" "";
|
||||
}
|
||||
|
||||
ul li:nth-child(12)::before {
|
||||
content: "٢١" "";
|
||||
ul.ref.green li::before {
|
||||
background: green;
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ul lang="ur" dir="ltr">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<p>The width of the green bar should match the blue reference block:</p>
|
||||
|
||||
<ul class="ref" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<ul class="ref green" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
|
@ -9,25 +9,42 @@
|
||||
src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
p {
|
||||
margin-right: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul {
|
||||
font-family: "NotoNastaliqUrduWeb", sans-serif;
|
||||
counter-reset: c;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul li::before {
|
||||
content: ""counter(c, arabic-indic);
|
||||
ul.test li::before {
|
||||
content: "\0602" counter(c, arabic-indic);
|
||||
counter-increment: c;
|
||||
unicode-bidi: bidi-override;
|
||||
background: green;
|
||||
color: transparent; /* hide the glyphs to avoid Windows antialiasing
|
||||
artifacts; we only care about the width */
|
||||
}
|
||||
|
||||
ul.ref li::before {
|
||||
content: "\0602";
|
||||
background: blue;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ul lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<p>The width of the green bar should match the blue reference block:</p>
|
||||
|
||||
<ul class="ref" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<ul class="test" lang="ur" dir="rtl">
|
||||
<!-- list item numbers 1-9 should *not* add any width -->
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
|
50
layout/reftests/bugs/1599841-2-notref.html
Normal file
50
layout/reftests/bugs/1599841-2-notref.html
Normal file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Arabic subtending mark, CSS counter, Noto Nastaliq Urdu</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "NotoNastaliqUrduWeb";
|
||||
src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
p {
|
||||
margin-right: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul {
|
||||
font-family: "NotoNastaliqUrduWeb", sans-serif;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.ref li::before {
|
||||
content: "\0602";
|
||||
background: blue;
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul.ref.green li::before {
|
||||
background: green;
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>The width of the green bar should <b>increase</b> half-way down:</p>
|
||||
|
||||
<ul class="ref" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<ul class="ref green" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
</html>
|
55
layout/reftests/bugs/1599841-2.html
Normal file
55
layout/reftests/bugs/1599841-2.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Arabic subtending mark, CSS counter, Noto Nastaliq Urdu</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "NotoNastaliqUrduWeb";
|
||||
src: url("../fonts/NotoNastaliqUrdu-Regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
p {
|
||||
margin-right: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul {
|
||||
font-family: "NotoNastaliqUrduWeb", sans-serif;
|
||||
counter-reset: c 7;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.test li::before {
|
||||
content: "\0602" counter(c, arabic-indic);
|
||||
counter-increment: c;
|
||||
background: green;
|
||||
color: transparent; /* hide the glyphs to avoid Windows antialiasing
|
||||
artifacts; we only care about the width */
|
||||
}
|
||||
|
||||
ul.ref li::before {
|
||||
content: "\0602";
|
||||
background: blue;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>The width of the green bar should <b>increase</b> half-way down:</p>
|
||||
|
||||
<ul class="ref" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<ul class="test" lang="ur" dir="rtl">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<!-- list item numbers 10-11 *should* make the subtending mark wider -->
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -2083,7 +2083,8 @@ fuzzy(0-1,0-10000) == 1577566-1.html 1577566-1-ref.html
|
||||
== 1579953-2.html 1579953-2-ref.html
|
||||
asserts(1-2) == 1588954.html 1588954-ref.html # Bug 1588954
|
||||
== 1595199-1.html 1595199-1-ref.html
|
||||
fuzzy-if(gtkWidget,0-255,0-42) == 1599841-1.html 1599841-1-ref.html
|
||||
== 1599841-1.html 1599841-1-ref.html
|
||||
!= 1599841-2.html 1599841-2-notref.html
|
||||
pref(layout.css.xul-box-display-values.content.enabled,true) == 1606130.html 1606130-ref.html
|
||||
== 1608124-1.html 1608124-1-ref.html
|
||||
skip-if(!OSX) != 1608124-2.html 1608124-2-notref.html
|
||||
|
Loading…
Reference in New Issue
Block a user