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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 131543013: Update scroll parent correctly for squashing layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Now with working LayoutTests (thanks to hartmanng for help with the repaint workaround). Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index fcdf3a996d4f36100e1656bad5a6fc1413d103a9..ac460b5825ffd54c8ee995681dc1ebb5b2e08b63 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -870,6 +870,7 @@ GraphicsLayerUpdater::UpdateType CompositedLayerMapping::updateGraphicsLayerGeom
updateRenderingContext();
updateShouldFlattenTransform();
updateChildrenTransform();
+ updateScrollParent(m_owningLayer.scrollParent());
abarth-chromium 2014/03/12 18:45:40 This function walks up the RenderLayer tree. Inst
Ian Vollick 2014/03/12 20:03:32 Agreed, though it's a little tricky since a layer'
registerScrollingLayers();
updateCompositingReasons();
@@ -1396,9 +1397,12 @@ static void updateScrollParentForGraphicsLayer(GraphicsLayer* layer, GraphicsLay
void CompositedLayerMapping::updateScrollParent(RenderLayer* scrollParent)
{
+ if (!scrollParent && m_squashedLayers.size())
+ scrollParent = m_squashedLayers[0].renderLayer->scrollParent();
if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer)) {
- GraphicsLayer* topmostLayer = localRootForOwningLayer();
+ GraphicsLayer* topmostLayer = childForSuperlayers();
+ updateScrollParentForGraphicsLayer(m_squashingContainmentLayer.get(), topmostLayer, scrollParent, scrollingCoordinator);
updateScrollParentForGraphicsLayer(m_ancestorClippingLayer.get(), topmostLayer, scrollParent, scrollingCoordinator);
updateScrollParentForGraphicsLayer(m_graphicsLayer.get(), topmostLayer, scrollParent, scrollingCoordinator);
}

Powered by Google App Engine
This is Rietveld 408576698