Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Issue 12626: Ensure that the context menu shows up in a windowless Silverlight plugin... (Closed)

Created:
12 years, 1 month ago by ananta
Modified:
9 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Ensure that the context menu shows up in a windowless Silverlight plugin instance. This fixes bug http://code.google.com/p/chromium/issues/detail?id=4691 The windowless instance of the Silverlight plugin calls the WindowFromPoint API and passes the window handle returned as the owner window in the TrackPopupMenu API call. The TrackPopupMenu API fails if the owner window does not live on the same thread as the caller. It works in the other browsers as the window where the windowless plugin is embedded is in the same thread. The fix is to add a quirk specific for the TrackPopupMenu issue, IAT patch the Silverlight plugin and pass in the handle to the dummy activation window as the owner. The other fix made is to have a focus window for the duration of the WM_RBUTTONDOWN/WM_RBUTTONUP sequence. This ensures that keyboard navigation works in the context menu displayed by the Silverlight plugin. Bug=4691 R=jam Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=6029

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -3 lines) Patch
M webkit/glue/plugins/webplugin_delegate_impl.h View 1 2 3 chunks +17 lines, -0 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl.cc View 1 2 6 chunks +44 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ananta
12 years, 1 month ago (2008-11-25 02:36:04 UTC) #1
jam
lgtm, great http://codereview.chromium.org/12626/diff/1/2 File webkit/glue/plugins/webplugin_delegate_impl.cc (right): http://codereview.chromium.org/12626/diff/1/2#newcode255 Line 255: // The Windowless version of the ...
12 years ago (2008-11-26 01:13:17 UTC) #2
ananta
12 years ago (2008-11-26 01:26:29 UTC) #3
Replies below:-

On 2008/11/26 01:13:17, John Abd-El-Malek wrote:
> lgtm, great
> 
> http://codereview.chromium.org/12626/diff/1/2
> File webkit/glue/plugins/webplugin_delegate_impl.cc (right):
> 
> http://codereview.chromium.org/12626/diff/1/2#newcode255
> Line 255: // The Windowless version of the Silverlight plugin calls the
> nit: windowless should be all lowercase

Done

> http://codereview.chromium.org/12626/diff/1/2#newcode256
> Line 256: // WindowFromPoint API and passes the result of that to the
> just curious: can't we create a random HWND in the plugin process and pass it
as
> the owner, if they don't use it for anything else?

We could do that just for the duration of the TrackPopupMenu call. We already
have a dummy activation window for the current windowless instance, which is why
I ended up using it.

> 
> http://codereview.chromium.org/12626/diff/1/2#newcode264
> Line 264: (quirks_ & PLUGIN_QUIRK_PATCH_TRACKPOPUP_MENU)) {
> nit: i believe you need an extra space here)

Done.

Thanks
Ananta

Powered by Google App Engine
This is Rietveld 408576698