[HarfBuzz] ComplexTextRun should initialize direction from the harfbuzz buffer
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2017 06:03:35 +0000 (06:03 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Oct 2017 06:03:35 +0000 (06:03 +0000)
commitd3a2e308e03c89643fa376fcef995654d77bb1cf
treeb3b5004f50559b865459a93edf29c2ab6ed93a49
parenta42804fd7a6606486901cc9b0941ffc4485d611c
[HarfBuzz] ComplexTextRun should initialize direction from the harfbuzz buffer
https://bugs.webkit.org/show_bug.cgi?id=178788

Reviewed by Michael Catanzaro.

Instead of using the TextRun direction. If the TextRun is ltr, but the harfbuzz buffer is rtl, the character
indexes will be swapped in m_coreTextIndices.

* platform/graphics/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create): Remove the ltr parameter.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Initialize m_isLTR using hb_buffer_get_direction().
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Do not pass ltr to ComplexTextRun::create().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ComplexTextController.h
Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp