[Webkit-unassigned] [Bug 57806] continue experiment with moving caret by word in visual order

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 7 10:16:29 PDT 2011


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





--- Comment #18 from Ryosuke Niwa <rniwa at webkit.org>  2011-04-07 10:16:29 PST ---
(From update of attachment 88654)
View in context: https://bugs.webkit.org/attachment.cgi?id=88654&action=review

> Source/WebCore/editing/visible_units.cpp:1195
> +        InlineBox* lastRTLLeaf;
> +        do {
> +            lastRTLLeaf = nextLeaf;
> +            nextLeaf = nextLeaf->nextLeafChild();
> +        } while (nextLeaf && !nextLeaf->isLeftToRightDirection());
> +        return Position(lastRTLLeaf->renderer()->node(), lastRTLLeaf->caretMinOffset(), Position::PositionIsOffsetInAnchor);

I see you fixed this code per my comment. Could you add a test case as well?

> Source/WebCore/editing/visible_units.cpp:1300
> +        : visiblePosition(VisiblePosition())

I don't think you need to explicitly call VisiblePosition() like this.

> Source/WebCore/editing/visible_units.cpp:1307
> +    : visiblePosition(position)
> +    , offset(offset) 

Please indent these.

> Source/WebCore/editing/visible_units.cpp:1312
> +    int offset; // offset returned from visiblePosition.getInlineBoxAndOffset() and is used in comparison to find the visually closest word break.

Please rename offset to something more explicit and remove the comment.

-- 
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