Bug 64666

Summary: [GTK] Fix selection of elements in a multi select list and remove an unnecessary include in WorkQueue
Product: WebKit Reporter: Amruth Raj <amruthraj>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, mrobinson, ravi.kasibhatla, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Enable multiple items selection in a multi select list
none
Enable multiple items selection in a multi select list
none
Enable multiple items selection in a multi select list none

Description Amruth Raj 2011-07-17 00:23:14 PDT
Selecting multiple elements in a multi select list isn't working.
Comment 1 Amruth Raj 2011-07-17 00:38:08 PDT
Created attachment 101112 [details]
Enable multiple items selection in a multi select list
Comment 2 Martin Robinson 2011-07-17 10:29:14 PDT
Comment on attachment 101112 [details]
Enable multiple items selection in a multi select list

View in context: https://bugs.webkit.org/attachment.cgi?id=101112&action=review

> Source/WebKit2/Shared/gtk/WebEventFactory.cpp:54
> +    bool isStatePresent = gdk_event_get_state(event, &state);
> +    if (!isStatePresent)

Might as well compress this into one line:

if (!gdk_event_get_state(event, &state))

or is there a reason why that isn't a good idea?
Comment 3 Martin Robinson 2011-07-17 10:31:32 PDT

*** This bug has been marked as a duplicate of bug 63081 ***
Comment 4 Amruth Raj 2011-07-17 21:59:11 PDT
The bug here is that the modifier key information like ctrl/alt is not being sent during mouse clicks. Hence, when ctrl-click is done to select multiple items, it fails. This is not a dup of 63081.
I will address your comment and upload a new patch. I wanted to capture why gdk_event_get_state may return false and hence I kept a variable indicating it. I will instead put it as a comment.
Comment 5 Amruth Raj 2011-07-17 22:09:18 PDT
Created attachment 101125 [details]
Enable multiple items selection in a multi select list
Comment 6 Amruth Raj 2011-07-17 22:14:09 PDT
Created attachment 101126 [details]
Enable multiple items selection in a multi select list
Comment 7 Martin Robinson 2011-07-17 22:33:53 PDT
(In reply to comment #4)
> The bug here is that the modifier key information like ctrl/alt is not being sent during mouse clicks. Hence, when ctrl-click is done to select multiple items, it fails. This is not a dup of 63081.
> I will address your comment and upload a new patch. I wanted to capture why gdk_event_get_state may return false and hence I kept a variable indicating it. I will instead put it as a comment.

Please accept my apologies. I meant to mark 64667 as a duplicate, not this bug!
Comment 8 WebKit Review Bot 2011-07-17 23:30:43 PDT
Comment on attachment 101126 [details]
Enable multiple items selection in a multi select list

Clearing flags on attachment: 101126

Committed r91173: <http://trac.webkit.org/changeset/91173>
Comment 9 WebKit Review Bot 2011-07-17 23:30:47 PDT
All reviewed patches have been landed.  Closing bug.