void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
- bool hadTransform = hasTransform();
+ bool hadTransform = hasTransformRelatedProperty();
bool hadLayer = hasLayer();
bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer();
}
}
} else if (layer() && layer()->parent()) {
- setHasTransform(false); // Either a transform wasn't specified or the object doesn't support transforms, so just null out the bit.
+ 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
if (s_wasFloating && isFloating())
bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer();
const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer());
- // FIXME: This assert should be re-enabled when we move paint invalidation to after compositing update. crbug.com/360286
- // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
+ ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
- InvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
+ PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer);
clearPaintInvalidationState(paintInvalidationState);
PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer);
- if (reason == InvalidationLocationChange || reason == InvalidationFull)
+ if (reason == PaintInvalidationLocationChange)
childTreeWalkState.setForceCheckForPaintInvalidation();
invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
}
-void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRect& r) const
+void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRect& r, PaintInvalidationReason invalidationReason) const
{
// https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
// so assert but check that the layer is composited.
ASSERT(compositingState() != NotComposited);
- WebInvalidationDebugAnnotations annotations = WebInvalidationDebugAnnotationsNone;
- if (!hadPaintInvalidation())
- annotations = WebInvalidationDebugAnnotationsFirstPaint;
- // FIXME: The callers assume they are calling a const function but this function has a side effect.
- const_cast<RenderLayerModelObject*>(this)->setHadPaintInvalidation();
-
// FIXME: generalize accessors to backing GraphicsLayers so that this code is squashing-agnostic.
if (layer()->groupedMapping()) {
LayoutRect paintInvalidationRect = r;
if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer()) {
// Note: the subpixel accumulation of layer() does not need to be added here. It is already taken into account.
- squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInvalidationRect), annotations);
+ squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInvalidationRect), invalidationReason);
}
} else {
- layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, annotations);
+ layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, invalidationReason);
}
}