Changeset 63878 in webkit
- Timestamp:
- Jul 22, 2010 12:40:52 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63876 r63878 1 2010-07-22 Tony Gentilcore <tonyg@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 webkitPerformance.timing.responseEnd should not include document parse time 6 https://bugs.webkit.org/show_bug.cgi?id=42797 7 8 No new tests because timing based test would be flaky. 9 10 * loader/FrameLoader.cpp: 11 (WebCore::FrameLoader::finishedLoading): finishedLoading() is called by the platform at the right time, but didReceiveData() synchronously invokes parsing without returning to the event loop prior to this. So by the time the didFinishLoading() method is executed, parsing is finished. The solution is to move this time to didReceiveData() prior to parsing. 12 * loader/MainResourceLoader.cpp: 13 (WebCore::MainResourceLoader::didReceiveData): Update the time each time didReceiveData() is called. 14 (WebCore::MainResourceLoader::didFinishLoading): When finished, and after parsing, set responseEnd appropriately. 15 * loader/MainResourceLoader.h: 16 * page/Timing.cpp: 17 (WebCore::Timing::resourceLoadTimeRelativeToAbsolute): Now that responseEnd is set correctly, it can be much shorter for very fast loads (like local files). This exposed the fact that this skew check was not tight enough. We need to make sure that the whole range of values from the ResourceLoadTiming API fit within fetchStart-responseEnd, not just that requestTime fits in this range. 18 1 19 2010-07-21 Kent Tamura <tkent@chromium.org> 2 20 -
trunk/WebCore/loader/FrameLoader.cpp
r63863 r63878 2222 2222 2223 2223 RefPtr<DocumentLoader> dl = activeDocumentLoader(); 2224 ASSERT(!dl->timing()->responseEnd);2225 dl->timing()->responseEnd = currentTime();2226 2224 dl->finishedLoading(); 2227 2225 if (!dl->mainDocumentError().isNull() || !dl->frameLoader()) -
trunk/WebCore/loader/MainResourceLoader.cpp
r63689 r63878 414 414 RefPtr<MainResourceLoader> protect(this); 415 415 416 m_timeOfLastDataReceived = currentTime(); 417 416 418 ResourceLoader::didReceiveData(data, length, lengthReceived, allAtOnce); 417 419 } … … 433 435 #endif 434 436 437 ASSERT(!documentLoader()->timing()->responseEnd); 438 documentLoader()->timing()->responseEnd = m_timeOfLastDataReceived; 435 439 frameLoader()->finishedLoading(); 436 440 ResourceLoader::didFinishLoading(); -
trunk/WebCore/loader/MainResourceLoader.h
r55237 r63878 108 108 bool m_loadingMultipartContent; 109 109 bool m_waitingForContentPolicy; 110 double m_timeOfLastDataReceived; 110 111 }; 111 112 -
trunk/WebCore/page/Timing.cpp
r63689 r63878 291 291 // Since ResourceLoadTimings came from the network platform layer, we must 292 292 // check them for skew because they may be from another thread/process. 293 double baseTime = getPossiblySkewedTimeInKnownRange(resourceTiming->requestTime, documentTiming->fetchStart, documentTiming->responseEnd );293 double baseTime = getPossiblySkewedTimeInKnownRange(resourceTiming->requestTime, documentTiming->fetchStart, documentTiming->responseEnd - (resourceTiming->receiveHeadersEnd / 1000.0)); 294 294 return toIntegerMilliseconds(baseTime) + relativeSeconds; 295 295 }
Note: See TracChangeset
for help on using the changeset viewer.