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

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

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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 4784dd7466c71d63bfc859a221047804fdb73f04..35712631cc98d1e6e85e3512ed95b1ee5f980a44 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -229,6 +229,7 @@ void FrameView::reset()
m_visuallyNonEmptyCharacterCount = 0;
m_visuallyNonEmptyPixelCount = 0;
m_isVisuallyNonEmpty = false;
+ m_layoutObjectCounter.reset();
clearFragmentAnchor();
m_viewportConstrainedObjects.reset();
m_layoutSubtreeRootList.clear();
@@ -869,8 +870,9 @@ void FrameView::performLayout(bool inSubtreeLayout)
{
ASSERT(inSubtreeLayout || m_layoutSubtreeRootList.isEmpty());
+ int contentsHeightBeforeLayout = layoutViewItem().documentRect().height();
TRACE_EVENT_BEGIN1(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayout",
- "contentsHeightBeforeLayout", layoutViewItem().documentRect().height());
+ "contentsHeightBeforeLayout", contentsHeightBeforeLayout);
prepareLayoutAnalyzer();
ScriptForbiddenScope forbidScript;
@@ -912,6 +914,7 @@ void FrameView::performLayout(bool inSubtreeLayout)
TRACE_EVENT_END1(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayout",
"counters", analyzerCounters());
+ FirstMeaningfulPaintDetector::from(*m_frame->document()).computeLayoutSignificance(m_layoutObjectCounter, contentsHeightBeforeLayout, layoutViewItem().documentRect().height(), visibleHeight());
}
void FrameView::scheduleOrPerformPostLayoutTasks()

Powered by Google App Engine
This is Rietveld 408576698