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

Unified Diff: Source/core/platform/graphics/GraphicsLayer.cpp

Issue 18083034: Don't set scroll client for main frame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address jamesr review Created 7 years, 5 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/platform/graphics/GraphicsLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp
index f7ecd9870041b38f723f51c3be37e46cfd088ae2..2973956d6728b773727f0085f837531e3ef16b0c 100644
--- a/Source/core/platform/graphics/GraphicsLayer.cpp
+++ b/Source/core/platform/graphics/GraphicsLayer.cpp
@@ -141,7 +141,6 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingContentLayerDelegate(this));
m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(m_opaqueRectTrackingContentLayerDelegate.get()));
m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible);
- m_layer->layer()->setScrollClient(this);
m_layer->setAutomaticallyComputeRasterScale(true);
}
@@ -1336,6 +1335,21 @@ void GraphicsLayer::setLinkHighlight(LinkHighlightClient* linkHighlight)
updateChildList();
}
+void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isMainFrame)
+{
+ if (m_scrollableArea == scrollableArea)
+ return;
+
+ m_scrollableArea = scrollableArea;
+
+ // Main frame scrolling may involve pinch zoom and gets routed through
+ // WebViewImpl explicitly rather than via GraphicsLayer::didScroll.
+ if (isMainFrame)
+ m_layer->layer()->setScrollClient(0);
+ else
+ m_layer->layer()->setScrollClient(this);
+}
+
void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
{
paintGraphicsLayerContents(context, clip);
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698