Bug 1736393 - Don't use ScriptBreak for Tibetan, just treat Tsheg character like a hyphen instead. r=m_kato

Differential Revision: https://phabricator.services.mozilla.com/D128756
This commit is contained in:
Jonathan Kew 2021-10-19 13:11:37 +00:00
Родитель 1aa3a9e868
Коммит 9f67437d11
7 изменённых файлов: 24 добавлений и 10 удалений

Просмотреть файл

@ -370,11 +370,12 @@ static inline bool IS_HYPHEN(char16_t u) {
return (u == U_HYPHEN || u == 0x2010 || // HYPHEN
u == 0x2012 || // FIGURE DASH
u == 0x2013 || // EN DASH
#if ANDROID
/* Bug 1647377: On Android, we don't have a "platform" backend
* that supports Tibetan (nsRuleBreaker.cpp only knows about
* Thai), so instead we just treat the TSHEG like a hyphen to
* provide basic line-breaking possibilities.
#if ANDROID || XP_WIN
/* Bug 1647377: On Android and Windows, we don't have a "platform"
* backend that supports Tibetan (nsRuleBreaker.cpp only knows about
* Thai, and ScriptBreak doesn't handle Tibetan well either), so
* instead we just treat the TSHEG like a hyphen to provide basic
* line-breaking possibilities.
*/
u == 0x0F0B || // TIBETAN MARK INTERSYLLABIC TSHEG
#endif

Просмотреть файл

@ -76,8 +76,8 @@ static inline bool NS_IsSpace(char16_t u) {
static inline bool NS_NeedsPlatformNativeHandling(char16_t aChar) {
return
#if ANDROID // Bug 1647377: no "platform native" support for Tibetan;
// better to just use our class-based breaker.
#if ANDROID || XP_WIN // Bug 1647377/1736393: no "platform native" support for
// Tibetan; better to just use our class-based breaker.
(0x0e01 <= aChar && aChar <= 0x0eff) || // Thai, Lao
#else
(0x0e01 <= aChar && aChar <= 0x0fff) || // Thai, Lao, Tibetan

Просмотреть файл

@ -2,19 +2,23 @@
[white-space:pre-wrap]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:pre-line]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:break-spaces]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:normal]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL

Просмотреть файл

@ -2,20 +2,24 @@
[white-space:pre-wrap]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:pre-line]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:break-spaces]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:normal]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL

Просмотреть файл

@ -2,20 +2,24 @@
[white-space:pre-wrap]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:pre-line]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:break-spaces]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:normal]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL

Просмотреть файл

@ -2,20 +2,24 @@
[white-space:pre-wrap]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:pre-line]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:break-spaces]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL
[white-space:normal]
expected:
if os == "android": PASS
if os == "win": PASS
FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[word-break-normal-bo-000.html]
expected:
if (os == "win"): FAIL