| 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 6e8030fca4ea558c1c7cc5a6ddd66c0f999ffc1b..10e38a4e9195a4174cea9e0f2528061a7501ce06 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -2990,6 +2990,36 @@ void FrameView::clearPrintContext() {
|
| m_printContext.clear();
|
| }
|
|
|
| +static int gFrameCounts[7];
|
| +int* frameCounts() {
|
| + return gFrameCounts;
|
| +}
|
| +
|
| +static void countFrames(const Frame& frame) {
|
| + gFrameCounts[0]++;
|
| + for (Frame* child = frame.tree().firstChild(); child;
|
| + child = child->tree().nextSibling()) {
|
| + if (!child->isLocalFrame()) {
|
| + gFrameCounts[1]++;
|
| + continue;
|
| + }
|
| + if (!child->ownerLayoutObject())
|
| + gFrameCounts[2]++;
|
| + if (FrameView* childView = toLocalFrame(child)->view()) {
|
| + if (childView->shouldThrottleRendering()) {
|
| + gFrameCounts[3]++;
|
| + if (!child->ownerLayoutObject())
|
| + gFrameCounts[4]++;
|
| + }
|
| + if (!childView->layoutView())
|
| + gFrameCounts[5]++;
|
| + } else {
|
| + gFrameCounts[6]++;
|
| + }
|
| + countFrames(*child);
|
| + }
|
| +}
|
| +
|
| // TODO(leviw): We don't assert lifecycle information from documents in child
|
| // PluginViews.
|
| void FrameView::updateLifecyclePhasesInternal(
|
| @@ -3121,6 +3151,10 @@ void FrameView::updateLifecyclePhasesInternal(
|
| }
|
|
|
| updateViewportIntersectionsForSubtree(targetState);
|
| +
|
| + gFrameCounts[0] = gFrameCounts[1] = gFrameCounts[2] = gFrameCounts[3] =
|
| + gFrameCounts[4] = 0;
|
| + countFrames(*m_frame);
|
| }
|
|
|
| void FrameView::enqueueScrollAnchoringAdjustment(
|
|
|