[Webkit-unassigned] [Bug 70496] Cannot select multiple options by mouse dragging in <select multiple="multiple" size="7"> list

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 10 00:26:23 PST 2011


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





--- Comment #5 from Rakesh <rakesh.kn at motorola.com>  2011-11-10 00:26:23 PST ---
(In reply to comment #3)
> (From update of attachment 114266 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114266&action=review

Thanks for reviewing the patch.
> 
> > Source/WebCore/html/HTMLSelectElement.cpp:1208
> > +    } else if (event->type() == eventNames().mousemoveEvent && event->isMouseEvent()
> > +                  && static_cast<MouseEvent*>(event)->button() == LeftButton && static_cast<MouseEvent*>(event)->buttonDown()
> > +                  && !static_cast<MouseEvent*>(event)->ctrlKey() && !toRenderBox(renderer())->canBeScrolledAndHasScrollableArea()) {
> 
> * The indentation looks wrong for folded lines. You don't need to fold a long lines.
> 
> * You don't need to check these conditions in one 'if' statement. You can write:
> 
> } else if (event->type() == evnetNames().mousemoveEvent && event->isMouseEvent()) {
>     MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
>     If (mouseEvent->button() != LeftButton || !mouseEvent->buttonDown())
>         return;
>     ....
> 

Made these changes.

> * Checking only ctrlKey() is wrong. It should be metaKey() in Mac.  Please refeer to mousedown handling in this function.
> 

Yes, now I have removed the ctrl/meta key case to match the selection behaviour similar to 71128 case instead of rejecting the selection if ctrl/meta is pressed.

> * Do we need to check !canBeScrolledAndHasScrollableArea()?
> 
Without this check autoscroll will not happen as mouse move event get handled here.

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