Reland "Normalize Katakana to Hiragana in ScriptRunIterator"
This is a reland of 05672d8d The original change was reverted as suspected to cause Android CFI builder to fail: [ RUN ] RenderViewImplTest.PreferredSizeZoomed [FATAL:data_pack.cc(444)] Check failed: !handle->HasResource(resource_id). Duplicate resource 25400 with scale 1 I cannot find any relationship to the failure, and android_cfi_rel_ng trybot passes. Relanding to see if this was really the cause. Original change's description: > Normalize Katakana to Hiragana in ScriptRunIterator > > This patch normalizes Katakana to Hiragana in ScriptData, and > thus in ScriptRunIterator. > > There are 3 ICU script code for kana; USCRIPT_HIRAGANA, > USCRIPT_KATAKANA, and USCRIPT_KATAKANA_OR_HIRAGANA. However, > OpenType has only one 'kana' for all these 3 script codes. > > When shaping, HarfBuzz handles the normalization. However, > Blink splits the incoming string by the ICU scripts. > Splitting these 3 scripts is not useful but consumes CPU > and memory. > > By normalizing in ScriptRunIterator, all types of Kana are > in single run. > > timeToFirstContentfulPaint:layout shows ~3% improvements > https://pinpoint-dot-chromeperf.appspot.com/job/10d9760fe40000 > > though bink_perf.layout does not show much differences > https://pinpoint-dot-chromeperf.appspot.com/job/14f19c00140000 > > This is probably because Katakana characters are not used > much in `japanese-kokoro-insert` (written in ~100 years ago,) > while they are more used in modern pages. > > Bug: 636993 > Change-Id: If692bb575f2232b8fca10cd2ea87e3022debdf05 > Reviewed-on: https://chromium-review.googlesource.com/c/1337650 > Commit-Queue: Koji Ishii <kojii@chromium.org> > Reviewed-by: Dominik Röttsches <drott@chromium.org> > Cr-Commit-Position: refs/heads/master@{#609119} TBR=drott@chromium.org Bug: 636993 Change-Id: I1d741fa47556c5e7bf47e3badcdcf60a81fbc22b Reviewed-on: https://chromium-review.googlesource.com/c/1343583Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#609680}
Showing
Please register or sign in to comment