summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-27 22:33:01 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-27 22:33:01 +0000
commit43d8684dcd47aeb40b81d903ce4c681627c89bfc (patch)
tree8f86215f2f35e5a17c04de14542adb9e6e3f730f /webkit/glue
parent6f681a41c70030593dc14640920d8447ef9389f2 (diff)
downloadchromium_src-43d8684dcd47aeb40b81d903ce4c681627c89bfc.zip
chromium_src-43d8684dcd47aeb40b81d903ce4c681627c89bfc.tar.gz
chromium_src-43d8684dcd47aeb40b81d903ce4c681627c89bfc.tar.bz2
Adobe Reader 7 expects the load_manually flag to be set when being instantiated. This only causes an issue when we reinitialize the plugin when we receive a HTTP 200 response for a byte range request.
We were setting the load_manually flag to false as we would be handing off the data to the plugin. However Reader 7 puts up a message box in its NPP_New call indicating that the operation failed. It then returns an error which causes the renderer to crash as we dereference a NULL plugin delegate pointer. We also force an invalidate when the plugin is reinitialized as the page does not paint at times. The other fix is to pass down the plugin mime type correctly to WebPluginImpl. This fixes http://code.google.com/p/chromium/issues/detail?id=6318 Bug=6318 Review URL: http://codereview.chromium.org/18831 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc2
-rw-r--r--webkit/glue/webplugin_impl.cc9
2 files changed, 6 insertions, 5 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index cd4aca0..e531972 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -1432,7 +1432,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, // TODO(erikkay)
Widget* result = WebPluginImpl::Create(gurl, argn, argv, argc, element,
webframe_, plugin_delegate,
- load_manually, actual_mime_type);
+ load_manually, my_mime_type);
DeleteToArray(argn);
DeleteToArray(argv);
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 5bf2f72..4064a27 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -1319,9 +1319,6 @@ bool WebPluginImpl::ReinitializePluginForResponse(
widget_ = container_widget;
webframe_ = web_frame;
- // Turn off the load_manually flag as we are going to hand data off to the
- // plugin.
- load_manually_ = false;
WebViewDelegate* webview_delegate = web_view->GetDelegate();
std::string actual_mime_type;
@@ -1345,7 +1342,7 @@ bool WebPluginImpl::ReinitializePluginForResponse(
delete[] arg_values;
if (!init_ok) {
- SetContainer(NULL);
+ widget_ = NULL;
// TODO(iyengar) Should we delete the current plugin instance here?
return false;
}
@@ -1356,6 +1353,10 @@ bool WebPluginImpl::ReinitializePluginForResponse(
// visible.
widget_->frameRectsChanged();
delegate_->FlushGeometryUpdates();
+ // The plugin move sequences accumulated via DidMove are sent to the browser
+ // whenever the renderer paints. Force a paint here to ensure that changes
+ // to the plugin window are propagated to the browser.
+ widget_->invalidateRect(widget_->frameRect());
return true;
}