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

Unified Diff: third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp

Issue 2738813003: Ensure the scheduler always changes from UseCase LOADING to NONE. (Closed)
Patch Set: Update FMPD to use the provisional time rather than the current time. Created 3 years, 9 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
Index: third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
diff --git a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
index 9fca4136977ee48f1cbc383fcf7596b21f0748de..4abe2da6e76965590e20c4ccb611f559bb763b1d 100644
--- a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
+++ b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
@@ -104,7 +104,8 @@ void FirstMeaningfulPaintDetector::notifyPaint() {
m_seenFirstMeaningfulPaintCandidate = true;
return;
}
- m_paintTiming->markFirstMeaningfulPaintCandidate();
+ m_paintTiming->markFirstMeaningfulPaintCandidate(
+ m_provisionalFirstMeaningfulPaint);
}
void FirstMeaningfulPaintDetector::checkNetworkStable() {
@@ -123,6 +124,11 @@ void FirstMeaningfulPaintDetector::networkStableTimerFired(TimerBase*) {
return;
if (m_provisionalFirstMeaningfulPaint) {
+ // If there's only been one contentful paint, then there won't have been
+ // a meaningful paint signalled to the Scheduler, so mark one now.
+ // This is a no-op if a FMPC has already been marked.
+ m_paintTiming->markFirstMeaningfulPaintCandidate(
+ m_provisionalFirstMeaningfulPaint);
// Enforce FirstContentfulPaint <= FirstMeaningfulPaint.
double timestamp = std::max(m_provisionalFirstMeaningfulPaint,
m_paintTiming->firstContentfulPaint());

Powered by Google App Engine
This is Rietveld 408576698