Chromium Code Reviews| Index: Source/core/layout/LayoutObject.cpp |
| diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
| index f5e859a4720a8f87dce35e4a1bd908f6355e92dc..40bd6bda06659c3cdc866565a5d609e9fba58c21 100644 |
| --- a/Source/core/layout/LayoutObject.cpp |
| +++ b/Source/core/layout/LayoutObject.cpp |
| @@ -1203,8 +1203,14 @@ void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv |
| if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
| return; |
| - invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer()); |
| - clearPaintInvalidationState(paintInvalidationState); |
| + PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationState.paintInvalidationContainer()); |
| + if (reason != PaintInvalidationDelayedFull) { |
| + clearPaintInvalidationState(paintInvalidationState); |
| + } else { |
| + // Mark this object as needing paint invalidation again in the next frame, due to the request for delayed paint invalidation. |
| + setShouldDoFullPaintInvalidation(); |
| + } |
| + |
| invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); |
| } |
| @@ -3117,7 +3123,6 @@ void LayoutObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas |
| m_bitfields.setFullPaintInvalidationReason(reason); |
| } |
| - ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidation); |
|
esprehn
2015/03/20 06:52:32
Are you sure this is safe? Calling markContainerCh
chrishtr
2015/03/20 16:44:45
Good point, this assert is still valuable for prev
|
| frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). |
| markContainerChainForPaintInvalidation(); |
| } |