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

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

Issue 2574293003: [SPInvalidation] Update paint properties when layer or paintsWithTransform status change (Closed)
Patch Set: Also fix paintOffsetTranslation 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
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 17369a27025b82ed5aa032f5c45b5cd8f8cb0724..4847aa83674cf23d2ae10c51f8200f71b78d328d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -298,6 +298,21 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
}
}
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ // hasLayer status will affect whether to create localBorderBoxProperties.
+ if (hadLayer != hasLayer()) {
+ setNeedsPaintPropertyUpdate();
+ } else {
+ bool hasPaintOffsetTranslation =
+ paintProperties() && paintProperties()->paintOffsetTranslation();
+ bool willHavePaintOffsetTranslation =
+ hasLayer() &&
+ layer()->paintsWithTransform(GlobalPaintFlattenCompositingLayers);
+ if (hasPaintOffsetTranslation != willHavePaintOffsetTranslation)
+ setNeedsPaintPropertyUpdate();
+ }
+ }
+
if (layer()) {
layer()->styleDidChange(diff, oldStyle);
if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)

Powered by Google App Engine
This is Rietveld 408576698