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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2680953002: Remove GraphicsLayer::didScroll and directly call ScrollableArea::didScroll (Closed)
Patch Set: Incorporate reviewer comments: more tests, less bad tests Created 3 years, 10 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: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index f496615ab7b4552fb18f32d8dea88d1a9328358a..b2595654477d7cf6e45d2d0c6a474630ebeb4950 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -1152,21 +1152,12 @@ void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea,
m_scrollableArea = scrollableArea;
// VisualViewport scrolling may involve pinch zoom and gets routed through
- // WebViewImpl explicitly rather than via GraphicsLayer::didScroll since it
+ // WebViewImpl explicitly rather than via ScrollableArea::didScroll since it
// needs to be set in tandem with the page scale delta.
if (isVisualViewport)
- m_layer->layer()->setScrollClient(0);
+ m_layer->layer()->setScrollClient(nullptr);
else
- m_layer->layer()->setScrollClient(this);
-}
-
-void GraphicsLayer::didScroll() {
- if (m_scrollableArea) {
- ScrollOffset newOffset =
- toFloatSize(m_layer->layer()->scrollPositionDouble() -
- m_scrollableArea->scrollOrigin());
- m_scrollableArea->setScrollOffset(newOffset, CompositorScroll);
- }
+ m_layer->layer()->setScrollClient(scrollableArea);
}
std::unique_ptr<base::trace_event::ConvertableToTraceFormat>

Powered by Google App Engine
This is Rietveld 408576698