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

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

Issue 2350363004: Reset clip parent in CompositedLayerMapping::updateClipParent (Closed)
Patch Set: spv2 expectation Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/compositing/overflow/clip-parent-reset-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 1810
1811 // Only the topmost layer has a scroll parent. All other layers have a null scroll parent. 1811 // Only the topmost layer has a scroll parent. All other layers have a null scroll parent.
1812 if (layer != topmostLayer) 1812 if (layer != topmostLayer)
1813 clipParent = 0; 1813 clipParent = 0;
1814 1814
1815 scrollingCoordinator->updateClipParentForGraphicsLayer(layer, clipParent); 1815 scrollingCoordinator->updateClipParentForGraphicsLayer(layer, clipParent);
1816 } 1816 }
1817 1817
1818 void CompositedLayerMapping::updateClipParent(const PaintLayer* scrollParent) 1818 void CompositedLayerMapping::updateClipParent(const PaintLayer* scrollParent)
1819 { 1819 {
1820 if (owningLayerClippedByLayerNotAboveCompositedAncestor(scrollParent)) 1820 const PaintLayer* clipParent = nullptr;
1821 return; 1821 if (!owningLayerClippedByLayerNotAboveCompositedAncestor(scrollParent)) {
1822 1822 clipParent = m_owningLayer.clipParent();
1823 const PaintLayer* clipParent = m_owningLayer.clipParent(); 1823 if (clipParent)
1824 if (clipParent) 1824 clipParent = clipParent->enclosingLayerWithCompositedLayerMapping(In cludeSelf);
1825 clipParent = clipParent->enclosingLayerWithCompositedLayerMapping(Includ eSelf); 1825 }
1826 1826
1827 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay er(m_owningLayer)) { 1827 if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLay er(m_owningLayer)) {
1828 GraphicsLayer* topmostLayer = childForSuperlayers(); 1828 GraphicsLayer* topmostLayer = childForSuperlayers();
1829 updateClipParentForGraphicsLayer(m_squashingContainmentLayer.get(), topm ostLayer, clipParent, scrollingCoordinator); 1829 updateClipParentForGraphicsLayer(m_squashingContainmentLayer.get(), topm ostLayer, clipParent, scrollingCoordinator);
1830 updateClipParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmostL ayer, clipParent, scrollingCoordinator); 1830 updateClipParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmostL ayer, clipParent, scrollingCoordinator);
1831 updateClipParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer, cl ipParent, scrollingCoordinator); 1831 updateClipParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer, cl ipParent, scrollingCoordinator);
1832 } 1832 }
1833 } 1833 }
1834 1834
1835 bool CompositedLayerMapping::updateSquashingLayers(bool needsSquashingLayers) 1835 bool CompositedLayerMapping::updateSquashingLayers(bool needsSquashingLayers)
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2762 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2762 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2763 name = "Scrolling Contents Layer"; 2763 name = "Scrolling Contents Layer";
2764 } else { 2764 } else {
2765 ASSERT_NOT_REACHED(); 2765 ASSERT_NOT_REACHED();
2766 } 2766 }
2767 2767
2768 return name; 2768 return name;
2769 } 2769 }
2770 2770
2771 } // namespace blink 2771 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/compositing/overflow/clip-parent-reset-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698