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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1773633003: [DO NOT COMMIT] Trace events for layout-based First Meaningful Paint detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index a603be0b0d1f1d196811b4bed1f10d72fa3f2107..c7f49e68bc65f621e777b73327b125be5d58c86f 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -823,7 +823,7 @@ static inline void layoutFromRootObject(LayoutObject& root)
void FrameView::prepareLayoutAnalyzer()
{
bool isTracing = false;
- TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.debug.layout"), &isTracing);
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED("blink.user_timing", &isTracing);
if (!isTracing) {
m_analyzer.clear();
return;
@@ -839,6 +839,10 @@ PassOwnPtr<TracedValue> FrameView::analyzerCounters()
return TracedValue::create();
OwnPtr<TracedValue> value = m_analyzer->toTracedValue();
value->setString("host", layoutView()->document().location()->host());
+ value->setInteger("visibleHeight", visibleHeight());
+ value->setInteger("contentsHeightBefore", contentsSize().height());
paulirish 2016/04/29 02:41:51 Are you submitting a CL for these non-font counter
Kunihiko Sakamoto 2016/05/09 07:33:42 Sorry for the delay, just sent out https://coderev
+ value->setInteger("contentsHeightAfter", layoutView()->documentRect().height());
+ value->setBoolean("hasBlankText", FontFaceSet::hasBlankText(*m_frame->document()));
return value.release();
}
@@ -848,7 +852,7 @@ void FrameView::performLayout(bool inSubtreeLayout)
{
ASSERT(inSubtreeLayout || m_layoutSubtreeRootList.isEmpty());
- TRACE_EVENT_BEGIN0(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayout");
+ TRACE_EVENT_BEGIN0("blink.user_timing", "FrameView::performLayout");
prepareLayoutAnalyzer();
ScriptForbiddenScope forbidScript;
@@ -888,8 +892,8 @@ void FrameView::performLayout(bool inSubtreeLayout)
lifecycle().advanceTo(DocumentLifecycle::AfterPerformLayout);
- TRACE_EVENT_END1(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayout",
- "counters", analyzerCounters());
+ TRACE_EVENT_END2("blink.user_timing", "FrameView::performLayout",
+ "counters", analyzerCounters(), "frame", m_frame.get());
}
void FrameView::scheduleOrPerformPostLayoutTasks()
« no previous file with comments | « third_party/WebKit/Source/core/css/RemoteFontFaceSource.h ('k') | third_party/WebKit/Source/core/layout/LayoutText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698