Index: Source/core/layout/LayoutBoxModelObject.cpp |
diff --git a/Source/core/layout/LayoutBoxModelObject.cpp b/Source/core/layout/LayoutBoxModelObject.cpp |
index fae0ee81a9a7ff82697301c4d7295a6bd2e9ee64..484b46260853f73340798b89476681de432c2ffe 100644 |
--- a/Source/core/layout/LayoutBoxModelObject.cpp |
+++ b/Source/core/layout/LayoutBoxModelObject.cpp |
@@ -224,6 +224,17 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff, const ComputedSt |
setChildNeedsLayout(); |
} |
+ // Fixed-position is painted using transform. In the case that the object |
+ // gets the same layout after changing position property, although no |
+ // re-raster (rect-based invalidation) is needed, display items should |
+ // still update their paint offset. |
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled() && oldStyle) { |
+ bool newStyleIsFixedPosition = style()->position() == FixedPosition; |
+ bool oldStyleIsFixedPosition = oldStyle->position() == FixedPosition; |
+ if (newStyleIsFixedPosition != oldStyleIsFixedPosition) |
+ invalidateDisplayItemClientForNonCompositingDescendants(); |
+ } |
+ |
if (FrameView *frameView = view()->frameView()) { |
bool newStyleIsViewportConstained = style()->hasViewportConstrainedPosition(); |
bool oldStyleIsViewportConstrained = oldStyle && oldStyle->hasViewportConstrainedPosition(); |