| 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(); |
| 207 |
| 208 // If the transformedAncestor is actually the RenderView, we might get |
| 209 // confused and think that we can use LayoutState. Ideally, we'd made |
| 210 // LayoutState work for all composited layers as well, but until then |
| 211 // we need to disable LayoutState for squashed layers. |
| 212 LayoutStateDisabler layoutStateDisabler(*transformedAncestor); |
| 213 |
| 206 // This code adjusts the repaint rectangle to be in the space of the tra
nsformed ancestor of the grouped (i.e. squashed) | 214 // This code adjusts the repaint rectangle to be in the space of the tra
nsformed ancestor of the grouped (i.e. squashed) |
| 207 // layer. This is because all layers that squash together need to repain
t w.r.t. a single container that is | 215 // layer. This is because all layers that squash together need to repain
t w.r.t. a single container that is |
| 208 // an ancestor of all of them, in order to properly take into account an
y local transforms etc. | 216 // an ancestor of all of them, in order to properly take into account an
y local transforms etc. |
| 209 // FIXME: remove this special-case code that works around the repainting
code structure. | 217 // FIXME: remove this special-case code that works around the repainting
code structure. |
| 210 m_renderer.computeRectForRepaint(m_renderer.layer()->enclosingTransforme
dAncestor()->renderer(), updatedRect); | 218 m_renderer.computeRectForRepaint(transformedAncestor, updatedRect); |
| 211 updatedRect.moveBy(-m_renderer.layer()->groupedMapping()->squashingOffse
tFromTransformedAncestor()); | 219 updatedRect.moveBy(-m_renderer.layer()->groupedMapping()->squashingOffse
tFromTransformedAncestor()); |
| 212 | 220 |
| 213 IntRect repaintRect = pixelSnappedIntRect(updatedRect); | 221 IntRect repaintRect = pixelSnappedIntRect(updatedRect); |
| 214 if (GraphicsLayer* squashingLayer = m_renderer.groupedMapping()->squashi
ngLayer()) | 222 if (GraphicsLayer* squashingLayer = m_renderer.groupedMapping()->squashi
ngLayer()) |
| 215 squashingLayer->setNeedsDisplayInRect(repaintRect); | 223 squashingLayer->setNeedsDisplayInRect(repaintRect); |
| 216 } else { | 224 } else { |
| 217 IntRect repaintRect = pixelSnappedIntRect(r); | 225 IntRect repaintRect = pixelSnappedIntRect(r); |
| 218 m_renderer.compositedLayerMapping()->setContentsNeedDisplayInRect(repain
tRect); | 226 m_renderer.compositedLayerMapping()->setContentsNeedDisplayInRect(repain
tRect); |
| 219 } | 227 } |
| 220 } | 228 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 269 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
| 262 { | 270 { |
| 263 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 271 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
| 264 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()) |
| 265 return const_cast<RenderLayer*>(curr); | 273 return const_cast<RenderLayer*>(curr); |
| 266 } | 274 } |
| 267 return 0; | 275 return 0; |
| 268 } | 276 } |
| 269 | 277 |
| 270 } // Namespace WebCore | 278 } // Namespace WebCore |
| OLD | NEW |