| Index: Source/platform/scroll/ScrollView.cpp
|
| diff --git a/Source/platform/scroll/ScrollView.cpp b/Source/platform/scroll/ScrollView.cpp
|
| index 3ffccdca21d1812740483c8ab056ba7a554163a6..2b8f98231b01cb4056fcb1c03159562bcf18ae61 100644
|
| --- a/Source/platform/scroll/ScrollView.cpp
|
| +++ b/Source/platform/scroll/ScrollView.cpp
|
| @@ -285,14 +285,17 @@ void ScrollView::scrollTo(const IntSize& newOffset)
|
| updateFixedElementsAfterScrolling();
|
| }
|
|
|
| -void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
|
| +void ScrollView::setScrollPosition(const IntPoint& scrollPoint, ScrollBehavior behavior)
|
| {
|
| IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
|
|
|
| if (newScrollPosition == scrollPosition())
|
| return;
|
|
|
| - updateScrollbars(IntSize(newScrollPosition.x(), newScrollPosition.y()));
|
| + if (behavior == ScrollBehaviorInstant)
|
| + updateScrollbars(IntSize(newScrollPosition.x(), newScrollPosition.y()));
|
| + else
|
| + ScrollableArea::programmaticallyScrollSmoothlyToOffset(newScrollPosition);
|
| }
|
|
|
| bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity)
|
|
|