A composition underline is placed to wrong position in RTL
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jun 2016 23:23:16 +0000 (23:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jun 2016 23:23:16 +0000 (23:23 +0000)
commit70d3183a013e71c999f5c6b1e2406231efdca261
treed99bd9ed9a26c65850675852bcac05783e955896
parent587a5afc7cf527e1cd2b9c785cce0ac4b49fa3ee
A composition underline is placed to wrong position in RTL
https://bugs.webkit.org/show_bug.cgi?id=158602

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-06-20
Reviewed by Myles C. Maxfield.

Source/WebCore:

InlineTextBox::paintCompositionUnderline does not take RTL into
account.  The position of composition underline should be
mirrored in RTL.

Test: editing/input/composition-underline-rtl.html

* rendering/InlineTextBox.cpp:
(WebCore::mirrorRTLSegment): New helper function to convert RTL start position to LTR.
(WebCore::InlineTextBox::paintDecoration): Use mirrorRTLSegment.
(WebCore::InlineTextBox::paintCompositionUnderline): Ditto.

LayoutTests:

* editing/input/composition-underline-rtl-expected.html: Added.
* editing/input/composition-underline-rtl.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/input/composition-underline-rtl-expected.html [new file with mode: 0644]
LayoutTests/editing/input/composition-underline-rtl.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineTextBox.cpp