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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // FIXME: We want RenderLayerRepainter to go away when | 113 // FIXME: We want RenderLayerRepainter to go away when |
114 // repaint-after-layout is on by default so we need to figure out how to | 114 // repaint-after-layout is on by default so we need to figure out how to |
115 // handle this update. | 115 // handle this update. |
116 m_renderer.setPreviousPaintInvalidationRect(repaintRect); | 116 m_renderer.setPreviousPaintInvalidationRect(repaintRect); |
117 } else { | 117 } else { |
118 m_repaintRect = repaintRect; | 118 m_repaintRect = repaintRect; |
119 m_offset = m_renderer.positionFromRepaintContainer(repaintContainer); | 119 m_offset = m_renderer.positionFromRepaintContainer(repaintContainer); |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 void RenderLayerRepainter::computeRepaintRectsIncludingDescendants() | 123 void RenderLayerRepainter::computeRepaintRectsIncludingNonCompositingDescendants
() |
124 { | 124 { |
125 // FIXME: computeRepaintRects() has to walk up the parent chain for every la
yer to compute the rects. | 125 // FIXME: computeRepaintRects() has to walk up the parent chain for every la
yer to compute the rects. |
126 // We should make this more efficient. | 126 // We should make this more efficient. |
127 // FIXME: it's wrong to call this when layout is not up-to-date, which we do
. | 127 // FIXME: it's wrong to call this when layout is not up-to-date, which we do
. |
128 computeRepaintRects(); | 128 computeRepaintRects(); |
129 | 129 |
130 for (RenderLayer* layer = m_renderer.layer()->firstChild(); layer; layer = l
ayer->nextSibling()) | 130 for (RenderLayer* layer = m_renderer.layer()->firstChild(); layer; layer = l
ayer->nextSibling()) { |
131 layer->repainter().computeRepaintRectsIncludingDescendants(); | 131 if (layer->compositingState() != PaintsIntoOwnBacking && layer->composit
ingState() != PaintsIntoGroupedBacking) |
| 132 layer->repainter().computeRepaintRectsIncludingNonCompositingDescend
ants(); |
| 133 } |
132 } | 134 } |
133 | 135 |
134 inline bool RenderLayerRepainter::shouldRepaintLayer() const | 136 inline bool RenderLayerRepainter::shouldRepaintLayer() const |
135 { | 137 { |
136 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 138 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
137 return false; | 139 return false; |
138 | 140 |
139 if (m_repaintStatus != NeedsFullRepaintForPositionedMovementLayout) | 141 if (m_repaintStatus != NeedsFullRepaintForPositionedMovementLayout) |
140 return true; | 142 return true; |
141 | 143 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 264 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
263 { | 265 { |
264 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 266 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
265 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 267 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
266 return const_cast<RenderLayer*>(curr); | 268 return const_cast<RenderLayer*>(curr); |
267 } | 269 } |
268 return 0; | 270 return 0; |
269 } | 271 } |
270 | 272 |
271 } // Namespace WebCore | 273 } // Namespace WebCore |
OLD | NEW |