[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 11:47:31 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=58294
--- Comment #7 from Xiaomei Ji <xji at chromium.org> 2011-04-14 11:47:31 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:1277
> +
it is set as "true" at line 1289. And we need this flag to avoid search word breaks in the box in dead-loop. Please note: last == true does not necessarily mean the last word break returned is null visible position.
> Source/WebCore/editing/visible_units.cpp:1368
> + int offsetOfWordBreak = 0;
Haha, I split them to make them clear and more consistent with our current function/naming convention. We mostly split such into left/right, previous/next, BoxBlockSameDirectionality/BoxBlockDifferentDirectionality in the current code style.
> Source/WebCore/editing/visible_units.cpp:1377
> + }
it will be true when the returned word break is the last in box.
>> Source/WebCore/editing/visible_units.cpp:1381
>> +static VisiblePosition visuallyLastWordBoundaryInBox(const InlineBox* box, int offset, TextDirection blockDirection)
>
> I don't think visually last is a good name. It gave me a wrong impression that it's at either edge of a box (i.e. rightmost word boundary in LTR box and leftmost word boundary in RTL box). I think visuallyPreviousWordBondaryInBox will be more appropriate.
it does return visually last word boundary in the box when offset is invalid or the word break's offset is different from the pass-in offset.
only when the visually last is the same as the pass-in offset, it needs to return the previous one.
Maybe: visuallyLastWordBoundaryInBoxDifferentFromOffset?
--
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