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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.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/scroll/ScrollableArea.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
index 0e1681ef3de8de68557b632c4ba6cd0f38871993..b0a03cd8a8a1bbcf450bb1bfab2ac8676178243f 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
@@ -662,6 +662,12 @@ IntSize ScrollableArea::excludeScrollbars(const IntSize& size) const {
std::max(0, size.height() - horizontalScrollbarHeight()));
}
+void ScrollableArea::didScroll(const gfx::ScrollOffset& offset) {
+ ScrollOffset newOffset = ScrollOffset(offset.x() - scrollOrigin().x(),
+ offset.y() - scrollOrigin().y());
+ setScrollOffset(newOffset, CompositorScroll);
+}
+
DEFINE_TRACE(ScrollableArea) {
visitor->trace(m_scrollAnimator);
visitor->trace(m_programmaticScrollAnimator);

Powered by Google App Engine
This is Rietveld 408576698