[Webkit-unassigned] [Bug 158602] A composition underline is placed to wrong position in RTL

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 12 22:48:47 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158602

--- Comment #10 from Fujii Hironori <Hironori.Fujii at sony.com> ---
zalan,

Thanks for your review.

(In reply to comment #9)
> > Source/WebCore/rendering/InlineTextBox.cpp:938
> > +        if (!isLeftToRightDirection())
> > +            start = m_logicalWidth - width - start;
> 
> Do you mind making a helper function for this as now this logic is both at
> InlineTextBox::paintDecoration and here? (and maybe it's even missing from
> some of the other painting methods)

It has a similar logic.
But, it seems difficult to simplify these codes.
Could you tell me a code you think of.

> There is this 'start += 1;' a few lines below, does it work fine with RTL?

No problem.
Because this code shortens the underline by 1px each from both sides.

> // We need to have some space between underlines of subsequent clauses, because some input methods do not use different underline styles for those.
> // We make each line shorter, which has a harmless side effect of shortening the first and last clauses, too.
> start += 1;
> width -= 2;

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160613/6d0c37d1/attachment.html>


More information about the webkit-unassigned mailing list