Chromium Code Reviews| 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 324499011a62f40bca0b7400a0d4eebbb8c02e67..01bc5d9684bc7a3292df8fca3c948f3fb1e9a9e5 100644 |
| --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp |
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp |
| @@ -213,12 +213,16 @@ void ScrollableArea::userScrollHelper(const DoublePoint& position, ScrollBehavio |
| { |
| cancelProgrammaticScrollAnimation(); |
| + double x = userInputScrollable(HorizontalScrollbar) ? position.x() : scrollAnimator()->currentPosition().x(); |
|
skobes
2015/09/30 22:31:14
extra space after =
(here and the next line)
ymalik
2015/10/01 22:25:31
Done.
|
| + double y = userInputScrollable(VerticalScrollbar) ? position.y() : scrollAnimator()->currentPosition().y(); |
| + DoublePoint newPosition(x, y); |
|
skobes
2015/09/30 22:31:14
you can inline this below as "DoublePoint(x, y)"
ymalik
2015/10/01 22:25:31
Just did FloatPoint(x, y), as toFloatPoint would.
|
| + |
| // Smooth user scrolls (keyboard, wheel clicks) are handled via the userScroll method. |
| // TODO(bokan): The userScroll method should probably be modified to call this method |
| // and ScrollAnimator to have a simpler animateToOffset method like the |
| // ProgrammaticScrollAnimator. |
| ASSERT(scrollBehavior == ScrollBehaviorInstant); |
| - scrollAnimator()->scrollToOffsetWithoutAnimation(toFloatPoint(position)); |
| + scrollAnimator()->scrollToOffsetWithoutAnimation(toFloatPoint(newPosition)); |
| } |
| void ScrollableArea::scrollIntoRect(const LayoutRect& rectInContent, const FloatRect& targetRectInFrame) |
| @@ -242,7 +246,7 @@ void ScrollableArea::scrollIntoRect(const LayoutRect& rectInContent, const Float |
| setScrollPosition(targetOffset, ProgrammaticScroll); |
| } |
| -LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, const ScrollAlignment& alignX, const ScrollAlignment& alignY) |
| +LayoutRect ScrollableArea::scrollIntoView(const LayoutRect& rectInContent, const ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType) |
| { |
| // TODO(bokan): This should really be implemented here but ScrollAlignment is in Core which is a dependency violation. |
| ASSERT_NOT_REACHED(); |