Index: Source/core/rendering/compositing/CompositingInputsUpdater.cpp |
diff --git a/Source/core/rendering/compositing/CompositingInputsUpdater.cpp b/Source/core/rendering/compositing/CompositingInputsUpdater.cpp |
index 1bf13b16fa3e2e005f16332e49345f086274f9bd..c73e4b63219bd4afeea9b825404fcf8164850dd2 100644 |
--- a/Source/core/rendering/compositing/CompositingInputsUpdater.cpp |
+++ b/Source/core/rendering/compositing/CompositingInputsUpdater.cpp |
@@ -35,6 +35,13 @@ static const RenderLayer* findParentLayerOnClippingContainerChain(const RenderLa |
while (current) { |
if (current->style()->position() == FixedPosition) { |
for (current = current->parent(); current && !current->canContainFixedPositionObjects(); current = current->parent()) { |
+ // All types of clips apply to fixed-position descendants of other fixed-position elements. |
+ // Note: it's unclear whether this is what the spec says. Firefox does not clip, but Chrome does. |
+ if (current->style()->position() == FixedPosition && current->hasClipOrOverflowClip()) { |
+ ASSERT(current->hasLayer()); |
+ return static_cast<const RenderLayerModelObject*>(current)->layer(); |
+ } |
+ |
// CSS clip applies to fixed position elements even for ancestors that are not what the |
// fixed element is positioned with respect to. |
if (current->hasClip()) { |