Bug 58921

Summary: [chromium] linux chromium doesn't set click count for mouse up events in WebInputEventFactory.cpp.
Product: WebKit Reporter: yzshen
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: avi, commit-queue, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Set click count for mouse up events, using similar algorithm as win implementation.
none
Revise the ChangeLog none

yzshen
Reported 2011-04-19 13:11:30 PDT
WebKit/chromium/src/gtk/WebInputEventFactory.cpp doesn't set clickCount for mouse up events. We probably want to have similar behavior as the win implementation.
Attachments
Set click count for mouse up events, using similar algorithm as win implementation. (7.45 KB, patch)
2011-04-19 14:05 PDT, yzshen
no flags
Revise the ChangeLog (7.62 KB, patch)
2011-04-19 14:42 PDT, yzshen
no flags
yzshen
Comment 1 2011-04-19 13:12:00 PDT
I will upload a patch soon.
yzshen
Comment 2 2011-04-19 14:05:20 PDT
Created attachment 90248 [details] Set click count for mouse up events, using similar algorithm as win implementation.
yzshen
Comment 3 2011-04-19 14:26:23 PDT
The reason why we need such a fix is that the Pepper API passes this information to plugins, and some consumers (e.g., Flash) need it to detect double-clicks.
Tony Chang
Comment 4 2011-04-19 14:33:58 PDT
Comment on attachment 90248 [details] Set click count for mouse up events, using similar algorithm as win implementation. View in context: https://bugs.webkit.org/attachment.cgi?id=90248&action=review > Source/WebKit/chromium/ChangeLog:6 > + [chromium] linux chromium doesn't set click count for mouse up events. > + https://bugs.webkit.org/show_bug.cgi?id=58921 Please explain what this is breaking (ppapi, flash, whatever). > Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp:492 > + if (shouldForgetPreviousClick(event->window, event->time, event->x, event->y)) > + resetClickCountState(); Why do we need to reset here?
yzshen
Comment 5 2011-04-19 14:42:52 PDT
Created attachment 90256 [details] Revise the ChangeLog
yzshen
Comment 6 2011-04-19 14:44:08 PDT
Comment on attachment 90248 [details] Set click count for mouse up events, using similar algorithm as win implementation. View in context: https://bugs.webkit.org/attachment.cgi?id=90248&action=review >> Source/WebKit/chromium/ChangeLog:6 >> + https://bugs.webkit.org/show_bug.cgi?id=58921 > > Please explain what this is breaking (ppapi, flash, whatever). Done. >> Source/WebKit/chromium/src/gtk/WebInputEventFactory.cpp:492 >> + resetClickCountState(); > > Why do we need to reset here? I am not sure whether this is very reasonable, but I tried to follow the behavior of the win implementation.
Tony Chang
Comment 7 2011-04-19 14:55:28 PDT
Comment on attachment 90256 [details] Revise the ChangeLog I think this patch is correct, but it would be nice to add a layout test for this. The benefit of a layout test is that it would ensure that we get consistent results across platforms. Specifically, you can use window.eventSender.leapForward and mouseDown/Up to simulate mouse events. You might need to add eventSender.clickCount() for this. This could be a follow up patch.
Tony Chang
Comment 8 2011-04-19 14:57:30 PDT
(+avi since I think he touched this code a bunch in the past)
yzshen
Comment 9 2011-04-19 15:00:06 PDT
Hi, Tony. Thanks for your review! I will work on a layout test in a follow up patch. Do you mean I should wait for avi's feedback before committing the patch?
Tony Chang
Comment 10 2011-04-19 15:01:33 PDT
(In reply to comment #9) > Do you mean I should wait for avi's feedback before committing the patch? I think it's fine to commit now. We can revert if avi has additional feedback. Please make sure the layout tests pass before committing. Thanks!
Avi Drissman
Comment 11 2011-04-19 16:05:29 PDT
(In reply to comment #9) > Do you mean I should wait for avi's feedback before committing the patch? The change looks good to me.
yzshen
Comment 12 2011-04-20 12:30:58 PDT
Hi, Tony. Would you please help to get this patch committed? Thanks!
WebKit Commit Bot
Comment 13 2011-04-20 15:33:02 PDT
Comment on attachment 90256 [details] Revise the ChangeLog Clearing flags on attachment: 90256 Committed r84427: <http://trac.webkit.org/changeset/84427>
WebKit Commit Bot
Comment 14 2011-04-20 15:33:08 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.