Closed Bug 1856267 Opened 1 year ago Closed 1 year ago

Clean up in IsComplexASCIIChar and IsComplexChar in nsLineBreaker

Categories

(Core :: Internationalization, task, P3)

task

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Two issues.

  • IsComplexASCIIChar is AL and NU. We can add IS and QU too.
  • IsComplexChar is broken. It returns same result of IsComplexASCIIChar. So we can remove it.
Component: Layout → Internationalization

mCurrentWordContainsComplexChar and wordHasComplexChar seem to be used
whether a word is non-breakable character. I would like to rename it for clean
up.

Also, nsLineBreaker has a fast path if character is ASCII, alphabet (AL) and
number (NU). But IS and QU are also unbreakable. So we should add it by using
simple table.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/d13725dac1c1 Don't use ICU4X segmenter if word is ASCII only and non-breakable character. r=TYLin,jfkthame

Even if ASCII, old line segmenter rules aren't compatible with UAX#14.
layout/reftests/line-breaking/markup-src-1.html runs on old segmenter prefs,
so we should use old non-breaking conditions for it with old segmenter.

Also, if word-break is break-all, we might have break opportunity for AL, NU,
IS, and QU combinations. So we should use ICU4X segmenter if break-all.

Depends on D190379

Flags: needinfo?(m_kato)
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/776ad5f12955 Don't use ICU4X segmenter if word is ASCII only and non-breakable character. r=TYLin,jfkthame https://hg.mozilla.org/integration/autoland/rev/3cbd51f1e91c Consider incompatible breaking rules for old line segmenteri vs new line segmenter. r=TYLin
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: