Changeset 162637 in webkit
- Timestamp:
- Jan 23, 2014, 1:20:00 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r162636 r162637 1 2014-01-23 Antti Koivisto <antti@apple.com> 2 3 Loads started soon after main frame completion should be considered part of the main load 4 https://bugs.webkit.org/show_bug.cgi?id=127504 5 6 Reviewed by Andreas Kling. 7 8 ProgressTracker currently decides that main load is complete when the main frame stops loading. 9 However it is common that timers and onload events trigger more loads immediately (for example 10 by inserting iframes) and loading continues visually. These should be considered as part of the 11 main load for paint throttling and speculative tiling coverage purposes. 12 13 * loader/ProgressTracker.cpp: 14 (WebCore::ProgressTracker::ProgressTracker): 15 (WebCore::ProgressTracker::progressStarted): 16 17 Track whether this is considered part of the main load or not with a boolean. 18 It is set for subframe loads too if they start loading soon (within 1s) after the main frame load completes. 19 20 (WebCore::ProgressTracker::finalProgressComplete): 21 22 Get a timestamp. 23 24 (WebCore::ProgressTracker::isMainLoadProgressing): 25 26 New definition of "main load". 27 28 * loader/ProgressTracker.h: 29 1 30 2014-01-23 peavo@outlook.com <peavo@outlook.com> 2 31 -
trunk/Source/WebCore/loader/ProgressTracker.cpp
r162034 r162637 34 34 #include "InspectorInstrumentation.h" 35 35 #include "Logging.h" 36 #include "MainFrame.h" 36 37 #include "ProgressTrackerClient.h" 37 38 #include "ResourceResponse.h" … … 89 90 , m_heartbeatsWithNoProgress(0) 90 91 , m_totalBytesReceivedBeforePreviousHeartbeat(0) 92 , m_mainLoadCompletionTimeStamp(0) 93 , m_isMainLoad(false) 91 94 { 92 95 } … … 134 137 m_originatingProgressFrame->loader().loadProgressingStatusChanged(); 135 138 139 bool isMainFrame = !m_originatingProgressFrame->tree().parent(); 140 double elapsedTimeSinceMainLoadComplete = monotonicallyIncreasingTime() - m_mainLoadCompletionTimeStamp; 141 142 static const double subframePartOfMainLoadThreshold = 1; 143 m_isMainLoad = isMainFrame || elapsedTimeSinceMainLoadComplete < subframePartOfMainLoadThreshold; 144 136 145 m_client.progressStarted(*m_originatingProgressFrame); 137 146 } … … 172 181 173 182 reset(); 183 184 if (m_isMainLoad) 185 m_mainLoadCompletionTimeStamp = monotonicallyIncreasingTime(); 174 186 175 187 frame->loader().client().setMainFrameDocumentReady(true); … … 292 304 if (!m_originatingProgressFrame) 293 305 return false; 294 // See if the load originated from a subframe. 295 if ( m_originatingProgressFrame->tree().parent())306 307 if (!m_isMainLoad) 296 308 return false; 309 297 310 return m_progressValue && m_progressValue < finalProgressValue && m_heartbeatsWithNoProgress < loadStalledHeartbeatCount; 298 311 } -
trunk/Source/WebCore/loader/ProgressTracker.h
r161768 r162637 88 88 unsigned m_heartbeatsWithNoProgress; 89 89 long long m_totalBytesReceivedBeforePreviousHeartbeat; 90 double m_mainLoadCompletionTimeStamp; 91 bool m_isMainLoad; 90 92 }; 91 93
Note:
See TracChangeset
for help on using the changeset viewer.