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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 return; | 196 return; |
197 | 197 |
198 RenderView* view = m_renderer.view(); | 198 RenderView* view = m_renderer.view(); |
199 if (view) | 199 if (view) |
200 view->repaintViewRectangle(absRect); | 200 view->repaintViewRectangle(absRect); |
201 return; | 201 return; |
202 } | 202 } |
203 if (m_renderer.compositingState() == PaintsIntoGroupedBacking) { | 203 if (m_renderer.compositingState() == PaintsIntoGroupedBacking) { |
204 LayoutRect updatedRect(r); | 204 LayoutRect updatedRect(r); |
205 | 205 |
206 RenderLayerModelObject* transformedAncestor = m_renderer.layer()->enclos
ingTransformedAncestor()->renderer(); | 206 ASSERT(m_renderer.layer()); |
| 207 ASSERT(m_renderer.layer()->enclosingTransformedAncestor()); |
| 208 ASSERT(m_renderer.layer()->enclosingTransformedAncestor()->renderer()); |
| 209 |
| 210 // FIXME: this defensive code should not have to exist. None of these po
inters should ever be 0. See crbug.com/370410. |
| 211 RenderLayerModelObject* transformedAncestor = 0; |
| 212 if (RenderLayer* ancestor = m_renderer.layer()->enclosingTransformedAnce
stor()) |
| 213 transformedAncestor = ancestor->renderer(); |
| 214 if (!transformedAncestor) |
| 215 return; |
207 | 216 |
208 // If the transformedAncestor is actually the RenderView, we might get | 217 // If the transformedAncestor is actually the RenderView, we might get |
209 // confused and think that we can use LayoutState. Ideally, we'd made | 218 // confused and think that we can use LayoutState. Ideally, we'd made |
210 // LayoutState work for all composited layers as well, but until then | 219 // LayoutState work for all composited layers as well, but until then |
211 // we need to disable LayoutState for squashed layers. | 220 // we need to disable LayoutState for squashed layers. |
212 LayoutStateDisabler layoutStateDisabler(*transformedAncestor); | 221 LayoutStateDisabler layoutStateDisabler(*transformedAncestor); |
213 | 222 |
214 // This code adjusts the repaint rectangle to be in the space of the tra
nsformed ancestor of the grouped (i.e. squashed) | 223 // This code adjusts the repaint rectangle to be in the space of the tra
nsformed ancestor of the grouped (i.e. squashed) |
215 // layer. This is because all layers that squash together need to repain
t w.r.t. a single container that is | 224 // layer. This is because all layers that squash together need to repain
t w.r.t. a single container that is |
216 // an ancestor of all of them, in order to properly take into account an
y local transforms etc. | 225 // an ancestor of all of them, in order to properly take into account an
y local transforms etc. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 278 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
270 { | 279 { |
271 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 280 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()) | 281 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
273 return const_cast<RenderLayer*>(curr); | 282 return const_cast<RenderLayer*>(curr); |
274 } | 283 } |
275 return 0; | 284 return 0; |
276 } | 285 } |
277 | 286 |
278 } // Namespace WebCore | 287 } // Namespace WebCore |
OLD | NEW |