| Index: Source/core/rendering/RenderView.cpp
|
| diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
|
| index 5957edda0b9d4d031ccceff3ccb6384ca88a5929..2a8a362e8794d6477e16653e7c5291bdcb72ac0a 100644
|
| --- a/Source/core/rendering/RenderView.cpp
|
| +++ b/Source/core/rendering/RenderView.cpp
|
| @@ -285,6 +285,10 @@
|
| return;
|
| }
|
| }
|
| +
|
| + // If a container was specified, and was not 0 or the RenderView,
|
| + // then we should have found it by now.
|
| + ASSERT_ARG(repaintContainer, !repaintContainer);
|
| }
|
|
|
| const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
|
| @@ -425,12 +429,8 @@
|
|
|
| // We specifically need to repaint the viewRect since other renderers
|
| // short-circuit on full-repaint.
|
| - LayoutRect dirtyRect = viewRect();
|
| - if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) {
|
| - const RenderLayerModelObject* paintInvalidationContainer = &paintInvalidationState.paintInvalidationContainer();
|
| - mapRectToPaintInvalidationBacking(paintInvalidationContainer, dirtyRect);
|
| - invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, InvalidationFull);
|
| - }
|
| + if (doingFullPaintInvalidation() && !viewRect().isEmpty())
|
| + invalidatePaintForRectangle(viewRect());
|
|
|
| RenderBlock::invalidateTreeIfNeeded(paintInvalidationState);
|
| }
|
| @@ -442,12 +442,24 @@
|
| if (document().printing() || !m_frameView)
|
| return;
|
|
|
| - ASSERT(layer()->compositingState() == PaintsIntoOwnBacking || !frame()->ownerRenderer());
|
| -
|
| + // We always just invalidate the root view, since we could be an iframe that is clipped out
|
| + // or even invisible.
|
| + Element* owner = document().ownerElement();
|
| if (layer()->compositingState() == PaintsIntoOwnBacking) {
|
| layer()->repainter().setBackingNeedsRepaintInRect(paintInvalidationRect);
|
| - } else {
|
| + } else if (!owner) {
|
| m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(paintInvalidationRect));
|
| + } else if (RenderBox* obj = owner->renderBox()) {
|
| + // Intersect the viewport with the paint invalidation rect.
|
| + LayoutRect viewRectangle = viewRect();
|
| + LayoutRect rectToInvalidate = intersection(paintInvalidationRect, viewRectangle);
|
| +
|
| + // Adjust for scroll offset of the view.
|
| + rectToInvalidate.moveBy(-viewRectangle.location());
|
| +
|
| + // Adjust for frame border.
|
| + rectToInvalidate.moveBy(obj->contentBoxRect().location());
|
| + obj->invalidatePaintRectangle(rectToInvalidate);
|
| }
|
| }
|
|
|
| @@ -464,6 +476,10 @@
|
|
|
| void RenderView::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, bool fixed, const PaintInvalidationState* paintInvalidationState) const
|
| {
|
| + // If a container was specified, and was not 0 or the RenderView,
|
| + // then we should have found it by now.
|
| + ASSERT_ARG(paintInvalidationContainer, !paintInvalidationContainer || paintInvalidationContainer == this);
|
| +
|
| if (document().printing())
|
| return;
|
|
|
| @@ -487,27 +503,6 @@
|
| // Apply our transform if we have one (because of full page zooming).
|
| if (!paintInvalidationContainer && layer() && layer()->transform())
|
| rect = layer()->transform()->mapRect(rect);
|
| -
|
| - ASSERT(paintInvalidationContainer);
|
| -
|
| - if (paintInvalidationContainer == this)
|
| - return;
|
| -
|
| - Element* owner = document().ownerElement();
|
| - if (!owner)
|
| - return;
|
| - if (RenderBox* obj = owner->renderBox()) {
|
| - // Intersect the viewport with the paint invalidation rect.
|
| - LayoutRect viewRectangle = viewRect();
|
| - rect.intersect(viewRectangle);
|
| -
|
| - // Adjust for scroll offset of the view.
|
| - rect.moveBy(-viewRectangle.location());
|
| -
|
| - // Adjust for frame border.
|
| - rect.moveBy(obj->contentBoxRect().location());
|
| - obj->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect);
|
| - }
|
| }
|
|
|
| void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
|
|
|