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

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: ready for review Created 4 years, 5 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 3fa8e63c185b071c4f343796b89e2d2f3ac3c1be..6e680dcc0d9c561748471c749774fe8753a98cb8 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();
@@ -874,8 +875,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;
@@ -917,6 +919,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