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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 // For transformed layers, the root layer was shifted to be us, so there is no need to | 237 // For transformed layers, the root layer was shifted to be us, so there is no need to |
238 // examine the parent. We want to cache clip rects with us as the root. | 238 // examine the parent. We want to cache clip rects with us as the root. |
239 RenderLayer* parentLayer = !isClippingRoot ? m_renderer.layer()->parent() : 0; | 239 RenderLayer* parentLayer = !isClippingRoot ? m_renderer.layer()->parent() : 0; |
240 | 240 |
241 // Ensure that our parent's clip has been calculated so that we can examine the values. | 241 // Ensure that our parent's clip has been calculated so that we can examine the values. |
242 if (parentLayer) { | 242 if (parentLayer) { |
243 // FIXME: Why don't we just call updateClipRects here? | 243 // FIXME: Why don't we just call updateClipRects here? |
244 if (context.usesCache() && parentLayer->clipper().cachedClipRects(contex t)) { | 244 if (context.usesCache() && parentLayer->clipper().cachedClipRects(contex t)) { |
245 clipRects = *parentLayer->clipper().cachedClipRects(context); | 245 clipRects = *parentLayer->clipper().cachedClipRects(context); |
246 } else { | 246 } else { |
247 ClipRectsContext parentContext(context); | 247 parentLayer->clipper().calculateClipRects(context, clipRects); |
248 parentContext.scrollbarRelevancy = IgnoreOverlayScrollbarSize; // FI XME: why? | |
chrishtr
2014/06/27 22:00:29
Does IgnoreOverlayScrollbarSize ever do anything h
| |
249 parentLayer->clipper().calculateClipRects(parentContext, clipRects); | |
250 } | 248 } |
251 } else { | 249 } else { |
252 clipRects.reset(PaintInfo::infiniteRect()); | 250 clipRects.reset(PaintInfo::infiniteRect()); |
253 } | 251 } |
254 | 252 |
255 // A fixed object is essentially the root of its containing block hierarchy, so when | 253 // A fixed object is essentially the root of its containing block hierarchy, so when |
256 // we encounter such an object, we reset our clip rects to the fixedClipRect . | 254 // we encounter such an object, we reset our clip rects to the fixedClipRect . |
257 if (m_renderer.style()->position() == FixedPosition) { | 255 if (m_renderer.style()->position() == FixedPosition) { |
258 clipRects.setPosClipRect(clipRects.fixedClipRect()); | 256 clipRects.setPosClipRect(clipRects.fixedClipRect()); |
259 clipRects.setOverflowClipRect(clipRects.fixedClipRect()); | 257 clipRects.setOverflowClipRect(clipRects.fixedClipRect()); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 ASSERT(current); | 369 ASSERT(current); |
372 if (current->transform() || current->isPaintInvalidationContainer()) | 370 if (current->transform() || current->isPaintInvalidationContainer()) |
373 return const_cast<RenderLayer*>(current); | 371 return const_cast<RenderLayer*>(current); |
374 } | 372 } |
375 | 373 |
376 ASSERT_NOT_REACHED(); | 374 ASSERT_NOT_REACHED(); |
377 return 0; | 375 return 0; |
378 } | 376 } |
379 | 377 |
380 } // namespace WebCore | 378 } // namespace WebCore |
OLD | NEW |