[Harfbuzz] Wrong offset returned by HarfBuzzShaper::offsetForPosition() when target...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 15:37:44 +0000 (15:37 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2017 15:37:44 +0000 (15:37 +0000)
commit38c5b9d1240720c5abeabd0c0c6f5a5a3ea8b0eb
treecbcca6289d8a4bc8e2d71205ba24860d6c979f32
parent17013004e562e5b81af41e237944cbc129b1401d
[Harfbuzz] Wrong offset returned by HarfBuzzShaper::offsetForPosition() when target point is at the middle of a character
https://bugs.webkit.org/show_bug.cgi?id=176897

Reviewed by Michael Catanzaro.

We should include the character when the point is greater than the center of the character.

Fixes: fast/multicol/hit-test-end-of-column-with-line-height.html
       fast/multicol/newmulticol/compare-with-old-impl/hit-test-end-of-column-with-line-height.html

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):

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