diff options
author | iyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 00:37:50 +0000 |
---|---|---|
committer | iyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 00:37:50 +0000 |
commit | 3deb65daf866945e0a5e211897e0d5382f3c272b (patch) | |
tree | 980e079ed33e734f6158d6d82ec0c41022e30372 /webkit | |
parent | 484fce46af7b7521b1bea54ab9e50ed2f60dd97a (diff) | |
download | chromium_src-3deb65daf866945e0a5e211897e0d5382f3c272b.zip chromium_src-3deb65daf866945e0a5e211897e0d5382f3c272b.tar.gz chromium_src-3deb65daf866945e0a5e211897e0d5382f3c272b.tar.bz2 |
This fixes http://code.google.com/p/chromium/issues/detail?id=2803, which
was an issue with windowless flash videos not playing if there were more
than 15 instances of flash on the page. The bug occurs because we pass
in the HDC of the parent window in the update geometry sequence. The webkit
plugin implementation does not do this and only passes the hdc in Paint.
The fix is to mimic this behavior.
Bug=2803
R=jam
Review URL: http://codereview.chromium.org/6024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc index 2386c44..29c69a87 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl.cc @@ -255,11 +255,7 @@ void WebPluginDelegateImpl::UpdateGeometry(const gfx::Rect& window_rect, const gfx::Rect& clip_rect, bool visible) { if (windowless_) { - window_.window = - reinterpret_cast<void *>(::GetDC(instance_->window_handle())); WindowlessUpdateGeometry(window_rect, clip_rect); - ::ReleaseDC(instance_->window_handle(), - reinterpret_cast<HDC>(window_.window)); } else { WindowedUpdateGeometry(window_rect, clip_rect, visible); } @@ -831,8 +827,12 @@ void WebPluginDelegateImpl::WindowlessPaint(HDC hdc, damage_rect_win.right = damage_rect_win.left + damage_rect.width(); damage_rect_win.bottom = damage_rect_win.top + damage_rect.height(); - window_.window = (void*)hdc; + // We need to pass the HDC to the plugin via NPP_SetWindow in the + // first paint to ensure that it initiates rect invalidations. + if (window_.window == NULL) + windowless_needs_set_window_ = true; + window_.window = hdc; // TODO(darin): we should avoid calling NPP_SetWindow here since it may // cause page layout to be invalidated. @@ -1067,4 +1067,3 @@ void WebPluginDelegateImpl::OnUserGestureEnd() { user_gesture_message_posted_ = false; instance()->PopPopupsEnabledState(); } - |