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

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

Issue 1164713010: Invalidate non-composited subtree on needsPaintInvalidationLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index da3f4f0bef5a2227494fd688dd5881ee0f33e968..f047556189392cb6f84734f62415a05a2f172ef7 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1802,7 +1802,7 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style)
}
if (updatedDiff.needsPaintInvalidationLayer())
- toLayoutBoxModelObject(this)->layer()->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
+ setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvalidationObject())
setShouldDoFullPaintInvalidation();
}
@@ -3273,6 +3273,22 @@ void LayoutObject::invalidatePaintIncludingNonCompositingDescendantsInternal(con
}
}
+static void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsInternal(LayoutObject* object)
+{
+ object->setShouldDoFullPaintInvalidation();
+ for (LayoutObject* child = object->slowFirstChild(); child; child = child->nextSibling()) {
+ if (!child->isPaintInvalidationContainer())
+ setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsInternal(child);
+ }
+}
+
+// FIXME: If we had a flag to force invalidations in a whole subtree, we could get rid of this function (crbug.com/410097).
+void LayoutObject::setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants()
+{
+ // Need to access the current compositing status.
+ DisableCompositingQueryAsserts disabler;
+ setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsInternal(this);
+}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698