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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 m_hasVisibleNonLayerContent = false; | 645 m_hasVisibleNonLayerContent = false; |
646 for (RenderObject* r = renderer()->slowFirstChild(); r; r = r->nextSibling()
) { | 646 for (RenderObject* r = renderer()->slowFirstChild(); r; r = r->nextSibling()
) { |
647 if (!r->hasLayer()) { | 647 if (!r->hasLayer()) { |
648 m_hasVisibleNonLayerContent = true; | 648 m_hasVisibleNonLayerContent = true; |
649 break; | 649 break; |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
653 m_hasNonCompositedChild = false; | 653 m_hasNonCompositedChild = false; |
654 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ | 654 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ |
655 if (child->compositingState() == NotComposited || child->compositingStat
e() == HasOwnBackingButPaintsIntoAncestor) { | 655 if (child->compositingState() == NotComposited) { |
656 m_hasNonCompositedChild = true; | 656 m_hasNonCompositedChild = true; |
657 return; | 657 return; |
658 } | 658 } |
659 } | 659 } |
660 } | 660 } |
661 | 661 |
662 // The descendant-dependent flags system is badly broken because we clean dirty | 662 // The descendant-dependent flags system is badly broken because we clean dirty |
663 // bits in upward tree walks, which means we need to call updateDescendantDepend
entFlags | 663 // bits in upward tree walks, which means we need to call updateDescendantDepend
entFlags |
664 // at every node in the tree to fully clean all the dirty bits. While we'll in | 664 // at every node in the tree to fully clean all the dirty bits. While we'll in |
665 // the process of fixing this issue, updateDescendantDependentFlagsForEntireSubt
ree | 665 // the process of fixing this issue, updateDescendantDependentFlagsForEntireSubt
ree |
(...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2391 | 2391 |
2392 if (m_groupedMapping) { | 2392 if (m_groupedMapping) { |
2393 ASSERT(compositor()->layerSquashingEnabled()); | 2393 ASSERT(compositor()->layerSquashingEnabled()); |
2394 ASSERT(!m_compositedLayerMapping); | 2394 ASSERT(!m_compositedLayerMapping); |
2395 return PaintsIntoGroupedBacking; | 2395 return PaintsIntoGroupedBacking; |
2396 } | 2396 } |
2397 | 2397 |
2398 if (!m_compositedLayerMapping) | 2398 if (!m_compositedLayerMapping) |
2399 return NotComposited; | 2399 return NotComposited; |
2400 | 2400 |
2401 if (compositedLayerMapping()->paintsIntoCompositedAncestor()) | |
2402 return HasOwnBackingButPaintsIntoAncestor; | |
2403 | |
2404 return PaintsIntoOwnBacking; | 2401 return PaintsIntoOwnBacking; |
2405 } | 2402 } |
2406 | 2403 |
2407 bool RenderLayer::isAllowedToQueryCompositingState() const | 2404 bool RenderLayer::isAllowedToQueryCompositingState() const |
2408 { | 2405 { |
2409 if (gCompositingQueryMode == CompositingQueriesAreAllowed) | 2406 if (gCompositingQueryMode == CompositingQueriesAreAllowed) |
2410 return true; | 2407 return true; |
2411 return renderer()->document().lifecycle().state() >= DocumentLifecycle::InCo
mpositingUpdate; | 2408 return renderer()->document().lifecycle().state() >= DocumentLifecycle::InCo
mpositingUpdate; |
2412 } | 2409 } |
2413 | 2410 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2486 bool RenderLayer::hasCompositedMask() const | 2483 bool RenderLayer::hasCompositedMask() const |
2487 { | 2484 { |
2488 return m_compositedLayerMapping && m_compositedLayerMapping->hasMaskLayer(); | 2485 return m_compositedLayerMapping && m_compositedLayerMapping->hasMaskLayer(); |
2489 } | 2486 } |
2490 | 2487 |
2491 bool RenderLayer::hasCompositedClippingMask() const | 2488 bool RenderLayer::hasCompositedClippingMask() const |
2492 { | 2489 { |
2493 return m_compositedLayerMapping && m_compositedLayerMapping->hasChildClippin
gMaskLayer(); | 2490 return m_compositedLayerMapping && m_compositedLayerMapping->hasChildClippin
gMaskLayer(); |
2494 } | 2491 } |
2495 | 2492 |
2496 bool RenderLayer::clipsCompositingDescendantsWithBorderRadius() const | |
2497 { | |
2498 RenderStyle* style = renderer()->style(); | |
2499 if (!style) | |
2500 return false; | |
2501 | |
2502 return compositor()->clipsCompositingDescendants(this) && style->hasBorderRa
dius(); | |
2503 } | |
2504 | |
2505 bool RenderLayer::paintsWithTransform(PaintBehavior paintBehavior) const | 2493 bool RenderLayer::paintsWithTransform(PaintBehavior paintBehavior) const |
2506 { | 2494 { |
2507 return transform() && ((paintBehavior & PaintBehaviorFlattenCompositingLayer
s) || compositingState() != PaintsIntoOwnBacking); | 2495 return transform() && ((paintBehavior & PaintBehaviorFlattenCompositingLayer
s) || compositingState() != PaintsIntoOwnBacking); |
2508 } | 2496 } |
2509 | 2497 |
2510 bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const | 2498 bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const |
2511 { | 2499 { |
2512 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) | 2500 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) |
2513 return false; | 2501 return false; |
2514 | 2502 |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2866 } | 2854 } |
2867 } | 2855 } |
2868 | 2856 |
2869 void showLayerTree(const blink::RenderObject* renderer) | 2857 void showLayerTree(const blink::RenderObject* renderer) |
2870 { | 2858 { |
2871 if (!renderer) | 2859 if (!renderer) |
2872 return; | 2860 return; |
2873 showLayerTree(renderer->enclosingLayer()); | 2861 showLayerTree(renderer->enclosingLayer()); |
2874 } | 2862 } |
2875 #endif | 2863 #endif |
OLD | NEW |