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

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

Issue 2580713005: [SPInvalidation] Update paint properties on perspective etc. change (Closed)
Patch Set: Unit test 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 4890fd1b7a574bf32291f20000edf87b4bcddb28..bd0101a296e97d763d42c10d2e7e697c77c05900 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -241,7 +241,7 @@ void LayoutBoxModelObject::styleWillChange(StyleDifference diff,
DISABLE_CFI_PERF
void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
const ComputedStyle* oldStyle) {
- bool hadTransform = hasTransformRelatedProperty();
+ bool hadTransformRelatedProperty = hasTransformRelatedProperty();
bool hadLayer = hasLayer();
bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer();
bool wasFloatingBeforeStyleChanged =
@@ -295,9 +295,10 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
layer()->removeOnlyThisLayerAfterStyleChange();
if (wasFloatingBeforeStyleChanged && isFloating())
setChildNeedsLayout();
- if (hadTransform)
+ if (hadTransformRelatedProperty) {
setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
LayoutInvalidationReason::StyleChange);
+ }
if (!needsLayout()) {
// FIXME: We should call a specialized version of this function.
parentLayer->updateLayerPositionsAfterLayout();
@@ -306,7 +307,9 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
// hasLayer status will affect whether to create localBorderBoxProperties.
- if (hadLayer != hasLayer()) {
+ // hasTransformRelatedProperty will affect whether to create transform node.
+ if (hadLayer != hasLayer() ||
+ hadTransformRelatedProperty != hasTransformRelatedProperty()) {
setNeedsPaintPropertyUpdate();
} else if (oldStyle && oldStyle->position() != styleRef().position() &&
(oldStyle->position() == FixedPosition ||
« 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