Index: Source/core/rendering/RenderView.cpp |
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp |
index e03ec3d79228cc71ba969447be9e8a7df78cbb1b..6eb8e8effbb9f9df4a71918d4b245a05304e9916 100644 |
--- a/Source/core/rendering/RenderView.cpp |
+++ b/Source/core/rendering/RenderView.cpp |
@@ -445,6 +445,19 @@ void RenderView::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&) |
} |
} |
+void RenderView::invalidateTreeAfterLayout(const RenderLayerModelObject& paintInvalidationContainer) |
+{ |
+ ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); |
+ ASSERT(!needsLayout()); |
+ |
+ // We specifically need to repaint the viewRect since other renderers |
+ // short-circuit on full-repaint. |
+ if (doingFullRepaint() && !viewRect().isEmpty()) |
+ repaintViewRectangle(viewRect()); |
+ |
+ RenderBlock::invalidateTreeAfterLayout(paintInvalidationContainer); |
+} |
+ |
void RenderView::repaintViewRectangle(const LayoutRect& ur) const |
{ |
ASSERT(!ur.isEmpty()); |
@@ -455,9 +468,12 @@ void RenderView::repaintViewRectangle(const LayoutRect& ur) const |
// We always just invalidate the root view, since we could be an iframe that is clipped out |
// or even invisible. |
Element* elt = document().ownerElement(); |
- if (!elt) |
- m_frameView->repaintContentRectangle(pixelSnappedIntRect(ur)); |
- else if (RenderBox* obj = elt->renderBox()) { |
+ if (!elt) { |
+ if (hasLayer() && layer()->compositingState() == PaintsIntoOwnBacking) |
+ layer()->repainter().setBackingNeedsRepaintInRect(ur); |
+ else |
+ m_frameView->repaintContentRectangle(pixelSnappedIntRect(ur)); |
+ } else if (RenderBox* obj = elt->renderBox()) { |
LayoutRect vr = viewRect(); |
LayoutRect r = intersection(ur, vr); |