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

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: wait in renderer 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 44f2446632fc84ee790b38e7d3a2133f1022b82c..207ace941f7f8b6010f6d2cd419148a655fc3c62 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();
@@ -863,8 +864,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;
@@ -906,6 +908,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