[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
Thu Sep 8 09:43:26 PDT 2011


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


Ryosuke Niwa <rniwa at webkit.org> changed:

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




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

> Source/WebCore/editing/FrameSelection.cpp:821
> +        if (alter == AlterationExtend && m_selection.isCaret() && !dispatchSelectStart())

You should check that new selection is range. You can do that by using trialFrameSelection below.

> Source/WebCore/editing/FrameSelection.cpp:1896
> +    Node* selectStartTarget = m_frame->document()->getSelection()->focusNode();

This seems like an unnecessary indirection. I'd just do extent().containerNode().

> Source/WebCore/editing/FrameSelection.h:247
> +    bool dispatchSelectStart();
> +

This method should be private for now.

> LayoutTests/fast/events/selectstart-by-arrow-keys.html:11
> +if (window.layoutTestController) {
> +    layoutTestController.dumpAsText();
> +}

No curly brackets around one line statement.

> LayoutTests/fast/events/selectstart-by-arrow-keys.html:16
> +div.addEventListener('selectstart', function (event) { passed = true; });

We should probably ensure that selectstart event is fired exactly once (not twice or three times).

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