| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void RenderLayerRepainter::clearRepaintRects() | 101 void RenderLayerRepainter::clearRepaintRects() |
| 102 { | 102 { |
| 103 ASSERT(!m_renderer.layer()->hasVisibleContent()); | 103 ASSERT(!m_renderer.layer()->hasVisibleContent()); |
| 104 | 104 |
| 105 m_repaintRect = IntRect(); | 105 m_repaintRect = IntRect(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void RenderLayerRepainter::computeRepaintRects() | 108 void RenderLayerRepainter::computeRepaintRects() |
| 109 { | 109 { |
| 110 const RenderLayerModelObject* repaintContainer = m_renderer.containerForRepa
int(); | 110 const RenderLayerModelObject* repaintContainer = m_renderer.containerForRepa
int(); |
| 111 LayoutRect repaintRect = m_renderer.boundsRectForRepaint(repaintContainer); |
| 111 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | 112 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { |
| 112 // FIXME: We want RenderLayerRepainter to go away when | 113 // FIXME: We want RenderLayerRepainter to go away when |
| 113 // 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 |
| 114 // handle this update. | 115 // handle this update. |
| 115 m_renderer.setPreviousRepaintRect(m_renderer.computeRepaintRect()); | 116 m_renderer.setPreviousRepaintRect(repaintRect); |
| 116 } else { | 117 } else { |
| 117 m_repaintRect = m_renderer.computeRepaintRect(); | 118 m_repaintRect = repaintRect; |
| 118 m_offset = m_renderer.positionFromRepaintContainer(repaintContainer); | 119 m_offset = m_renderer.positionFromRepaintContainer(repaintContainer); |
| 119 } | 120 } |
| 120 } | 121 } |
| 121 | 122 |
| 122 void RenderLayerRepainter::computeRepaintRectsIncludingDescendants() | 123 void RenderLayerRepainter::computeRepaintRectsIncludingDescendants() |
| 123 { | 124 { |
| 124 // 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. |
| 125 // We should make this more efficient. | 126 // We should make this more efficient. |
| 126 // 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
. |
| 127 computeRepaintRects(); | 128 computeRepaintRects(); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 258 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
| 258 { | 259 { |
| 259 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 260 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
| 260 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 261 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
| 261 return const_cast<RenderLayer*>(curr); | 262 return const_cast<RenderLayer*>(curr); |
| 262 } | 263 } |
| 263 return 0; | 264 return 0; |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // Namespace WebCore | 267 } // Namespace WebCore |
| OLD | NEW |