summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 21:07:23 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-10 21:07:23 +0000
commitba69f14e328ac74ad65343eecadfec74273179f5 (patch)
tree95e60b0441ae4f9acdceb8bb83204c3f417c8aa6 /webkit
parent0fb499a5b8b8d2979e7dafe93e8e6689fdedabd8 (diff)
downloadchromium_src-ba69f14e328ac74ad65343eecadfec74273179f5.zip
chromium_src-ba69f14e328ac74ad65343eecadfec74273179f5.tar.gz
chromium_src-ba69f14e328ac74ad65343eecadfec74273179f5.tar.bz2
Never send NPRES_NETWORK_ERR to Flash in response to a url that it opened in a new window, otherwise it unloads the loading flash. Before the code got reorganized with the WebKit API, we would always send NPRES_USER_BREAK which wasn't accurate, but didn't cause Flash problems. Now that we send NPRES_NETWORK_ERR, Flash stops playing the swf object. Safari always sends NPRES_DONE, Opera sends the correct error code and the swf objects unload, while it appears that Firefox doesn't send it at all.
BUG=23102 Review URL: http://codereview.chromium.org/385012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc6
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.h1
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_win.cc1
3 files changed, 8 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index 5ca970c..fee8114 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -145,6 +145,12 @@ NPObject* WebPluginDelegateImpl::GetPluginScriptableObject() {
void WebPluginDelegateImpl::DidFinishLoadWithReason(const GURL& url,
NPReason reason,
intptr_t notify_data) {
+ if (quirks_ & PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS &&
+ reason == NPRES_NETWORK_ERR) {
+ // Flash needs this or otherwise it unloads the launching swf object.
+ reason = NPRES_DONE;
+ }
+
instance()->DidFinishLoadWithReason(
url, reason, reinterpret_cast<void*>(notify_data));
}
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.h b/webkit/glue/plugins/webplugin_delegate_impl.h
index 8384e73..c367106 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.h
+++ b/webkit/glue/plugins/webplugin_delegate_impl.h
@@ -44,6 +44,7 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW = 512, // Linux
PLUGIN_QUIRK_NO_WINDOWLESS = 1024, // Windows
PLUGIN_QUIRK_PATCH_REGENUMKEYEXW = 2048, // Windows
+ PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS = 4096, // Windows
};
static WebPluginDelegateImpl* Create(const FilePath& filename,
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
index 9c28d0f..7f099d5 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
@@ -260,6 +260,7 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
instance_->set_use_mozilla_user_agent();
quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE;
quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR;
+ quirks_ |= PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS;
} else if (filename == kAcrobatReaderPlugin) {
// Check for the version number above or equal 9.
std::vector<std::wstring> version;