My favorites | Sign in
Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 4691: The context menu does not show up in a windowless Silverlight plugin
1 person starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  ananta@chromium.org
Closed:  Nov 2008
Cc:  darin@chromium.org, jam@chromium.org
Type-Bug
Pri-2
OS-All
Area-Misc


Sign in to add a comment
 
Reported by ananta@chromium.org, Nov 21, 2008
What steps will reproduce the problem?
1. Launch Chromium and navigate to www.microsoft.com
2. In the Silverlight plugin instance on the page, right click.

What is the expected output? What do you see instead?
We expect to see the context menu show up. Instead nothing happens.

The context menu does show up in Firefox 3.0.



Comment 1 by ananta@chromium.org, Nov 21, 2008
This only happens in the Windowless instance of Silverlight. The Silverlight plugin 
puts up the context menu by invoking the TrackPopupMenu API. This API expects a 
window handle to which notification messages are sent. The window handle has to be 
owned by the calling thread.

Silverlight calls the WindowFromPoint API and passes in the window handle returned by 
this API to TrackPopupMenu. This causes the TrackPopupMenu API to fail as the window 
handle is that of the RenderWidgetHostHWND, which lives in the browser process.

A possible fix may be to add a quirk for Silverlight, and intercept its call to 
TrackPopupMenu in the windowless case. We could replace the window handle passed in 
with our dummy activation window.



Cc: da...@chromium.org j...@chromium.org
Comment 2 by ananta@chromium.org, Nov 25, 2008
New Revision: 6029

Log:
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

Review URL: http://codereview.chromium.org/12626


Status: Fixed
Comment 3 by venkataramana@chromium.org, Dec 03, 2008
Verified in the build: 0.4.154.31(r6264)
Status: Verified
Sign in to add a comment

Powered by Google Project Hosting