summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 03:40:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 03:40:28 +0000
commit6a9e4610e6a976198963199571b1fdf1f1ac89a2 (patch)
treea538b2a37b9fd3cd88afbb9cc82a1b6621e02259 /webkit
parenta17f946fe4acf8bef67945d76931c14607e8e404 (diff)
downloadchromium_src-6a9e4610e6a976198963199571b1fdf1f1ac89a2.zip
chromium_src-6a9e4610e6a976198963199571b1fdf1f1ac89a2.tar.gz
chromium_src-6a9e4610e6a976198963199571b1fdf1f1ac89a2.tar.bz2
Fix regression from my previous change. Looks like we need to call SetWindowPos in setParent for the sake of layout tests.
TBR=ananta Bug=12993 Review URL: http://codereview.chromium.org/119344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webplugin_impl.cc11
-rw-r--r--webkit/glue/webplugin_impl.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 9ea7d52..18cf347 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -212,6 +212,17 @@ void WebPluginContainer::setParentVisible(bool visible) {
impl_->UpdateVisibility();
}
+// We override this function so that if the plugin is windowed, we can call
+// NPP_SetWindow at the first possible moment. This ensures that NPP_SetWindow
+// is called before the manual load data is sent to a plugin. If this order is
+// reversed, Flash won't load videos.
+void WebPluginContainer::setParent(WebCore::ScrollView* view) {
+ WebCore::Widget::setParent(view);
+ if (view) {
+ impl_->setFrameRect(frameRect());
+ }
+}
+
void WebPluginContainer::windowCutoutRects(const WebCore::IntRect& bounds,
WTF::Vector<WebCore::IntRect>*
cutouts) const {
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index 396c94c..223e96d 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -66,6 +66,7 @@ class WebPluginContainer : public WebCore::Widget {
virtual void handleEvent(WebCore::Event* event);
virtual void frameRectsChanged();
virtual void setParentVisible(bool visible);
+ virtual void setParent(WebCore::ScrollView* view);
#if USE(JSC)
virtual bool isPluginView() const;