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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 22419002: Set up clip and scroll parents on the blink side. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 years, 3 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
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 68a4ddd5b6043e67311961ce598f018fdc64ee0a..2b685889aec7602a71137b863f61823b9e25ca3e 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -491,6 +491,38 @@ void ScrollingCoordinator::touchEventTargetRectsDidChange(const Document*)
setTouchEventTargetRects(touchEventTargetRects);
}
+void ScrollingCoordinator::updateScrollParentForLayer(RenderLayer* child, RenderLayer* parent)
+{
+ if (!child || !child->backing())
+ return;
+
+ WebLayer* childWebLayer = scrollingWebLayerForGraphicsLayer(child->layerForScrollChild());
+ if (!childWebLayer)
+ return;
+
+ WebLayer* scrollParentWebLayer = 0;
+ if (parent && parent->backing())
+ scrollParentWebLayer = scrollingWebLayerForGraphicsLayer(parent->backing()->parentForSublayers());
+
+ childWebLayer->setScrollParent(scrollParentWebLayer);
+}
+
+void ScrollingCoordinator::updateClipParentForLayer(RenderLayer* child, RenderLayer* parent)
+{
+ if (!child || !child->backing())
+ return;
+
+ WebLayer* childWebLayer = scrollingWebLayerForGraphicsLayer(child->backing()->graphicsLayer());
+ if (!childWebLayer)
+ return;
+
+ WebLayer* clipParentWebLayer = 0;
+ if (parent && parent->backing())
+ clipParentWebLayer = scrollingWebLayerForGraphicsLayer(parent->backing()->parentForSublayers());
+
+ childWebLayer->setClipParent(clipParentWebLayer);
+}
+
void ScrollingCoordinator::willDestroyRenderLayer(RenderLayer* layer)
{
m_layersWithTouchRects.remove(layer);
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698