Chromium Code Reviews| Index: Source/core/rendering/RenderLayer.h |
| diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h |
| index a7827897eefc117f489b168451394a5a30d4e4ab..b1f28be93c8204cb9061eb0c2777c6f0d7edb796 100644 |
| --- a/Source/core/rendering/RenderLayer.h |
| +++ b/Source/core/rendering/RenderLayer.h |
| @@ -474,12 +474,21 @@ public: |
| // Only safe to call from RenderLayerModelObject::destroyLayer() |
| void operator delete(void*); |
| - bool isComposited() const { return m_backing != 0; } |
| - bool hasCompositedMask() const; |
| - bool hasCompositedClippingMask() const; |
| - RenderLayerBacking* backing() const { return m_backing.get(); } |
| + CompositingState compositingState() const; |
| + |
| + RenderLayerBacking* backing() const |
| + { |
| + // NOTE: Checking whether backing exists is equivalent to asking if you are in one of these two compositing states. |
| + // If this is why you are using backing(), please try to use compositingState() instead. |
| + ASSERT(compositingState() == HasOwnBackingButPaintsIntoAncestor || compositingState() == PaintsIntoOwnBacking); |
| + return m_backing.get(); |
| + } |
| + |
| RenderLayerBacking* ensureBacking(); |
| void clearBacking(bool layerBeingDestroyed = false); |
| + |
| + bool hasCompositedMask() const; |
| + bool hasCompositedClippingMask() const; |
| bool needsCompositedScrolling() const; |
| bool needsToBeStackingContainer() const; |
| @@ -492,7 +501,8 @@ public: |
| bool paintsWithTransparency(PaintBehavior paintBehavior) const |
| { |
| - return isTransparent() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !isComposited()); |
| + // FIXME: shouldn't we return true if this layer has a backing but paints into its ancestor? |
|
Ian Vollick
2013/10/01 19:46:22
This should return true everywhere opacity won't b
shawnsingh
2013/10/03 03:04:04
done.
|
| + return isTransparent() && ((paintBehavior & PaintBehaviorFlattenCompositingLayers) || !backing()); |
| } |
| bool paintsWithTransform(PaintBehavior) const; |