[Webkit-unassigned] [Bug 38087] Clicking below last line of right-to-left editable text that puts caret in the wrong place

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 30 06:34:28 PDT 2011


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





--- Comment #12 from Ryosuke Niwa <rniwa at webkit.org>  2011-03-30 06:34:28 PST ---
(From update of attachment 87518)
View in context: https://bugs.webkit.org/attachment.cgi?id=87518&action=review

> Source/WebCore/rendering/RenderBlock.cpp:4157
>          // We hit this case for Mac behavior when the Y coordinate is below the last box.

So this bug only reproduces on Mac?

> Source/WebCore/rendering/RenderBlock.cpp:4161
> +        Node* endNode = lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox);
> +        if (endNode)

We should declare endNode inside the if as in:
if (Node* endNode = lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox))

> Source/WebCore/rendering/RootInlineBox.cpp:798
> +        startNode = startBox->renderer()->node();
> +        if (startNode)
> +            return startNode;

We should do
if (leafBoxesInLogicalOrder[i]->renderer()->node()) {
    startBox = leafBoxesInLogicalOrder[i];
    return startBox->renderer()->node();
}
so that you don't have to assign startBox every iteration.  It also eliminates the need for startNode local variable.

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