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

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: Update expectations 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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.h » ('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 02136cb7a7bae8e31da6f3e93162eab23148b6ba..3a394e10ebb2c0399fa370abd56b0e8bf5af9e37 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1800,7 +1800,7 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style)
}
if (updatedDiff.needsPaintInvalidationLayer())
- toLayoutBoxModelObject(this)->layer()->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
+ setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvalidationObject())
setShouldDoFullPaintInvalidation();
}
@@ -3259,6 +3259,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
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/paint/DeprecatedPaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698