[Webkit-unassigned] [Bug 58294] continue (3rd) experiment with moving caret by word in visual order

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 14 12:35:17 PDT 2011


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





--- Comment #10 from Xiaomei Ji <xji at chromium.org>  2011-04-14 12:35:17 PST ---
(From update of attachment 89513)
View in context: https://bugs.webkit.org/attachment.cgi?id=89513&action=review

>>> Source/WebCore/editing/visible_units.cpp:1386
>>> +        if (offset == invalidOffset || orderedWordBoundaries[orderedWordBoundaries.size() - 1].offsetInInlineBox != offset)
>> 
>> It seems like it's redundant to check against invalidOffset since offsetInInlineBox should never be invalidOffset.
> 
> It seems like it's redundant to check against invalidOffset since offsetInInlineBox should never be invalidOffset.

the check is done only when offset is valid. it returns the last word boundary when offset is invalid (which means the one we returned wont be same as the input caret position) or when the offset is valid but it is not equal to the last word position.

> Source/WebCore/editing/visible_units.cpp:1443
>          if (wordBreak.isNotNull())

When block's direction is RTL, the word boundary are collected from left to right visually. The function looks for left word boundary of the current word, it actually looks for the right-most word boundary of a previous box (or the right-most word boundary of the current box assuming that it is not the same as the word itself).  visually last word boundary in RTL block is the right-most word boundary we are looking for.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list