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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp

Issue 2387393003: Revert of Refactor ScrollableArea::setScrollPosition. (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39d68eecfaebc6682a408db6c6fab2d54c6d029c..1184db856fce0f2a876889e27720a0f51ce5dcf5 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
@@ -178,28 +178,22 @@
void ScrollableArea::setScrollPosition(const DoublePoint& position,
ScrollType scrollType,
ScrollBehavior behavior) {
- DoublePoint clampedPosition = clampScrollPosition(position);
- if (shouldUseIntegerScrollOffset())
- clampedPosition = flooredIntPoint(clampedPosition);
- if (clampedPosition == scrollPositionDouble())
- return;
-
if (behavior == ScrollBehaviorAuto)
behavior = scrollBehaviorStyle();
switch (scrollType) {
case CompositorScroll:
- scrollPositionChanged(clampedPosition, scrollType);
+ scrollPositionChanged(clampScrollPosition(position), scrollType);
break;
case AnchoringScroll:
- scrollAnimator().adjustAnimationAndSetScrollPosition(clampedPosition,
+ scrollAnimator().adjustAnimationAndSetScrollPosition(position,
scrollType);
break;
case ProgrammaticScroll:
- programmaticScrollHelper(clampedPosition, behavior);
+ programmaticScrollHelper(position, behavior);
break;
case UserScroll:
- userScrollHelper(clampedPosition, behavior);
+ userScrollHelper(position, behavior);
break;
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698