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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 395463003: Invalidate previous paint rect in RenderObject::paintInvalidationForWholeRenderer() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplified Created 6 years, 5 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/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 612025741947dfc4a0327918231b98b6bb27393f..b70a74f19e4ee7af2bfcb3f2c5b3d6e53a79a3c7 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1531,7 +1531,10 @@ void RenderObject::paintInvalidationForWholeRenderer() const
// Until those states are fully fledged, I'll just disable the ASSERTS.
DisableCompositingQueryAsserts disabler;
const RenderLayerModelObject* paintInvalidationContainer = containerForPaintInvalidation();
- LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInvalidationContainer);
+
+ // FIXME: We should invalidate previousPaintInvalidationRect, but for objects that don't save previousPaintInvalidationRect,
+ // we have to use the current paint invalidation rect. crbug.com/394133.
+ LayoutRect paintInvalidationRect = savesPreviousPaintInvalidationRect() ? previousPaintInvalidationRect() : boundsRectForPaintInvalidation(paintInvalidationContainer);
invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationRect, InvalidationPaint);
}
@@ -2061,10 +2064,13 @@ void RenderObject::setStyle(PassRefPtr<RenderStyle> style)
// The paintInvalidationForWholeRenderer() call is needed for non-layout changes to style. See the corresponding
// comment in RenderObject::styleWillChange for why.
- if (needsLayout())
+ if (needsLayout()) {
setShouldDoFullPaintInvalidationAfterLayout(true);
- else if (!selfNeedsLayout())
+ } else {
+ if (savesPreviousPaintInvalidationRect())
+ setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containerForPaintInvalidation()));
leviw_travelin_and_unemployed 2014/07/16 23:06:48 Isn't this redundant with the change you're making
Xianzhu 2014/07/16 23:47:52 No. Actually this is paired with the change in pai
leviw_travelin_and_unemployed 2014/07/22 21:42:29 If we've ever put up a frame with the thing at the
Xianzhu 2014/07/22 21:53:52 This change has been abandoned. The above code was
paintInvalidationForWholeRenderer();
+ }
}
}
« Source/core/rendering/RenderObject.h ('K') | « Source/core/rendering/RenderObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698