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

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: rebase 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 1b09755291e499ef50f498b6aef95f6a619154db..ccfb615bc50a08c5385730fb2b109c33aef68417 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()).markNextPaintAsMeaningfulIfNeeded(m_layoutObjectCounter, contentsHeightBeforeLayout, layoutViewItem().documentRect().height(), visibleHeight());
}
void FrameView::scheduleOrPerformPostLayoutTasks()
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698