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

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

Issue 1110653003: [Reland] Correct fixed-position recording for Slimming Paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 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
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();

Powered by Google App Engine
This is Rietveld 408576698