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

Unified Diff: Source/core/layout/LayoutObject.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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index ff44d9518b245f6da1df575f356eae31c304310e..42299e6ca972a7887e4ea34179f8627f9a1a8637 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1215,6 +1215,28 @@ void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d
}
}
+static void invalidateDisplayItemClientForNonCompositingDescendantsRecursive(const LayoutBoxModelObject& paintInvalidationContainer, const LayoutObject& layoutObject)
+{
+ paintInvalidationContainer.invalidateDisplayItemClientOnBacking(layoutObject);
+ for (LayoutObject* child = layoutObject.slowFirstChild(); child; child = child->nextSibling()) {
+ if (!child->isPaintInvalidationContainer())
+ invalidateDisplayItemClientForNonCompositingDescendantsRecursive(paintInvalidationContainer, *child);
+ }
+}
+
+void LayoutObject::invalidateDisplayItemClientForNonCompositingDescendants() const
+{
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
+
+ // Not using enclosingCompositedContainer() directly because this object may be in an orphaned subtree.
+ if (const DeprecatedPaintLayer* enclosingLayer = this->enclosingLayer()) {
+ // This is valid because we want to invalidate the client in the display item list of the current backing.
+ DisableCompositingQueryAsserts disabler;
+ if (const DeprecatedPaintLayer* paintInvalidationLayer = enclosingLayer->enclosingLayerForPaintInvalidationCrossingFrameBoundaries())
+ invalidateDisplayItemClientForNonCompositingDescendantsRecursive(*paintInvalidationLayer->layoutObject(), *this);
+ }
+}
+
void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& paintInvalidationContainer) const
{
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698