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

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

Issue 2397753006: scheduler: Detect load RAIL mode (Closed)
Patch Set: Rebased Created 4 years, 2 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/PaintTiming.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.cpp b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
index f87085b838c3eeaf5de00e7bed4e77de66bd05c9..72a55e625ba6b417c109341c7b6d2bfa87a944f5 100644
--- a/third_party/WebKit/Source/core/paint/PaintTiming.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
@@ -5,8 +5,11 @@
#include "core/paint/PaintTiming.h"
#include "core/dom/Document.h"
+#include "core/frame/FrameView.h"
+#include "core/frame/LocalFrame.h"
#include "core/loader/DocumentLoader.h"
#include "platform/tracing/TraceEvent.h"
+#include "public/platform/WebFrameScheduler.h"
namespace blink {
@@ -71,6 +74,10 @@ void PaintTiming::setFirstMeaningfulPaint(double stamp) {
TRACE_EVENT_MARK_WITH_TIMESTAMP1(
"blink.user_timing", "firstMeaningfulPaint",
TraceEvent::toTraceTimestamp(m_firstMeaningfulPaint), "frame", frame());
+ if (m_document->frame() && m_document->frame()->view() &&
+ !m_document->frame()->view()->parent()) {
+ m_document->frame()->frameScheduler()->onFirstMeaningfulPaint();
+ }
notifyPaintTimingChanged();
}

Powered by Google App Engine
This is Rietveld 408576698