summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 23:54:03 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 23:54:03 +0000
commitbde5f237ca7527195df2866f5b0a5893b7a182dc (patch)
tree9227a3012b410906508e64c3e8da2da70e68b237 /webkit
parent3cdb6ccdf63f89eab14261534c895c9a25b0e6ea (diff)
downloadchromium_src-bde5f237ca7527195df2866f5b0a5893b7a182dc.zip
chromium_src-bde5f237ca7527195df2866f5b0a5893b7a182dc.tar.gz
chromium_src-bde5f237ca7527195df2866f5b0a5893b7a182dc.tar.bz2
We allow Flash to popup windows in response to user gesture messages like WM_LBUTTONUP, etc. However
we need to reset the popup stack in a timer, as Flash typically brings up these windows in a posted 0x401 message. This is on the same lines as the webkit plugin implementation. This fixes http://code.google.com/p/chromium/issues/detail?id=7850 Bug=7850 Review URL: http://codereview.chromium.org/29004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index 1c990d6..4163b50 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -43,6 +43,12 @@ const wchar_t kPluginFlashThrottle[] = L"FlashThrottle";
// this seems to work well enough.
const int kFlashWMUSERMessageThrottleDelayMs = 5;
+// Flash displays popups in response to user clicks by posting a WM_USER
+// message to the plugin window. The handler for this message displays
+// the popup. To ensure that the popups allowed state is sent correctly
+// to the renderer we reset the popups allowed state in a timer.
+const int kWindowedPluginPopupTimerMs = 50;
+
// The current instance of the plugin which entered the modal loop.
WebPluginDelegateImpl* g_current_plugin_instance = NULL;
@@ -884,9 +890,10 @@ LRESULT CALLBACK WebPluginDelegateImpl::NativeWndProc(
delegate->instance()->PushPopupsEnabledState(true);
- MessageLoop::current()->PostTask(FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
delegate->user_gesture_msg_factory_.NewRunnableMethod(
- &WebPluginDelegateImpl::OnUserGestureEnd));
+ &WebPluginDelegateImpl::OnUserGestureEnd),
+ kWindowedPluginPopupTimerMs);
}
LRESULT result = CallWindowProc(delegate->plugin_wnd_proc_, hwnd, message,