[Webkit-unassigned] [Bug 50116] On platforms other than Mac, right clicking anywhere discards the selection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 17 17:26:41 PST 2011


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


Ryosuke Niwa <rniwa at webkit.org> changed:

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




--- Comment #33 from Ryosuke Niwa <rniwa at webkit.org>  2011-02-17 17:26:40 PST ---
(From update of attachment 79267)
View in context: https://bugs.webkit.org/attachment.cgi?id=79267&action=review

> LayoutTests/editing/selection/selection-modified-on-right-click.html:1
> +<body onload="load()">

Missing <!DOCTYPE html>.  Do you really need to wait until page load?  I feel like you can just run the test in the script element?

> WebCore/ChangeLog:5
> +        https://bugs.webkit.org/show_bug.cgi?id=50116

Missing bug title.

> WebCore/page/EventHandler.cpp:404
>      } else
>          newSelection = VisibleSelection(visiblePos);
> -    
> -    if (m_frame->selection()->shouldChangeSelection(newSelection))
> +
> +    const bool shouldReplaceSelection = (m_frame->editor()->behavior().shouldDiscardCurrentSelectionOnRightClick() || event.event().button() == LeftButton);
> +    if (shouldReplaceSelection && m_frame->selection()->shouldChangeSelection(newSelection))

It seems like we should avoid setting selection only if the above else statement was executed.  i.e. we should set selection when selection is extended even if the editing behavior was Linux, and the right button is pressed.

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