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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD
escendants()); | 103 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD
escendants()); |
104 } | 104 } |
105 return repaintRect; | 105 return repaintRect; |
106 } | 106 } |
107 | 107 |
108 void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r) | 108 void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r) |
109 { | 109 { |
110 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
crash here, | 110 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
crash here, |
111 // so assert but check that the layer is composited. | 111 // so assert but check that the layer is composited. |
112 ASSERT(m_renderer.compositingState() != NotComposited); | 112 ASSERT(m_renderer.compositingState() != NotComposited); |
113 if (m_renderer.compositingState() == NotComposited) { | |
114 // If we're trying to repaint the placeholder document layer, propagate
the | |
115 // repaint to the native view system. | |
116 LayoutRect absRect(r); | |
117 LayoutPoint delta; | |
118 m_renderer.layer()->convertToLayerCoords(m_renderer.layer()->root(), del
ta); | |
119 absRect.moveBy(delta); | |
120 | |
121 if (absRect.isEmpty()) | |
122 return; | |
123 | |
124 RenderView* view = m_renderer.view(); | |
125 if (view) | |
126 view->invalidatePaintForRectangle(absRect); | |
127 return; | |
128 } | |
129 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squasphing-agnostic. | 113 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squasphing-agnostic. |
130 if (m_renderer.layer()->groupedMapping()) { | 114 if (m_renderer.layer()->groupedMapping()) { |
131 LayoutRect repaintRect = r; | 115 LayoutRect repaintRect = r; |
132 repaintRect.move(m_renderer.layer()->subpixelAccumulation()); | 116 repaintRect.move(m_renderer.layer()->subpixelAccumulation()); |
133 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) | 117 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) |
134 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(repaintRec
t)); | 118 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(repaintRec
t)); |
135 } else { | 119 } else { |
136 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r); | 120 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r); |
137 } | 121 } |
138 } | 122 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 162 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
179 { | 163 { |
180 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 164 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
181 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 165 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
182 return const_cast<RenderLayer*>(curr); | 166 return const_cast<RenderLayer*>(curr); |
183 } | 167 } |
184 return 0; | 168 return 0; |
185 } | 169 } |
186 | 170 |
187 } // namespace blink | 171 } // namespace blink |
OLD | NEW |