| Index: Source/core/frame/FrameView.cpp
|
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
|
| index bba69047de2ce35c11c2acfc67df597645d85d16..d3b7df87c8e0010f8ceae211e586db22bec0130d 100644
|
| --- a/Source/core/frame/FrameView.cpp
|
| +++ b/Source/core/frame/FrameView.cpp
|
| @@ -952,12 +952,6 @@
|
| performLayout(rootForThisLayout, inSubtreeLayout);
|
|
|
| m_layoutSubtreeRoot = 0;
|
| - // The following loop ensures that we mark up all renderers up to the RenderView
|
| - // for paint invalidation. This simplifies our code as we just always do a full
|
| - // tree walk. FIXME: This loop will probably make us over-mark as we don't skip
|
| - // containers and we can't use containingBlock as it skips some cases (see markContainingBlocksForLayout).
|
| - if (RenderObject* container = rootForThisLayout->container())
|
| - container->setMayNeedPaintInvalidation(true);
|
| } // Reset m_layoutSchedulingEnabled to its previous value.
|
|
|
| if (!inSubtreeLayout && !toRenderView(rootForThisLayout)->document().printing())
|
| @@ -989,6 +983,10 @@
|
| m_nestedLayoutCount--;
|
| if (m_nestedLayoutCount)
|
| return;
|
| +
|
| + invalidateTree(rootForThisLayout);
|
| +
|
| + m_doFullPaintInvalidation = false;
|
|
|
| #ifndef NDEBUG
|
| // Post-layout assert that nobody was re-marked as needing layout during layout.
|
| @@ -1009,16 +1007,22 @@
|
| // method would setNeedsRedraw on the GraphicsLayers with invalidations and
|
| // let the compositor pick which to actually draw.
|
| // See http://crbug.com/306706
|
| -void FrameView::invalidateTreeIfNeeded()
|
| -{
|
| - RenderObject* rootForPaintInvalidation = renderView();
|
| - ASSERT(!rootForPaintInvalidation->needsLayout());
|
| -
|
| - TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInvalidation->debugName().ascii());
|
| -
|
| - LayoutState rootLayoutState(*rootForPaintInvalidation);
|
| -
|
| - rootForPaintInvalidation->invalidateTreeAfterLayout(*rootForPaintInvalidation->containerForPaintInvalidation());
|
| +void FrameView::invalidateTree(RenderObject* root)
|
| +{
|
| + ASSERT(!root->needsLayout());
|
| + // We should only invalidate paints for the outer most layout. This works as
|
| + // we continue to track paint invalidation rects until this function is called.
|
| + ASSERT(!m_nestedLayoutCount);
|
| +
|
| + TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", root->debugName().ascii());
|
| +
|
| + // FIXME: really, we're in the paint invalidation phase here, and the compositing queries are legal.
|
| + // Until those states are fully fledged, I'll just disable the ASSERTS.
|
| + DisableCompositingQueryAsserts compositingQueryAssertsDisabler;
|
| +
|
| + LayoutState rootLayoutState(*root);
|
| +
|
| + root->invalidateTreeAfterLayout(*root->containerForPaintInvalidation());
|
|
|
| // Invalidate the paint of the frameviews scrollbars if needed
|
| if (hasVerticalBarDamage())
|
| @@ -1026,8 +1030,6 @@
|
| if (hasHorizontalBarDamage())
|
| invalidateRect(horizontalBarDamage());
|
| resetScrollbarDamage();
|
| -
|
| - m_doFullPaintInvalidation = false;
|
| }
|
|
|
| DocumentLifecycle& FrameView::lifecycle() const
|
| @@ -2818,8 +2820,6 @@
|
| m_frame->page()->scrollingCoordinator()->updateAfterCompositingChangeIfNeeded();
|
|
|
| InspectorInstrumentation::didUpdateLayerTree(view->frame());
|
| -
|
| - invalidateTreeIfNeededRecursive();
|
| }
|
|
|
| scrollContentsIfNeededRecursive();
|
| @@ -2873,19 +2873,6 @@
|
| m_frame->document()->renderView()->assertRendererLaidOut();
|
| #endif
|
|
|
| -}
|
| -
|
| -void FrameView::invalidateTreeIfNeededRecursive()
|
| -{
|
| - // FIXME: We should be more aggressive at cutting tree traversals.
|
| - invalidateTreeIfNeeded();
|
| -
|
| - for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
|
| - if (!child->isLocalFrame())
|
| - continue;
|
| -
|
| - toLocalFrame(child)->view()->invalidateTreeIfNeededRecursive();
|
| - }
|
| }
|
|
|
| void FrameView::enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize& maxSize)
|
|
|