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

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

Issue 1337233002: Invalidate paint when allocating a DeprecatedPaintLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 8595619d09ae7b2001bc6f3568787551c5f98e58..565f0c662b65ecbb752446313a0509fcb721ef88 100644
--- a/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/Source/core/layout/LayoutBoxModelObject.cpp
@@ -284,6 +284,13 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff, const ComputedSt
void LayoutBoxModelObject::createLayer(DeprecatedPaintLayerType type)
{
+ DisablePaintInvalidationStateAsserts invalidationDisabler;
+ DisableCompositingQueryAsserts compositingDisabler;
+
+ // Acquiring a DeprecatedPaintLayer may change the paint invalidation container. Therefore we must eagerly
+ // invalidate paint for this object before creating the layer.
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && isRooted())
pdr. 2015/09/14 23:29:26 Can you put the disablers in this block?
+ invalidatePaintIncludingNonCompositingDescendants();
ASSERT(!m_layer);
m_layer = adoptPtr(new DeprecatedPaintLayer(this, type));
setHasLayer(true);

Powered by Google App Engine
This is Rietveld 408576698