| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index b7fd24d02e0217a579e07bedc5a1acd8192c9bc2..e3824453e811c3c82cf573c92e97173572fb281c 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -1554,7 +1554,7 @@ void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
|
| // FIXME: SVG should probably also go through this unified paint invalidation system.
|
| ASSERT(!needsLayout());
|
|
|
| - if (!shouldCheckForPaintInvalidation())
|
| + if (!shouldCheckForSelfOrChildPaintInvalidation())
|
| return;
|
|
|
| bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer();
|
| @@ -1562,6 +1562,20 @@ void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
|
| // FIXME: This assert should be re-enabled when we move paint invalidation to after compositing update. crbug.com/360286
|
| // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
|
|
|
| + invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
|
| +
|
| + // This is for the next invalidatePaintIfNeeded so must be after invalidatePaintIfNeeded().
|
| + savePreviousBorderBoxSizeIfNeeded();
|
| +
|
| + PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
|
| + RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
|
| +}
|
| +
|
| +void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer)
|
| +{
|
| + if (!shouldCheckForPaintInvalidation())
|
| + return;
|
| +
|
| const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect();
|
| const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer();
|
| setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInvalidationContainer, &paintInvalidationState));
|
| @@ -1570,13 +1584,8 @@ void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
|
| // If we are set to do a full paint invalidation that means the RenderView will be
|
| // issue paint invalidations. We can then skip issuing of paint invalidations for the child
|
| // renderers as they'll be covered by the RenderView.
|
| - if (view()->doingFullRepaint()) {
|
| - PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
|
| - RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
|
| - // For the next invalidatePaintIfNeeded.
|
| - savePreviousBorderBoxSizeIfNeeded();
|
| + if (view()->doingFullRepaint())
|
| return;
|
| - }
|
|
|
| if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking)
|
| || (shouldDoFullPaintInvalidationIfSelfPaintingLayer()
|
| @@ -1585,12 +1594,9 @@ void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
|
| setShouldDoFullPaintInvalidation(true);
|
| }
|
|
|
| - if (!invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState))
|
| + if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalidationState))
|
| invalidatePaintForOverflowIfNeeded();
|
|
|
| - // This is for the next invalidatePaintIfNeeded so must be after invalidatePaintIfNeeded.
|
| - savePreviousBorderBoxSizeIfNeeded();
|
| -
|
| // Issue paint invalidations for any scrollbars if there is a scrollable area for this renderer.
|
| if (enclosingLayer()) {
|
| if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) {
|
| @@ -1601,9 +1607,6 @@ void RenderBox::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvali
|
| area->resetScrollbarDamage();
|
| }
|
| }
|
| -
|
| - PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
|
| - RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
|
| }
|
|
|
| bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset, ContentsClipBehavior contentsClipBehavior)
|
|
|