Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2604743002: [SPInvalidation] Force subtree paint property update on css position change (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698