[HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2017 16:36:35 +0000 (16:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2017 16:36:35 +0000 (16:36 +0000)
commit5b7b592d39c968325d5f423664053656eee4fc8e
tree7183d4f54cd6cabd55888cae1c123210b899e6bf
parent6136f099441b7a752f4e487a3be55edbe76edc26
[HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
https://bugs.webkit.org/show_bug.cgi?id=174418

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-08-16
Reviewed by Michael Catanzaro.

Source/WebCore:

HarfBuzzShaper should normalize the input text before collecting
HarfBuzzRuns. Actually, HarfBuzzShaper::setNormalizedBuffer does
the task. But, this function hasn't been called from anywhere
since Bug 90951.

Test: fast/text/international/vietnamese-nfd.html
      imported/blink/fast/text/international/text-shaping-arabic-diffs.html

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
Call setNormalizedBuffer instead of normalizeCharacters.
(WebCore::normalizeCharacters): Deleted.
(WebCore::normalizeSpacesAndMirrorChars) Use
FontCascade::treatAsZeroWidthSpaceInComplexScript instead of
FontCascade::treatAsZeroWidthSpace to preserve ZWJ and ZWNJ.

LayoutTests:

* fast/text/international/vietnamese-nfd-expected.html: Added.
* fast/text/international/vietnamese-nfd.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/international/vietnamese-nfd-expected.html [new file with mode: 0644]
LayoutTests/fast/text/international/vietnamese-nfd.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp