[Webkit-unassigned] [Bug 33435] selection.modify("move", "left", "lineboundary") in RTL text moves to the right lineboundary

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 8 16:45:13 PST 2010


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





--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org>  2010-12-08 16:45:13 PST ---
(From update of attachment 75845)
View in context: https://bugs.webkit.org/attachment.cgi?id=75845&action=review

> WebCore/editing/SelectionController.cpp:432
> +    case LineBoundary:
> +        if (directionOfEnclosingBlock() == LTR)
> +            pos = visualEndOfLine(startForPlatform());
> +        else
> +            pos = visualStartOfLine(startForPlatform());
> +        break;

We should just do:
if (directionOfEnclosingBlock() == LTR)
    return visualEndOfLine(startForPlatform());
return visualStartOfLine(startForPlatform());

and modify
pos = modifyMovingForward(granularity);
to
return modifyMovingForward(granularity);

I don't know why we have a VisiblePosition local variable in the first place.

> WebCore/editing/visible_units.cpp:1247
> +    // Current implementation takes the 1st alternative. The caret will be
> +    // displayed on the leftmost visual position for logical start of line in
> +    // LTR paragraph and on the right most visual position for the RTL paragraphs.
> +    return visualStartOfLine(c);
> +}
> +
> +VisiblePosition logicalEndOfLine(const VisiblePosition& c)
> +{
> +    // TODO: this is the current behavior that might need to be fixed.
> +    return visualEndOfLine(c);
> +}

Does this mean that logical/visual behaviors are the same, and we're not changing the behavior at all this in patch?

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