Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: webkit/glue/webplugin_impl.cc

Issue 13198: Improve PDF FastWebView performance. This occurs because the manual data... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webplugin_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webplugin_impl.cc
===================================================================
--- webkit/glue/webplugin_impl.cc (revision 6484)
+++ webkit/glue/webplugin_impl.cc (working copy)
@@ -10,6 +10,7 @@
MSVC_PUSH_WARNING_LEVEL(0);
#include "Cursor.h"
#include "Document.h"
+#include "DocumentLoader.h"
#include "Element.h"
#include "Event.h"
#include "EventNames.h"
@@ -111,7 +112,10 @@
WebPluginResourceClient* resource_client_;
};
-WebPluginContainer::WebPluginContainer(WebPluginImpl* impl) : impl_(impl) { }
+WebPluginContainer::WebPluginContainer(WebPluginImpl* impl)
+ : impl_(impl),
+ ignore_response_error_(false) {
+}
WebPluginContainer::~WebPluginContainer() {
impl_->SetContainer(NULL);
@@ -221,6 +225,8 @@
void WebPluginContainer::didReceiveResponse(
const WebCore::ResourceResponse& response) {
+ set_ignore_response_error(false);
+
HttpResponseInfo http_response_info;
ReadHttpResponseInfo(response, &http_response_info);
@@ -241,7 +247,8 @@
}
void WebPluginContainer::didFail(const WebCore::ResourceError&) {
- impl_->delegate_->DidManualLoadFail();
+ if (!ignore_response_error_)
+ impl_->delegate_->DidManualLoadFail();
}
void WebPluginContainer::ReadHttpResponseInfo(
@@ -1266,7 +1273,10 @@
}
void WebPluginImpl::CancelDocumentLoad() {
- frame()->loader()->stopLoading(false);
+ if (frame()->loader()->activeDocumentLoader()) {
+ widget_->set_ignore_response_error(true);
+ frame()->loader()->activeDocumentLoader()->stopLoading();
+ }
}
void WebPluginImpl::InitiateHTTPRangeRequest(const char* url,
« no previous file with comments | « webkit/glue/webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698