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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 24045002: Remove some HTMLObjectElement logic from FrameLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months 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 | « Source/core/html/HTMLObjectElement.h ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index 52bc803760fc0e0b47aaa1becce4a1cae50d2cee..29bea9bb8661289d9249f586ec79badd2f10b0c2 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -191,9 +191,7 @@ void DocumentLoader::mainReceivedError(const ResourceError& error)
{
ASSERT(!error.isNull());
ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading());
-
m_applicationCacheHost->failedLoadingMainResource();
-
if (!frameLoader())
return;
setMainDocumentError(error);
@@ -544,15 +542,11 @@ void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
if (m_response.isHTTP()) {
int status = m_response.httpStatusCode();
- if (status < 200 || status >= 300) {
- bool hostedByObject = frameLoader()->isHostedByObjectElement();
-
- frameLoader()->handleFallbackContent();
+ if ((status < 200 || status >= 300) && m_frame->ownerElement() && m_frame->ownerElement()->isObjectElement()) {
+ m_frame->ownerElement()->renderFallbackContent();
// object elements are no longer rendered after we fallback, so don't
// keep trying to process data from their load
-
- if (hostedByObject)
- cancelMainResourceLoad(ResourceError::cancelledError(m_request.url()));
+ cancelMainResourceLoad(ResourceError::cancelledError(m_request.url()));
}
}
}
« no previous file with comments | « Source/core/html/HTMLObjectElement.h ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698