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() |