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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 1173053003: Remove ScrollableArea::notifyScrollPositionChanged and cleanup scroll animators. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase + remove updateScrollbars from FrameView::setScrollPosition Created 5 years, 6 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/frame/FrameView.h ('k') | Source/core/frame/RootFrameViewportTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index a286581a1cd1a4039e9294a473e55832fd39dc5c..948869f36438680f40a157bb2c5f804f59fdee25 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1489,7 +1489,6 @@ void FrameView::maintainScrollPositionAtAnchor(Node* anchorNode)
void FrameView::setScrollPosition(const DoublePoint& scrollPoint, ScrollType scrollType, ScrollBehavior scrollBehavior)
{
- cancelProgrammaticScrollAnimation();
m_maintainScrollPositionAnchor = nullptr;
DoublePoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
@@ -1499,14 +1498,7 @@ void FrameView::setScrollPosition(const DoublePoint& scrollPoint, ScrollType scr
if (scrollBehavior == ScrollBehaviorAuto)
scrollBehavior = scrollBehaviorStyle();
- if (scrollBehavior == ScrollBehaviorInstant) {
- DoubleSize newOffset(newScrollPosition.x(), newScrollPosition.y());
- // TODO(bokan): Why do we need to go through updateScrollbars? If not, we can
- // just delete this whole method and use the base version.
- updateScrollbars(newOffset);
- } else {
- ScrollableArea::setScrollPosition(newScrollPosition, ProgrammaticScroll, ScrollBehaviorSmooth);
- }
+ ScrollableArea::setScrollPosition(newScrollPosition, scrollType, scrollBehavior);
}
void FrameView::setElasticOverscroll(const FloatSize& elasticOverscroll)
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/frame/RootFrameViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698