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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // FIXME: it's not clear how this layer not having clip rects guarantees tha
t no descendants have any. | 121 // FIXME: it's not clear how this layer not having clip rects guarantees tha
t no descendants have any. |
122 if (!m_cache) | 122 if (!m_cache) |
123 return; | 123 return; |
124 | 124 |
125 m_cache->clear(cacheSlot); | 125 m_cache->clear(cacheSlot); |
126 | 126 |
127 for (RenderLayer* layer = m_renderer.layer()->firstChild(); layer; layer = l
ayer->nextSibling()) | 127 for (RenderLayer* layer = m_renderer.layer()->firstChild(); layer; layer = l
ayer->nextSibling()) |
128 layer->clipper().clearClipRectsIncludingDescendants(cacheSlot); | 128 layer->clipper().clearClipRectsIncludingDescendants(cacheSlot); |
129 } | 129 } |
130 | 130 |
131 void RenderLayerClipper::clearClipRects() | |
132 { | |
133 m_cache = nullptr; | |
134 } | |
135 | |
136 LayoutRect RenderLayerClipper::childrenClipRect() const | 131 LayoutRect RenderLayerClipper::childrenClipRect() const |
137 { | 132 { |
138 // FIXME: border-radius not accounted for. | 133 // FIXME: border-radius not accounted for. |
139 // FIXME: Regions not accounted for. | 134 // FIXME: Regions not accounted for. |
140 RenderLayer* clippingRootLayer = clippingRootForPainting(); | 135 RenderLayer* clippingRootLayer = clippingRootForPainting(); |
141 LayoutRect layerBounds; | 136 LayoutRect layerBounds; |
142 ClipRect backgroundRect, foregroundRect, outlineRect; | 137 ClipRect backgroundRect, foregroundRect, outlineRect; |
143 // Need to use uncached clip rects, because the value of 'dontClipToOverflow
' may be different from the painting path (<rdar://problem/11844909>). | 138 // Need to use uncached clip rects, because the value of 'dontClipToOverflow
' may be different from the painting path (<rdar://problem/11844909>). |
144 ClipRectsContext context(clippingRootLayer, UncachedClipRects); | 139 ClipRectsContext context(clippingRootLayer, UncachedClipRects); |
145 calculateRects(context, m_renderer.view()->unscaledDocumentRect(), layerBoun
ds, backgroundRect, foregroundRect, outlineRect); | 140 calculateRects(context, m_renderer.view()->unscaledDocumentRect(), layerBoun
ds, backgroundRect, foregroundRect, outlineRect); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 ASSERT(current); | 371 ASSERT(current); |
377 if (current->transform() || current->isPaintInvalidationContainer()) | 372 if (current->transform() || current->isPaintInvalidationContainer()) |
378 return const_cast<RenderLayer*>(current); | 373 return const_cast<RenderLayer*>(current); |
379 } | 374 } |
380 | 375 |
381 ASSERT_NOT_REACHED(); | 376 ASSERT_NOT_REACHED(); |
382 return 0; | 377 return 0; |
383 } | 378 } |
384 | 379 |
385 } // namespace WebCore | 380 } // namespace WebCore |
OLD | NEW |