Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
index abb627ea2e9225dea5c999b9a37b733cd1791744..16824b6285e30a14f89ffa599081cc40a1285f76 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -2471,11 +2471,18 @@ void FrameView::synchronizedPaint(const LayoutRect& interestRect) |
void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer, const LayoutRect& interestRect) |
{ |
- if (graphicsLayer->needsDisplay()) { |
- // TODO(chrishtr): implement interest rects. |
- GraphicsContext context(graphicsLayer->displayItemList()); |
- graphicsLayer->paint(context, roundedIntRect(interestRect)); |
+ GraphicsContext context(graphicsLayer->displayItemList()); |
+ // TODO(chrishtr): fix unit tests to not inject one-off interest rects. |
+ if (IntRect(interestRect) != LayoutRect::infiniteIntRect()) { |
+ if (graphicsLayer->needsDisplay()) { |
+ graphicsLayer->paint(context, roundedIntRect(interestRect)); |
+ |
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
+ graphicsLayer->commitIfNeeded(); |
+ } |
+ } else { |
+ graphicsLayer->paintIfNeeded(context); |
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
graphicsLayer->commitIfNeeded(); |
} |