Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 6a6f83e19b7eaf5ab404a4ce132e23413144530b..6f895a94a8ed36348ebe31ed62feb63a479142b8 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 and current paint rects to meet the expectations of some callers in some cases: |
dsinclair
2014/07/25 14:16:31
Can we add a crbug for this and block it on the tw
Xianzhu
2014/07/25 17:02:05
Done.
|
+ // - 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(); |
} |
} |