summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/webplugin_delegate_impl_gtk.cc')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_gtk.cc24
1 files changed, 3 insertions, 21 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index 776f613..bf8b141 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -41,7 +41,6 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
NPAPI::PluginInstance *instance)
: windowed_handle_(0),
windowed_did_set_window_(false),
- windowless_needs_set_window_(true),
windowless_(false),
plugin_(NULL),
instance_(instance),
@@ -229,18 +228,9 @@ void WebPluginDelegateImpl::WindowlessUpdateGeometry(
if (window_rect == window_rect_ && clip_rect == clip_rect_)
return;
- // Set this flag before entering the instance in case of side-effects.
- windowless_needs_set_window_ = true;
-
- // We will inform the instance of this change when we call NPP_SetWindow.
clip_rect_ = clip_rect;
- cutout_rects_.clear();
-
- if (window_rect_ != window_rect) {
- window_rect_ = window_rect;
-
- WindowlessSetWindow(true);
- }
+ window_rect_ = window_rect;
+ WindowlessSetWindow();
}
void WebPluginDelegateImpl::EnsurePixmapAtLeastSize(int width, int height) {
@@ -295,11 +285,6 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context,
// TODO(darin): we should avoid calling NPP_SetWindow here since it may
// cause page layout to be invalidated.
- // We really don't need to continually call SetWindow.
- // m_needsSetWindow flags when the geometry has changed.
- if (windowless_needs_set_window_)
- WindowlessSetWindow(false);
-
// The actual dirty region is just the intersection of the plugin window and
// the clip window with the damage region. However, the plugin wants to draw
// relative to the containing window's origin, so our pixmap must be from the
@@ -452,7 +437,7 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context,
cairo_restore(context);
}
-void WebPluginDelegateImpl::WindowlessSetWindow(bool force_set_window) {
+void WebPluginDelegateImpl::WindowlessSetWindow() {
if (!instance())
return;
@@ -485,9 +470,6 @@ void WebPluginDelegateImpl::WindowlessSetWindow(bool force_set_window) {
extra->depth = DefaultDepth(GDK_DISPLAY(), 0);
extra->colormap = DefaultColormap(GDK_DISPLAY(), 0);
- if (!force_set_window)
- windowless_needs_set_window_ = false;
-
NPError err = instance()->NPP_SetWindow(&window_);
DCHECK(err == NPERR_NO_ERROR);
if (quirks_ & PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW) {