| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Until those states are fully fledged, I'll just disable the ASSERTS. | 66 // Until those states are fully fledged, I'll just disable the ASSERTS. |
| 67 DisableCompositingQueryAsserts disabler; | 67 DisableCompositingQueryAsserts disabler; |
| 68 if (m_renderer.layer()->hasVisibleContent()) { | 68 if (m_renderer.layer()->hasVisibleContent()) { |
| 69 RenderView* view = m_renderer.view(); | 69 RenderView* view = m_renderer.view(); |
| 70 ASSERT(view); | 70 ASSERT(view); |
| 71 // FIXME: LayoutState does not work with RenderLayers as there is not a
1-to-1 | 71 // FIXME: LayoutState does not work with RenderLayers as there is not a
1-to-1 |
| 72 // mapping between them and the RenderObjects. It would be neat to enabl
e | 72 // mapping between them and the RenderObjects. It would be neat to enabl
e |
| 73 // LayoutState outside the layout() phase and use it here. | 73 // LayoutState outside the layout() phase and use it here. |
| 74 ASSERT(!view->layoutStateEnabled()); | 74 ASSERT(!view->layoutStateEnabled()); |
| 75 | 75 |
| 76 RenderLayerModelObject* repaintContainer = m_renderer.containerForRepain
t(); | 76 const RenderLayerModelObject* repaintContainer = m_renderer.containerFor
Repaint(); |
| 77 LayoutRect oldRepaintRect = m_repaintRect; | 77 LayoutRect oldRepaintRect = m_repaintRect; |
| 78 LayoutPoint oldOffset = m_offset; | 78 LayoutPoint oldOffset = m_offset; |
| 79 computeRepaintRects(repaintContainer); | 79 computeRepaintRects(repaintContainer); |
| 80 shouldCheckForRepaint &= shouldRepaintLayer(); | 80 shouldCheckForRepaint &= shouldRepaintLayer(); |
| 81 | 81 |
| 82 if (shouldCheckForRepaint) { | 82 if (shouldCheckForRepaint) { |
| 83 if (view && !view->document().printing()) { | 83 if (view && !view->document().printing()) { |
| 84 if (m_repaintStatus & NeedsFullRepaint) { | 84 if (m_repaintStatus & NeedsFullRepaint) { |
| 85 m_renderer.repaintUsingContainer(repaintContainer, pixelSnap
pedIntRect(oldRepaintRect), InvalidationLayer); | 85 m_renderer.repaintUsingContainer(repaintContainer, pixelSnap
pedIntRect(oldRepaintRect), InvalidationLayer); |
| 86 if (m_repaintRect != oldRepaintRect) | 86 if (m_repaintRect != oldRepaintRect) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 if (m_repaintStatus != NeedsFullRepaintForPositionedMovementLayout) | 137 if (m_repaintStatus != NeedsFullRepaintForPositionedMovementLayout) |
| 138 return true; | 138 return true; |
| 139 | 139 |
| 140 // Composited layers that were moved during a positioned movement only | 140 // Composited layers that were moved during a positioned movement only |
| 141 // layout, don't need to be repainted. They just need to be recomposited. | 141 // layout, don't need to be repainted. They just need to be recomposited. |
| 142 return m_renderer.compositingState() != PaintsIntoOwnBacking; | 142 return m_renderer.compositingState() != PaintsIntoOwnBacking; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Since we're only painting non-composited layers, we know that they all share
the same repaintContainer. | 145 // Since we're only painting non-composited layers, we know that they all share
the same repaintContainer. |
| 146 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer
ModelObject* repaintContainer) | 146 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(const Rende
rLayerModelObject* repaintContainer) |
| 147 { | 147 { |
| 148 m_renderer.repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_ren
derer.clippedOverflowRectForRepaint(repaintContainer)), InvalidationLayer); | 148 m_renderer.repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_ren
derer.clippedOverflowRectForRepaint(repaintContainer)), InvalidationLayer); |
| 149 | 149 |
| 150 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr
->nextSibling()) { | 150 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr
->nextSibling()) { |
| 151 if (!curr->hasCompositedLayerMapping()) | 151 if (!curr->hasCompositedLayerMapping()) |
| 152 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC
ontainer); | 152 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC
ontainer); |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
const | 156 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
const |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 269 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
| 270 { | 270 { |
| 271 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 271 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
| 272 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 272 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
| 273 return const_cast<RenderLayer*>(curr); | 273 return const_cast<RenderLayer*>(curr); |
| 274 } | 274 } |
| 275 return 0; | 275 return 0; |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // Namespace WebCore | 278 } // Namespace WebCore |
| OLD | NEW |