summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-27 01:23:33 +0000
committerlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-27 01:23:33 +0000
commit3daa1f47b00f524723574e8cbb343aef4604ed43 (patch)
treedfd616b868516983fa40ca860e4755477c38cab7 /webkit
parente07808b15aafcab441f47248780c4c4d3dfa3ebb (diff)
downloadchromium_src-3daa1f47b00f524723574e8cbb343aef4604ed43.zip
chromium_src-3daa1f47b00f524723574e8cbb343aef4604ed43.tar.gz
chromium_src-3daa1f47b00f524723574e8cbb343aef4604ed43.tar.bz2
This likely broke the nacl_integration test, so reverting.
Revert 98511 - Don't send DidChangeView to the plugin unless the parameters have actually changed. Apparently WebKit sends the update for every layout, even if nothing has changed. Review URL: http://codereview.chromium.org/7761005 TBR=brettw@google.com Review URL: http://codereview.chromium.org/7762014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc27
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.h5
2 files changed, 11 insertions, 21 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 7e2432c..c353ed8 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -217,7 +217,6 @@ PluginInstance::PluginInstance(
pp_instance_(0),
container_(NULL),
full_frame_(false),
- sent_did_change_view_(false),
has_webkit_focus_(false),
has_content_area_focus_(false),
find_identifier_(-1),
@@ -506,22 +505,18 @@ PP_Var PluginInstance::GetInstanceObject() {
void PluginInstance::ViewChanged(const gfx::Rect& position,
const gfx::Rect& clip) {
- // WebKit can give weird (x,y) positions for empty clip rects (since the
- // position technically doesn't matter). But we want to make these
- // consistent since this is given to the plugin, so force everything to 0
- // in the "everything is clipped" case.
- gfx::Rect new_clip;
- if (!clip.IsEmpty())
- new_clip = clip;
-
- // Don't notify the plugin if we've already sent these same params before.
- if (sent_did_change_view_ && position == position_ && new_clip == clip_)
- return;
-
- sent_did_change_view_ = true;
- position_ = position;
- clip_ = new_clip;
fullscreen_ = (fullscreen_container_ != NULL);
+ position_ = position;
+
+ if (clip.IsEmpty()) {
+ // WebKit can give weird (x,y) positions for empty clip rects (since the
+ // position technically doesn't matter). But we want to make these
+ // consistent since this is given to the plugin, so force everything to 0
+ // in the "everything is clipped" case.
+ clip_ = gfx::Rect();
+ } else {
+ clip_ = clip;
+ }
PP_Rect pp_position, pp_clip;
RectToPPRect(position_, &pp_position);
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index abb7ce8..16c7fff 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -361,11 +361,6 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
// an entire document rather than an embed tag.
bool full_frame_;
- // Indicates if we've ever sent a didChangeView to the plugin. This ensure we
- // always send an initial notification, even if the position and clip are the
- // same as the default values.
- bool sent_did_change_view_;
-
// Position in the viewport (which moves as the page is scrolled) of this
// plugin. This will be a 0-sized rectangle if the plugin has not yet been
// laid out.