| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 | 119 |
| 120 inline bool RenderLayerRepainter::shouldRepaintAfterLayout() const | 120 inline bool RenderLayerRepainter::shouldRepaintAfterLayout() const |
| 121 { | 121 { |
| 122 if (m_repaintStatus == NeedsNormalRepaint) | 122 if (m_repaintStatus == NeedsNormalRepaint) |
| 123 return true; | 123 return true; |
| 124 | 124 |
| 125 // Composited layers that were moved during a positioned movement only | 125 // Composited layers that were moved during a positioned movement only |
| 126 // layout, don't need to be repainted. They just need to be recomposited. | 126 // layout, don't need to be repainted. They just need to be recomposited. |
| 127 ASSERT(m_repaintStatus == NeedsFullRepaintForPositionedMovementLayout); | 127 ASSERT(m_repaintStatus == NeedsFullRepaintForPositionedMovementLayout); |
| 128 return !m_renderer->isComposited() || (m_renderer->isComposited() && m_rende
rer->layer()->compositedLayerMapping()->paintsIntoCompositedAncestor()); | 128 return m_renderer->compositingState() != PaintsIntoOwnBacking; |
| 129 } | 129 } |
| 130 | 130 |
| 131 // Since we're only painting non-composited layers, we know that they all share
the same repaintContainer. | 131 // Since we're only painting non-composited layers, we know that they all share
the same repaintContainer. |
| 132 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer
ModelObject* repaintContainer) | 132 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer
ModelObject* repaintContainer) |
| 133 { | 133 { |
| 134 m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_re
nderer->clippedOverflowRectForRepaint(repaintContainer))); | 134 m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_re
nderer->clippedOverflowRectForRepaint(repaintContainer))); |
| 135 | 135 |
| 136 for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = cur
r->nextSibling()) { | 136 for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = cur
r->nextSibling()) { |
| 137 if (!curr->isComposited()) | 137 if (!curr->compositedLayerMapping()) |
| 138 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC
ontainer); | 138 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC
ontainer); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
const | 142 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants()
const |
| 143 { | 143 { |
| 144 LayoutRect repaintRect = m_repaintRect; | 144 LayoutRect repaintRect = m_repaintRect; |
| 145 for (RenderLayer* child = m_renderer->layer()->firstChild(); child; child =
child->nextSibling()) { | 145 for (RenderLayer* child = m_renderer->layer()->firstChild(); child; child =
child->nextSibling()) { |
| 146 // Don't include repaint rects for composited child layers; they will pa
int themselves and have a different origin. | 146 // Don't include repaint rects for composited child layers; they will pa
int themselves and have a different origin. |
| 147 if (child->isComposited()) | 147 if (child->compositedLayerMapping()) |
| 148 continue; | 148 continue; |
| 149 | 149 |
| 150 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD
escendants()); | 150 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD
escendants()); |
| 151 } | 151 } |
| 152 return repaintRect; | 152 return repaintRect; |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // Namespace WebCore | 155 } // Namespace WebCore |
| OLD | NEW |