Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1863143002: Use correct clip container when computing acl for scroll children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test expectations Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 scrollOrigin.move(-layoutBox->borderLeft(), -layoutBox->borderTop()); 801 scrollOrigin.move(-layoutBox->borderLeft(), -layoutBox->borderTop());
802 graphicsLayerParentLocation = -(scrollOrigin + scrollOffset); 802 graphicsLayerParentLocation = -(scrollOrigin + scrollOffset);
803 } 803 }
804 } 804 }
805 805
806 void CompositedLayerMapping::updateAncestorClippingLayerGeometry(const PaintLaye r* compositingContainer, const IntPoint& snappedOffsetFromCompositedAncestor, In tPoint& graphicsLayerParentLocation) 806 void CompositedLayerMapping::updateAncestorClippingLayerGeometry(const PaintLaye r* compositingContainer, const IntPoint& snappedOffsetFromCompositedAncestor, In tPoint& graphicsLayerParentLocation)
807 { 807 {
808 if (!compositingContainer || !m_ancestorClippingLayer) 808 if (!compositingContainer || !m_ancestorClippingLayer)
809 return; 809 return;
810 810
811 if (scrollParent())
812 compositingContainer = scrollParent();
813
811 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn oringOverflowClip, IgnoreOverlayScrollbarSize); 814 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn oringOverflowClip, IgnoreOverlayScrollbarSize);
812 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro undClipRect(clipRectsContext).rect()); 815 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro undClipRect(clipRectsContext).rect());
813 ASSERT(parentClipRect != LayoutRect::infiniteIntRect()); 816 ASSERT(parentClipRect != LayoutRect::infiniteIntRect());
814 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() - graphicsLayerParentLocation)); 817 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() - graphicsLayerParentLocation));
815 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); 818 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size()));
816 819
817 // backgroundRect is relative to compositingContainer, so subtract snappedOf fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t o local coords. 820 // backgroundRect is relative to compositingContainer, so subtract snappedOf fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t o local coords.
818 m_ancestorClippingLayer->setOffsetFromLayoutObject(parentClipRect.location() - snappedOffsetFromCompositedAncestor); 821 m_ancestorClippingLayer->setOffsetFromLayoutObject(parentClipRect.location() - snappedOffsetFromCompositedAncestor);
819 822
820 // The primary layer is then parented in, and positioned relative to this cl ipping layer. 823 // The primary layer is then parented in, and positioned relative to this cl ipping layer.
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2580 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2578 name = "Scrolling Contents Layer"; 2581 name = "Scrolling Contents Layer";
2579 } else { 2582 } else {
2580 ASSERT_NOT_REACHED(); 2583 ASSERT_NOT_REACHED();
2581 } 2584 }
2582 2585
2583 return name; 2586 return name;
2584 } 2587 }
2585 2588
2586 } // namespace blink 2589 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698