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

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

Issue 2397753006: scheduler: Detect load RAIL mode (Closed)
Patch Set: Rebased Created 4 years 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 61496993f93e7634d4150b8b3a704c667c61bae5..f593ead9c241b688deb40dcb5b7eae50fc80311e 100644
--- a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
+++ b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
@@ -95,6 +95,13 @@ void FirstMeaningfulPaintDetector::notifyPaint() {
"loading", "firstMeaningfulPaintCandidate",
TraceEvent::toTraceTimestamp(m_provisionalFirstMeaningfulPaint), "frame",
document()->frame());
+ // Ignore the first meaningful paint candidate as this generally is the first
+ // contentful paint itself.
+ if (!m_seenFirstMeaningfulPaintCandidate) {
+ m_seenFirstMeaningfulPaintCandidate = true;
+ return;
+ }
+ m_paintTiming->markFirstMeaningfulPaintCandidate();
}
void FirstMeaningfulPaintDetector::checkNetworkStable() {

Powered by Google App Engine
This is Rietveld 408576698