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 54f1541938265a70b8becdada33e2c7d946a4ae8..e8f7b2e46a43ad8933957dd0cb79e3531982f81c 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h |
@@ -376,6 +376,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, |
@@ -469,10 +472,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(); |
@@ -523,6 +532,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 |