Bug 1573249 - patch 3 - Add reftests for ignoring skip-ink behavior on CJK text. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D42683

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jonathan Kew 2019-08-21 11:04:19 +00:00
parent 129e7436f7
commit 75e716cf5d
7 changed files with 110 additions and 0 deletions

View File

@ -118,3 +118,6 @@ test-pref(layout.css.text-decoration-thickness.enabled,false) == text-decoration
test-pref(layout.css.text-decoration-skip-ink.enabled,true) test-pref(layout.css.text-underline-offset.enabled,true) fails HTTP(..) == skip-ink-multiline-position.html skip-ink-multiline-position-ref.html
# fails due to bug 1573711
test-pref(layout.css.text-decoration-skip-ink.enabled,true) fails == skip-ink-vertical-align.html skip-ink-vertical-align-ref.html
pref(layout.css.text-decoration-skip-ink.enabled,true) fuzzy(0-94,0-4) == skip-ink-cjk-1.html skip-ink-cjk-1-ref.html
pref(layout.css.text-decoration-skip-ink.enabled,true) == skip-ink-cjk-2.html skip-ink-cjk-2-ref.html
pref(layout.css.text-decoration-skip-ink.enabled,true) == skip-ink-cjk-3.html skip-ink-cjk-3-ref.html

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="ja">
<meta charset="utf-8">
<style>
body {
font: 16px/2 sans-serif;
}
.test {
font: 32px sans-serif;
text-decoration: 2px red underline;
text-underline-offset: 1px;
}
span {
text-decoration-skip-ink: none;
}
</style>
<div>The underline should skip descenders on the English but not the Japanese:</div>
<div class=test>skipping <span>土砂災害警戒情報</span> skipping</div>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="ja">
<meta charset="utf-8">
<style>
body {
font: 16px/2 sans-serif;
}
.test {
font: 32px sans-serif;
text-decoration: 2px red underline;
text-underline-offset: 1px;
}
</style>
<div>The underline should skip descenders on the English but not the Japanese:</div>
<div class=test>skipping 土砂災害警戒情報 skipping</div>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="ja">
<!-- lang=ja will cause the default japanese font to be used throughout -->
<meta charset="utf-8">
<style>
body {
font: 16px/2 sans-serif;
}
.test {
font: 32px sans-serif;
text-decoration: 2px red underline;
text-underline-offset: -1px; /* make underline clash with digits etc */
text-decoration-skip-ink: none;
}
</style>
<div>The underline should not skip-ink in Japanese runs, even on embedded "common" characters:</div>
<div class=test>黄砂情報 実況図 / 予測図</div>
<div class=test>気象衛星 10分ごと / 2.5分ごと</div>
<div class=test>レーダー•ナウキャスト(降水•雷•竜巻)</div>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="ja">
<!-- lang=ja will cause the default japanese font to be used throughout -->
<meta charset="utf-8">
<style>
body {
font: 16px/2 sans-serif;
}
.test {
font: 32px sans-serif;
text-decoration: 2px red underline;
text-underline-offset: -1px; /* make underline clash with digits etc */
}
</style>
<div>The underline should not skip-ink in Japanese runs, even on embedded "common" characters:</div>
<div class=test>黄砂情報 実況図 / 予測図</div>
<div class=test>気象衛星 10分ごと / 2.5分ごと</div>
<div class=test>レーダー•ナウキャスト(降水•雷•竜巻)</div>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<!-- lang=en will result in a mix of western and japanese fonts -->
<meta charset="utf-8">
<style>
body {
font: 16px/2 sans-serif;
}
.test {
font: 32px sans-serif;
text-decoration: 2px red underline;
text-underline-offset: -1px; /* make underline clash with digits etc */
text-decoration-skip-ink: none;
}
</style>
<div>The underline should not skip-ink in Japanese runs, even on embedded "common" characters:</div>
<div class=test>黄砂情報 実況図 / 予測図</div>
<div class=test>気象衛星 10分ごと / 2.5分ごと</div>
<div class=test>レーダー•ナウキャスト(降水•雷•竜巻)</div>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<!-- lang=en will result in a mix of western and japanese fonts -->
<meta charset="utf-8">
<style>
body {
font: 16px/2 sans-serif;
}
.test {
font: 32px sans-serif;
text-decoration: 2px red underline;
text-underline-offset: -1px; /* make underline clash with digits etc */
}
</style>
<div>The underline should not skip-ink in Japanese runs, even on embedded "common" characters:</div>
<div class=test>黄砂情報 実況図 / 予測図</div>
<div class=test>気象衛星 10分ごと / 2.5分ごと</div>
<div class=test>レーダー•ナウキャスト(降水•雷•竜巻)</div>