Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
index 762de3e5a43566b10b23f8f18324d7da79d14cb8..b8e75b5c761b2e5191e1d250be89fb0e9beb1aaa 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -3564,8 +3564,12 @@ |
void FrameView::setScrollOffset(const DoublePoint& offset, |
ScrollType scrollType) { |
+ // TODO(skobes): We shouldn't have to clamp here; instead we should update callers |
+ // ScrollableArea::scrollPositionChanged to only pass clamped offsets. |
+ DoublePoint newPosition = clampScrollPosition(offset); |
+ |
DoublePoint oldPosition = m_scrollPosition; |
- DoubleSize scrollDelta = offset - oldPosition; |
+ DoubleSize scrollDelta = newPosition - oldPosition; |
if (scrollDelta.isZero()) |
return; |
@@ -3574,7 +3578,7 @@ |
ASSERT_NOT_REACHED(); |
} |
- m_scrollPosition = offset; |
+ m_scrollPosition = newPosition; |
if (!scrollbarsSuppressed()) |
m_pendingScrollDelta += scrollDelta; |