Chromium Code Reviews| Index: Source/core/rendering/RenderBox.cpp |
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
| index b7fd24d02e0217a579e07bedc5a1acd8192c9bc2..aabca7b08b2ec094d4aab06c4daaf36a3f1d8d9b 100644 |
| --- a/Source/core/rendering/RenderBox.cpp |
| +++ b/Source/core/rendering/RenderBox.cpp |
| @@ -1562,6 +1562,17 @@ 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(); |
|
dsinclair
2014/07/21 17:10:56
Just to verify, this is the ordering we want? It l
Xianzhu
2014/07/21 17:18:54
Yes.
saveBorderBoxSizeIfNeeded() is only required
|
| + |
| + PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer); |
| + RenderObject::invalidateTreeIfNeeded(childTreeWalkState); |
| +} |
| + |
| +void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationContainer) |
| +{ |
| const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect(); |
| const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositionFromPaintInvalidationContainer(); |
| setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInvalidationContainer, &paintInvalidationState)); |
| @@ -1570,13 +1581,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 +1591,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 +1604,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) |