Bug 85919

Summary: [chromium] Trigger context menu for long press gesture
Product: WebKit Reporter: Varun Jain <varunjain>
Component: New BugsAssignee: Varun Jain <varunjain>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Varun Jain 2012-05-08 14:59:49 PDT
[chromium] Trigger context menu for long press gesture
Comment 1 Varun Jain 2012-05-08 15:02:13 PDT
Created attachment 140792 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-05-08 15:09:21 PDT
Comment on attachment 140792 [details]
Patch

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

How do we test this?

> Source/WebCore/page/EventHandler.cpp:2603
> +#if OS(WINDOWS)

Why is the Win difference needed here?
Comment 3 Adam Barth 2012-05-08 16:44:47 PDT
Comment on attachment 140792 [details]
Patch

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

>> Source/WebCore/page/EventHandler.cpp:2603
>> +#if OS(WINDOWS)
> 
> Why is the Win difference needed here?

I'm not sure this is the right place to put this code, but I suspect that the difference is that there's a difference in when to show context menus on mac and windows.  I think mac shows the context menu on mouse down and windows shows them on mouse up.  I imagine this is analogous.
Comment 4 Varun Jain 2012-05-09 10:45:12 PDT
Created attachment 140975 [details]
Patch
Comment 5 Varun Jain 2012-05-09 10:48:20 PDT
(In reply to comment #2)
> (From update of attachment 140792 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=140792&action=review
> 
> How do we test this?

Added layout test

> 
> > Source/WebCore/page/EventHandler.cpp:2603
> > +#if OS(WINDOWS)
> 
> Why is the Win difference needed here?

Adam answered this part. Thanks Adam!
Regarding Adam's concern about the placement of this code, I think this is in line with EventHandler::sendContextMenuEventForKey()
Another motivation to put this in EventHandler is that other platforms can call this to show context menu on different gestures.
Comment 6 Varun Jain 2012-05-10 10:13:46 PDT
ping... eric, abarth: I have addressed all comments. Please take another look.

(In reply to comment #5)
> (In reply to comment #2)
> > (From update of attachment 140792 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=140792&action=review
> > 
> > How do we test this?
> 
> Added layout test
> 
> > 
> > > Source/WebCore/page/EventHandler.cpp:2603
> > > +#if OS(WINDOWS)
> > 
> > Why is the Win difference needed here?
> 
> Adam answered this part. Thanks Adam!
> Regarding Adam's concern about the placement of this code, I think this is in line with EventHandler::sendContextMenuEventForKey()
> Another motivation to put this in EventHandler is that other platforms can call this to show context menu on different gestures.
Comment 7 Adam Barth 2012-05-10 11:01:54 PDT
Comment on attachment 140975 [details]
Patch

This looks good.  Thanks.
Comment 8 WebKit Review Bot 2012-05-10 11:42:11 PDT
Comment on attachment 140975 [details]
Patch

Clearing flags on attachment: 140975

Committed r116671: <http://trac.webkit.org/changeset/116671>
Comment 9 WebKit Review Bot 2012-05-10 11:42:16 PDT
All reviewed patches have been landed.  Closing bug.