Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 8d24bf53b997d052379023c8a528d44e20760db0..3dc94853244ef49e118f3baeedf3b00c429fb3c5 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -1603,10 +1603,10 @@ void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv |
{ |
// If we didn't need paint invalidation then our children don't need as well. |
// Skip walking down the tree as everything should be fine below us. |
- if (!shouldCheckForPaintInvalidation()) |
+ if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
return; |
- clearPaintInvalidationState(); |
+ clearPaintInvalidationState(paintInvalidationState); |
for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling()) { |
if (!child->isOutOfFlowPositioned()) |
@@ -1622,11 +1622,11 @@ static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe |
return value.finish(); |
} |
-bool RenderObject::invalidatePaintIfNeeded(const RenderLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const PaintInvalidationState& paintInvalidationState) |
+InvalidationReason RenderObject::invalidatePaintIfNeeded(const RenderLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const PaintInvalidationState& paintInvalidationState) |
{ |
RenderView* v = view(); |
if (v->document().printing()) |
- return false; // Don't invalidate paints if we're printing. |
+ return InvalidationNone; // Don't invalidate paints if we're printing. |
const LayoutRect& newBounds = previousPaintInvalidationRect(); |
const LayoutPoint& newLocation = previousPositionFromPaintInvalidationContainer(); |
@@ -1643,15 +1643,15 @@ bool RenderObject::invalidatePaintIfNeeded(const RenderLayerModelObject& paintIn |
InvalidationReason invalidationReason = getPaintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation); |
if (invalidationReason == InvalidationNone) |
- return false; |
+ return invalidationReason; |
if (invalidationReason == InvalidationIncremental) { |
incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newBounds); |
- return false; |
+ return invalidationReason; |
} |
fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBounds, newBounds); |
- return true; |
+ return invalidationReason; |
} |
InvalidationReason RenderObject::getPaintInvalidationReason(const RenderLayerModelObject& paintInvalidationContainer, |
@@ -3398,11 +3398,11 @@ bool RenderObject::isRelayoutBoundaryForInspector() const |
return objectIsRelayoutBoundary(this); |
} |
-void RenderObject::clearPaintInvalidationState() |
+void RenderObject::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState) |
{ |
// paintInvalidationStateIsDirty should be kept in sync with the |
// booleans that are cleared below. |
- ASSERT(paintInvalidationStateIsDirty()); |
+ ASSERT(paintInvalidationState.forceCheckForPaintInvalidation() || paintInvalidationStateIsDirty()); |
setShouldDoFullPaintInvalidation(false); |
setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false); |
setOnlyNeededPositionedMovementLayout(false); |