| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2702 m_rareData->compositedLayerMapping->hasChildClippingMaskLayer(); | 2702 m_rareData->compositedLayerMapping->hasChildClippingMaskLayer(); |
| 2703 } | 2703 } |
| 2704 | 2704 |
| 2705 bool PaintLayer::paintsWithTransform(GlobalPaintFlags globalPaintFlags) const { | 2705 bool PaintLayer::paintsWithTransform(GlobalPaintFlags globalPaintFlags) const { |
| 2706 return (transform() || | 2706 return (transform() || |
| 2707 layoutObject()->style()->position() == FixedPosition) && | 2707 layoutObject()->style()->position() == FixedPosition) && |
| 2708 ((globalPaintFlags & GlobalPaintFlattenCompositingLayers) || | 2708 ((globalPaintFlags & GlobalPaintFlattenCompositingLayers) || |
| 2709 compositingState() != PaintsIntoOwnBacking); | 2709 compositingState() != PaintsIntoOwnBacking); |
| 2710 } | 2710 } |
| 2711 | 2711 |
| 2712 bool PaintLayer::compositesWithTransform() const { |
| 2713 return transformAncestor() || transform(); |
| 2714 } |
| 2715 |
| 2716 bool PaintLayer::compositesWithOpacity() const { |
| 2717 return opacityAncestor() || layoutObject()->style()->hasOpacity(); |
| 2718 } |
| 2719 |
| 2712 bool PaintLayer::backgroundIsKnownToBeOpaqueInRect( | 2720 bool PaintLayer::backgroundIsKnownToBeOpaqueInRect( |
| 2713 const LayoutRect& localRect) const { | 2721 const LayoutRect& localRect) const { |
| 2714 if (paintsWithTransparency(GlobalPaintNormalPhase)) | 2722 if (paintsWithTransparency(GlobalPaintNormalPhase)) |
| 2715 return false; | 2723 return false; |
| 2716 | 2724 |
| 2717 // We can't use hasVisibleContent(), because that will be true if our | 2725 // We can't use hasVisibleContent(), because that will be true if our |
| 2718 // layoutObject is hidden, but some child is visible and that child doesn't | 2726 // layoutObject is hidden, but some child is visible and that child doesn't |
| 2719 // cover the entire rect. | 2727 // cover the entire rect. |
| 2720 if (layoutObject()->style()->visibility() != EVisibility::Visible) | 2728 if (layoutObject()->style()->visibility() != EVisibility::Visible) |
| 2721 return false; | 2729 return false; |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3266 } | 3274 } |
| 3267 | 3275 |
| 3268 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3276 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3269 if (!layoutObject) { | 3277 if (!layoutObject) { |
| 3270 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 3278 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 3271 return; | 3279 return; |
| 3272 } | 3280 } |
| 3273 showLayerTree(layoutObject->enclosingLayer()); | 3281 showLayerTree(layoutObject->enclosingLayer()); |
| 3274 } | 3282 } |
| 3275 #endif | 3283 #endif |
| OLD | NEW |