Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h |
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h |
index 6ee087cb6ff8003890f1d4aad870f15329138644..99c15c7e3662f7a58de799c0c2469b1dec1683fa 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h |
@@ -117,6 +117,10 @@ class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient { |
return m_ancestorClippingLayer.get(); |
} |
+ GraphicsLayer* ancestorClippingMaskLayer() const { |
+ return m_ancestorClippingMaskLayer.get(); |
+ } |
+ |
GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } |
GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } |
@@ -383,6 +387,9 @@ class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient { |
void updateInternalHierarchy(); |
void updatePaintingPhases(); |
bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
+ bool updateClippingLayers(bool needsAncestorClip, |
+ bool needsAncestorClippingMask, |
+ bool needsDescendantClip); |
bool updateChildTransformLayer(bool needsChildTransformLayer); |
bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, |
bool needsVerticalScrollbarLayer, |
@@ -477,10 +484,16 @@ class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient { |
const GraphicsLayerPaintInfo&, |
const Vector<GraphicsLayerPaintInfo>& layers); |
- // Return true if |m_owningLayer|'s compositing ancestor is not a descendant |
- // (inclusive) of the clipping container for |m_owningLayer|. |
- bool owningLayerClippedByLayerNotAboveCompositedAncestor( |
- const PaintLayer* scrollParent); |
+ // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing |
+ // ancestor is not a descendant (inclusive) of the clipping container for |
+ // |m_owningLayer|. Return true in |owningLayerIsMasked| iff |
+ // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor |
+ // is not a descendant (inclusive) of a container that applies a mask for |
+ // |m_owningLayer|. |
+ void owningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
+ const PaintLayer* scrollParent, |
+ bool& owningLayerIsClipped, |
+ bool& owningLayerIsMasked); |
const PaintLayer* scrollParent(); |
@@ -532,6 +545,11 @@ class CORE_EXPORT CompositedLayerMapping final : public GraphicsLayerClient { |
// Only used if we are clipped by an ancestor which is not a stacking context. |
std::unique_ptr<GraphicsLayer> m_ancestorClippingLayer; |
+ |
+ // Only used is there is an m_ancestorClippingLayer that also needs to apply |
+ // a clipping mask (for CSS clips or border radius). |
+ std::unique_ptr<GraphicsLayer> m_ancestorClippingMaskLayer; |
+ |
std::unique_ptr<GraphicsLayer> m_graphicsLayer; |
// Only used if we have clipping on a stacking context with compositing |