[Webkit-unassigned] [Bug 60430] selectstart is not fired when selection was created by arrow keys

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 7 03:40:11 PDT 2011


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


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #106564|review?                     |review-
               Flag|                            |




--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org>  2011-09-07 03:40:11 PST ---
(From update of attachment 106564)
View in context: https://bugs.webkit.org/attachment.cgi?id=106564&action=review

> Source/WebCore/editing/FrameSelection.cpp:886
> +        if (oldSelection.isCaret()) {
> +            if (!(dispatchedSelectStart = dispatchSelectStart()))
> +                break;
> +        }

This is too late. m_selection.m_isDirectional has already been modified at this point. r- because of this. You should probably do this in the if-statement at the beginning of this function.

> Source/WebCore/editing/FrameSelection.cpp:1923
> +    if (isContentEditable()) {
> +        root = highestEditableRoot(m_selection.start());
> +        if (Node* shadowRoot = m_selection.nonBoundaryShadowTreeRootNode())
> +            selectStartTarget = shadowRoot->shadowAncestorNode();
> +        else
> +            selectStartTarget = root.get();
> +    } else {
> +        root = m_selection.nonBoundaryShadowTreeRootNode();
> +        if (root)
> +            selectStartTarget = root->shadowAncestorNode();
> +        else {
> +            root = document->documentElement();
> +            selectStartTarget = document->body();
> +        }
> +    }
> +    if (!root || !selectStartTarget)
> +        return true;

Why do we need all this code?

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