Chromium Code Reviews| Index: Source/core/rendering/RenderBox.cpp |
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
| index f5b915350147261f336eb6ac8025d5bb2785cfc0..10d4c5d61750e7650909b7b2d61881ad7b944ed9 100644 |
| --- a/Source/core/rendering/RenderBox.cpp |
| +++ b/Source/core/rendering/RenderBox.cpp |
| @@ -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 (!shouldCheckForSelfPaintInvalidation()) |
| + 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(); |
|
dsinclair
2014/07/17 18:36:01
Does the ordering of these two methods matter? In
Xianzhu
2014/07/17 21:57:34
They are actually equivalent. There were two calls
|
| + 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) |