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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 if (!context.usesCache()) { | 353 if (!context.usesCache()) { |
354 parentClipper.calculateClipRects(context, clipRects); | 354 parentClipper.calculateClipRects(context, clipRects); |
355 return; | 355 return; |
356 } | 356 } |
357 | 357 |
358 clipRects = *parentClipper.updateClipRects(context); | 358 clipRects = *parentClipper.updateClipRects(context); |
359 } | 359 } |
360 | 360 |
361 RenderLayer* RenderLayerClipper::clippingRootForPainting() const | 361 RenderLayer* RenderLayerClipper::clippingRootForPainting() const |
362 { | 362 { |
363 if (m_renderer.hasCompositedLayerMapping() || m_renderer.groupedMapping()) | 363 const RenderLayer* current = m_renderer.layer(); |
364 return const_cast<RenderLayer*>(m_renderer.layer()); | 364 // FIXME: getting rid of current->hasCompositedLayerMapping() here breaks th
e |
| 365 // compositing/backing/no-backing-for-clip.html layout test, because there i
s a |
| 366 // "composited but paints into ancestor" layer involved. However, it doesn't
make sense that |
| 367 // that check would be appropriate here but not inside the while loop below. |
| 368 if (current->isPaintInvalidationContainer() || current->hasCompositedLayerMa
pping()) |
| 369 return const_cast<RenderLayer*>(current); |
365 | 370 |
366 const RenderLayer* current = m_renderer.layer(); | |
367 while (current) { | 371 while (current) { |
368 if (current->isRootLayer()) | 372 if (current->isRootLayer()) |
369 return const_cast<RenderLayer*>(current); | 373 return const_cast<RenderLayer*>(current); |
370 | 374 |
371 current = current->compositingContainer(); | 375 current = current->compositingContainer(); |
372 ASSERT(current); | 376 ASSERT(current); |
373 if (current->transform() || (current->compositingState() == PaintsIntoOw
nBacking) || current->groupedMapping()) | 377 if (current->transform() || current->isPaintInvalidationContainer()) |
374 return const_cast<RenderLayer*>(current); | 378 return const_cast<RenderLayer*>(current); |
375 } | 379 } |
376 | 380 |
377 ASSERT_NOT_REACHED(); | 381 ASSERT_NOT_REACHED(); |
378 return 0; | 382 return 0; |
379 } | 383 } |
380 | 384 |
381 } // namespace WebCore | 385 } // namespace WebCore |
OLD | NEW |