Index: Source/core/layout/LayoutObject.cpp |
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
index aa2c60d896086b1a2db81489dcb91dd4117d9298..873820cac9d1759ddafc4007d913f653be4a3861 100644 |
--- a/Source/core/layout/LayoutObject.cpp |
+++ b/Source/core/layout/LayoutObject.cpp |
@@ -1193,8 +1193,10 @@ void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain |
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this); |
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
- enclosingLayer()->setNeedsRepaint(); |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
+ if (DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer()) |
+ enclosingLayer->setNeedsRepaint(); |
+ } |
} |
LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const |
@@ -3314,7 +3316,7 @@ void LayoutObject::invalidateDisplayItemClientForNonCompositingDescendantsOf(con |
explicit Functor(const LayoutBoxModelObject& paintInvalidationContainer) : m_paintInvalidationContainer(paintInvalidationContainer) { } |
void operator()(LayoutObject& object) const override |
{ |
- m_paintInvalidationContainer.invalidateDisplayItemClientOnBacking(object); |
+ object.invalidateDisplayItemClients(m_paintInvalidationContainer); |
} |
private: |
const LayoutBoxModelObject& m_paintInvalidationContainer; |