Bug 70534 - REGRESSION (r96823): Contextual menu closes immediately when control-clicking in Flash plug-in
Summary: REGRESSION (r96823): Contextual menu closes immediately when control-clicking...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-10-20 12:13 PDT by Alexey Proskuryakov
Modified: 2011-10-20 15:24 PDT (History)
1 user (show)

See Also:


Attachments
proposed fix (10.79 KB, patch)
2011-10-20 12:19 PDT, Alexey Proskuryakov
darin: review+
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
patch for landing (10.78 KB, patch)
2011-10-20 13:02 PDT, Alexey Proskuryakov
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
patch for landing (10.80 KB, patch)
2011-10-20 13:58 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2011-10-20 12:13:27 PDT
This part:
+        * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Call base
+        class default event handler, so that events on focused plug-in elements would fall through
+        to EventHandler::defaultKeyboardEventHandler.

Plug-ins show their context menus from regular mouse event handlers, because they don't get a separate event for context menu. Additionally, browsers dispatch contextmenu event regardless of whether mousedown had a preventDefault, so after Flash shows its context menu, WebKit tries to show its own, causing trouble.

The solution is to add a contextmenu event handler to plugins. Such a handler could display a menu itself, return false for default WebKit menu to be displayed, or just return true meaning that it has no idea about what the plug-in did, as it's the case with NPAPI plug-ins.

<rdar://problem/10308827>
Comment 1 Alexey Proskuryakov 2011-10-20 12:19:58 PDT
Created attachment 111825 [details]
proposed fix
Comment 2 Early Warning System Bot 2011-10-20 12:47:57 PDT
Comment on attachment 111825 [details]
proposed fix

Attachment 111825 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10178525
Comment 3 Alexey Proskuryakov 2011-10-20 13:02:06 PDT
Created attachment 111829 [details]
patch for landing
Comment 4 Early Warning System Bot 2011-10-20 13:16:18 PDT
Comment on attachment 111829 [details]
patch for landing

Attachment 111829 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10177578
Comment 5 Alexey Proskuryakov 2011-10-20 13:58:17 PDT
Created attachment 111844 [details]
patch for landing

D'oh!
Comment 6 WebKit Review Bot 2011-10-20 15:24:31 PDT
Comment on attachment 111844 [details]
patch for landing

Clearing flags on attachment: 111844

Committed r98027: <http://trac.webkit.org/changeset/98027>
Comment 7 WebKit Review Bot 2011-10-20 15:24:36 PDT
All reviewed patches have been landed.  Closing bug.