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

Unified Diff: third_party/WebKit/Source/core/css/CSSTiming.cpp

Issue 2533783003: Add metrics for style update time before FCP. (Closed)
Patch Set: value_or(base::TimeDelta()) Created 4 years, 1 month 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/css/CSSTiming.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSTiming.cpp b/third_party/WebKit/Source/core/css/CSSTiming.cpp
index abb080559bb69b3e80b68b540935c0e63a115604..e38a4422796987bf221b0b4592327c7ffed0b6d6 100644
--- a/third_party/WebKit/Source/core/css/CSSTiming.cpp
+++ b/third_party/WebKit/Source/core/css/CSSTiming.cpp
@@ -25,6 +25,11 @@ void CSSTiming::recordAuthorStyleSheetParseTime(double seconds) {
m_parseTimeBeforeFCP += seconds;
}
+void CSSTiming::recordUpdateDuration(double seconds) {
+ if (!m_paintTiming->firstContentfulPaint())
+ m_updateTimeBeforeFCP += seconds;
+}
+
DEFINE_TRACE(CSSTiming) {
visitor->trace(m_document);
visitor->trace(m_paintTiming);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSTiming.h ('k') | third_party/WebKit/Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698