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

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: Nits 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 6a6f83e19b7eaf5ab404a4ce132e23413144530b..7f4d1f64fd5c61027fb5028ab8b204f59fd3f906 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1530,8 +1530,15 @@ void RenderObject::paintInvalidationForWholeRenderer() const
// Until those states are fully fledged, I'll just disable the ASSERTS.
DisableCompositingQueryAsserts disabler;
const RenderLayerModelObject* paintInvalidationContainer = containerForPaintInvalidation();
+
+ // FIXME: We should invalidate previousPaintInvalidationRect, but for now we invalidate both the previous
Julien - ping for review 2014/07/28 16:57:05 s/invalidate/invalidate only/?
Xianzhu 2014/07/28 17:32:31 Done.
+ // and current paint rects to meet the expectations of some callers in some cases (crbug.com/397555):
+ // - transform style change without a layout - crbug.com/394004;
+ // - objects that don't save previousPaintInvalidationRect - crbug.com/394133.
LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInvalidationContainer);
invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationRect, InvalidationPaint);
+ if (paintInvalidationRect != previousPaintInvalidationRect())
+ invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintInvalidationRect(), InvalidationPaint);
}
LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
@@ -2062,7 +2069,7 @@ void RenderObject::setStyle(PassRefPtr<RenderStyle> style)
// comment in RenderObject::styleWillChange for why.
if (needsLayout())
setShouldDoFullPaintInvalidation(true);
- else if (!selfNeedsLayout())
+ else
paintInvalidationForWholeRenderer();
}
}

Powered by Google App Engine
This is Rietveld 408576698