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

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

Issue 2080593002: Revert of Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: Created 4 years, 6 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: 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 fd76c7b52d0c516de43f840a80d25c4a60cfcec9..0c3af3981485bb9900415ac8955d9ffe08246593 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -252,7 +252,7 @@
bool newStyleIsFixedPosition = style()->position() == FixedPosition;
bool oldStyleIsFixedPosition = oldStyle->position() == FixedPosition;
if (newStyleIsFixedPosition != oldStyleIsFixedPosition)
- invalidateDisplayItemClientsIncludingNonCompositingDescendants(PaintInvalidationStyleChange);
+ invalidateDisplayItemClientsIncludingNonCompositingDescendants(nullptr, PaintInvalidationStyleChange);
}
// The used style for body background may change due to computed style change
@@ -436,6 +436,28 @@
} else {
// Otherwise invalidate everything.
layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, invalidationReason, object);
+ }
+}
+
+void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayItemClient& displayItemClient, PaintInvalidationReason invalidationReason, const LayoutObject* layoutObject) const
+{
+ displayItemClient.setDisplayItemsUncached();
+
+ // We need to inform the GraphicsLayer about this paint invalidation only when we are tracking
+ // paint invalidation or ENABLE(ASSERT).
+#if !ENABLE(ASSERT)
+ if (!frameView()->isTrackingPaintInvalidations())
+ return;
+#endif
+
+ if (layer()->groupedMapping()) {
+ if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashingLayer())
+ squashingLayer->displayItemClientWasInvalidated(displayItemClient, invalidationReason);
+ } else if (CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping()) {
+ if (layoutObject && layoutObject->compositedScrollsWithRespectTo(*this))
+ compositedLayerMapping->scrollingDisplayItemClientWasInvalidated(displayItemClient, invalidationReason);
+ else
+ compositedLayerMapping->displayItemClientWasInvalidated(displayItemClient, invalidationReason);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698