summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/loader/MainResourceLoader.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/loader/MainResourceLoader.cpp
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/loader/MainResourceLoader.cpp')
-rw-r--r--Source/WebCore/loader/MainResourceLoader.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/WebCore/loader/MainResourceLoader.cpp b/Source/WebCore/loader/MainResourceLoader.cpp
index 4bdb9ad..c3c8d62 100644
--- a/Source/WebCore/loader/MainResourceLoader.cpp
+++ b/Source/WebCore/loader/MainResourceLoader.cpp
@@ -59,6 +59,7 @@ MainResourceLoader::MainResourceLoader(Frame* frame)
, m_dataLoadTimer(this, &MainResourceLoader::handleDataLoadNow)
, m_loadingMultipartContent(false)
, m_waitingForContentPolicy(false)
+ , m_timeOfLastDataReceived(0.0)
{
}
@@ -359,7 +360,7 @@ void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
// There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
// See <rdar://problem/6304600> for more details.
-#if !PLATFORM(CF)
+#if !USE(CF)
ASSERT(shouldLoadAsEmptyDocument(r.url()) || !defersLoading());
#endif
@@ -405,7 +406,7 @@ void MainResourceLoader::didReceiveResponse(const ResourceResponse& r)
}
#endif
- frameLoader()->policyChecker()->checkContentPolicy(m_response.mimeType(), callContinueAfterContentPolicy, this);
+ frameLoader()->policyChecker()->checkContentPolicy(m_response, callContinueAfterContentPolicy, this);
}
void MainResourceLoader::didReceiveData(const char* data, int length, long long lengthReceived, bool allAtOnce)
@@ -426,7 +427,7 @@ void MainResourceLoader::didReceiveData(const char* data, int length, long long
// There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
// See <rdar://problem/6304600> for more details.
-#if !PLATFORM(CF)
+#if !USE(CF)
ASSERT(!defersLoading());
#endif
@@ -447,7 +448,7 @@ void MainResourceLoader::didFinishLoading(double finishTime)
{
// There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
// See <rdar://problem/6304600> for more details.
-#if !PLATFORM(CF)
+#if !USE(CF)
ASSERT(shouldLoadAsEmptyDocument(frameLoader()->activeDocumentLoader()->url()) || !defersLoading());
#endif
@@ -460,7 +461,7 @@ void MainResourceLoader::didFinishLoading(double finishTime)
#endif
ASSERT(!documentLoader()->timing()->responseEnd);
- documentLoader()->timing()->responseEnd = finishTime ? finishTime : m_timeOfLastDataReceived;
+ documentLoader()->timing()->responseEnd = finishTime ? finishTime : (m_timeOfLastDataReceived ? m_timeOfLastDataReceived : currentTime());
frameLoader()->finishedLoading();
ResourceLoader::didFinishLoading(finishTime);
@@ -478,7 +479,7 @@ void MainResourceLoader::didFail(const ResourceError& error)
// There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
// See <rdar://problem/6304600> for more details.
-#if !PLATFORM(CF)
+#if !USE(CF)
ASSERT(!defersLoading());
#endif