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

Unified Diff: third_party/WebKit/Source/core/loader/ProgressTracker.cpp

Issue 2340603002: For more aggressive progress bar completion strategies, only count high priority resources (Closed)
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/loader/ProgressTracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ProgressTracker.cpp
diff --git a/third_party/WebKit/Source/core/loader/ProgressTracker.cpp b/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
index bcaa6a1e24a367f15b73837f6edf2e7346d181b7..d8bc2e10958a9397c50e42b84695061144a57c1f 100644
--- a/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
+++ b/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
@@ -142,14 +142,14 @@ void ProgressTracker::sendFinalProgress()
m_frame->loader().client()->progressEstimateChanged(m_progressValue);
}
-void ProgressTracker::willStartLoading(unsigned long identifier)
+void ProgressTracker::willStartLoading(unsigned long identifier, ResourceLoadPriority priority)
{
if (!m_frame->isLoading())
return;
// All of the progress bar completion policies besides LoadEvent instead block on parsing
// completion, which corresponds to finishing parsing. For those policies, don't consider
// resource load that start after DOMContentLoaded finishes.
- if (m_frame->settings()->progressBarCompletion() != ProgressBarCompletion::LoadEvent && m_finishedParsing)
+ if (m_frame->settings()->progressBarCompletion() != ProgressBarCompletion::LoadEvent && (m_finishedParsing || priority < ResourceLoadPriorityHigh))
return;
DCHECK(!m_progressItems.get(identifier));
m_progressItems.set(identifier, wrapUnique(new ProgressItem(progressItemDefaultEstimatedLength)));
« no previous file with comments | « third_party/WebKit/Source/core/loader/ProgressTracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698