diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-29 18:45:11 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-29 18:45:11 +0000 |
commit | 022d781a2cc19279a89e3f32ade891ba133e6077 (patch) | |
tree | d96c73e8c237066dc88d3daeed209e1fbcda03ac /webkit/glue/webframeloaderclient_impl.cc | |
parent | 922e38964eba7f23f2f5f5e5ce3b547f2940bdf3 (diff) | |
download | chromium_src-022d781a2cc19279a89e3f32ade891ba133e6077.zip chromium_src-022d781a2cc19279a89e3f32ade891ba133e6077.tar.gz chromium_src-022d781a2cc19279a89e3f32ade891ba133e6077.tar.bz2 |
Disable alternate error pages on frames and iframes. This is
a request from the link doctor team.
Add a UI test that verifies that no link doctor page is loaded.
Review URL: http://codereview.chromium.org/5032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframeloaderclient_impl.cc')
-rw-r--r-- | webkit/glue/webframeloaderclient_impl.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc index 7d3011c..d8fed70 100644 --- a/webkit/glue/webframeloaderclient_impl.cc +++ b/webkit/glue/webframeloaderclient_impl.cc @@ -241,10 +241,10 @@ void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response) { - // True if the request was for the page's main frame, or a subframe. - bool is_frame = ResourceType::IsFrame(DetermineResourceTypeFromLoader(loader)); /* TODO(evanm): reenable this once we properly sniff XHTML from text/xml documents. + // True if the request was for the page's main frame, or a subframe. + bool is_frame = ResourceType::IsFrame(DetermineResourceTypeFromLoader(loader)); if (is_frame && response.httpStatusCode() == 200 && mime_util::IsViewSourceMimeType( @@ -262,7 +262,8 @@ void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader* loader, // If it's a 404 page, we wait until we get 512 bytes of data before trying // to load the document. This allows us to put up an alternate 404 page if // there's short text. - postpone_loading_data_ = is_frame && + postpone_loading_data_ = + ResourceType::MAIN_FRAME == DetermineResourceTypeFromLoader(loader) && !is_substitute_data && response.httpStatusCode() == 404 && GetAlt404PageUrl(loader).is_valid(); |