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

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

Issue 1892473002: Update PaintLayer::needsPaintPhaseXXX flags when add/remove layer on style change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 months 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/layout/LayoutObject.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 067a7670c8ff7bdc58a885aa755c4b874132039e..24e837dd11c1820dabbd04cdef5923f18c90bb5d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -217,7 +217,7 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff, const ComputedSt
PaintLayer* parentLayer = layer()->parent();
setHasTransformRelatedProperty(false); // Either a transform wasn't specified or the object doesn't support transforms, so just null out the bit.
setHasReflection(false);
- layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer
+ layer()->removeOnlyThisLayerAfterStyleChange(); // calls destroyLayer() which clears m_layer
if (wasFloatingBeforeStyleChanged && isFloating())
setChildNeedsLayout();
if (hadTransform)
@@ -295,20 +295,10 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff, const ComputedSt
void LayoutBoxModelObject::createLayer(PaintLayerType type)
{
- // If the current paint invalidation container is not a stacking context and this object is
- // stacked content, creating this layer may cause this object and its
- // descendants to change paint invalidation container. Therefore we must eagerly invalidate
- // them on the original paint invalidation container before creating the layer.
- if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted() && styleRef().isStacked()) {
- const LayoutBoxModelObject& currentPaintInvalidationContainer = containerForPaintInvalidation();
- if (!currentPaintInvalidationContainer.styleRef().isStackingContext())
- invalidatePaintIncludingNonSelfPaintingLayerDescendants(currentPaintInvalidationContainer);
- }
-
ASSERT(!m_layer);
m_layer = adoptPtr(new PaintLayer(this, type));
setHasLayer(true);
- m_layer->insertOnlyThisLayer();
+ m_layer->insertOnlyThisLayerAfterStyleChange();
}
void LayoutBoxModelObject::destroyLayer()
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698