Chromium Code Reviews| Index: Source/core/rendering/RenderLayerRepainter.cpp |
| diff --git a/Source/core/rendering/RenderLayerRepainter.cpp b/Source/core/rendering/RenderLayerRepainter.cpp |
| index 595431fa03737e99e3ad08967d41ad64011efeba..c898f4021751c905b2e8227ab74e0ea2a055cc7d 100644 |
| --- a/Source/core/rendering/RenderLayerRepainter.cpp |
| +++ b/Source/core/rendering/RenderLayerRepainter.cpp |
| @@ -135,7 +135,9 @@ void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer |
| m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_renderer->clippedOverflowRectForRepaint(repaintContainer))); |
| for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = curr->nextSibling()) { |
| - if (!curr->compositedLayerMapping()) |
| + // FIXME: we also want to paint those layers who have a backing but paint into |
| + // our repaint container. |
| + if (curr->compositingState() == NotComposited) |
|
shawnsingh
2013/11/12 09:55:50
I don't understand this FIXME... why cant we just
Ian Vollick
2013/11/14 04:12:47
Ah right. We want to paint those layers that paint
|
| curr->repainter().repaintIncludingNonCompositingDescendants(repaintContainer); |
| } |
| } |
| @@ -145,7 +147,9 @@ LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants() |
| LayoutRect repaintRect = m_repaintRect; |
| for (RenderLayer* child = m_renderer->layer()->firstChild(); child; child = child->nextSibling()) { |
| // Don't include repaint rects for composited child layers; they will paint themselves and have a different origin. |
| - if (child->compositedLayerMapping()) |
| + // FIXME: we also want to include those layers who have a backing but paint into |
| + // our repaint container. |
| + if (child->compositingState() != NotComposited) |
|
shawnsingh
2013/11/12 09:55:50
This code doesn't seem to require a FIXME, either?
Ian Vollick
2013/11/14 04:12:47
Same as above.
|
| continue; |
| repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingDescendants()); |
| @@ -155,7 +159,7 @@ LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants() |
| void RenderLayerRepainter::setBackingNeedsRepaint() |
| { |
| - ASSERT(m_renderer->compositedLayerMapping()); |
| + ASSERT(m_renderer->hasCompositedLayerMapping()); |
| m_renderer->compositedLayerMapping()->setContentsNeedDisplay(); |
| } |
| @@ -163,8 +167,8 @@ void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r) |
| { |
| // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, |
| // so assert but check that the layer is composited. |
| - ASSERT(m_renderer->compositedLayerMapping()); |
| - if (!m_renderer->compositedLayerMapping()) { |
| + ASSERT(m_renderer->hasCompositedLayerMapping()); |
| + if (!m_renderer->hasCompositedLayerMapping()) { |
| // If we're trying to repaint the placeholder document layer, propagate the |
| // repaint to the native view system. |
| LayoutRect absRect(r); |
| @@ -212,7 +216,7 @@ void RenderLayerRepainter::setFilterBackendNeedsRepaintingInRect(const LayoutRec |
| FloatQuad repaintQuad(rectForRepaint); |
| LayoutRect parentLayerRect = m_renderer->localToContainerQuad(repaintQuad, parentLayer->renderer()).enclosingBoundingBox(); |
| - if (parentLayer->compositedLayerMapping()) { |
| + if (parentLayer->compositingState() == PaintsIntoOwnBacking) { |
| parentLayer->repainter().setBackingNeedsRepaintInRect(parentLayerRect); |
| return; |
| } |