Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
index bd0101a296e97d763d42c10d2e7e697c77c05900..16faf3fa6ebc151892639fcc3e6e267147781ef0 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
@@ -306,17 +306,14 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff, |
} |
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
- // hasLayer status will affect whether to create localBorderBoxProperties. |
- // hasTransformRelatedProperty will affect whether to create transform node. |
- if (hadLayer != hasLayer() || |
- hadTransformRelatedProperty != hasTransformRelatedProperty()) { |
- setNeedsPaintPropertyUpdate(); |
- } else if (oldStyle && oldStyle->position() != styleRef().position() && |
- (oldStyle->position() == FixedPosition || |
- styleRef().position() == FixedPosition)) { |
- // Fixed-position status affects whether to create paintOffsetTranslation. |
- // TODO(chrishtr): Update the condition here when changing the condition |
- // in PaintPropertyTreeBuilder::updatePaintOffsetTranslation(). |
+ if ((oldStyle && oldStyle->position() != styleRef().position()) || |
+ hadLayer != hasLayer()) { |
+ // This may affect paint properties of the current object, and descendants |
+ // even if paint properties of the current object won't change. E.g. the |
+ // stacking context and/or containing block of descendants may change. |
+ setSubtreeNeedsPaintPropertyUpdate(); |
+ } else if (hadTransformRelatedProperty != hasTransformRelatedProperty()) { |
+ // This affects whether to create transform node. |
setNeedsPaintPropertyUpdate(); |
} |
} |