diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-29 03:57:00 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-29 03:57:00 +0000 |
commit | 37885c566d752b0d19de8533eb6aab97bf6ac799 (patch) | |
tree | bb5201b50a14cc75cea5405fa8976ee3b7ab1e4b /webkit/plugins/npapi/webplugin_impl.cc | |
parent | 688eedae5279a099a2e09cd66f53ee433174ab45 (diff) | |
download | chromium_src-37885c566d752b0d19de8533eb6aab97bf6ac799.zip chromium_src-37885c566d752b0d19de8533eb6aab97bf6ac799.tar.gz chromium_src-37885c566d752b0d19de8533eb6aab97bf6ac799.tar.bz2 |
Ensure that windowed NPAPI plugins get reparented to the plugin wrapper window in the browser
during the initial geometry update. This fixes a painting bug which occurs at times with
windowed plugins when the page does not invalidate after the plugin is added.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=66626
BUG=66626
TEST=manually as described in the bug at this point.
Review URL: http://codereview.chromium.org/6271028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi/webplugin_impl.cc')
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc index e453438..14e9316 100644 --- a/webkit/plugins/npapi/webplugin_impl.cc +++ b/webkit/plugins/npapi/webplugin_impl.cc @@ -289,6 +289,13 @@ void WebPluginImpl::updateGeometry( page_delegate_ && (first_geometry_update_ || !new_geometry.Equals(geometry_))) { page_delegate_->DidMovePlugin(new_geometry); + // We invalidate windowed plugins during the first geometry update to + // ensure that they get reparented to the wrapper window in the browser. + // This ensures that they become visible and are painted by the OS. This is + // required as some pages don't invalidate when the plugin is added. + if (first_geometry_update_ && window_) { + InvalidateRect(window_rect); + } } // Only UpdateGeometry if either the window or clip rects have changed. |