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

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

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 10 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
Index: Source/core/frame/DOMWindow.cpp
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
index 28661b8e793fe0cf85b0d9e0df6f8988365e1dd5..c44cfc897726df81efef35d8ee0fb676ef9c5a5a 100644
--- a/Source/core/frame/DOMWindow.cpp
+++ b/Source/core/frame/DOMWindow.cpp
@@ -1416,8 +1416,7 @@ void DOMWindow::scrollBy(int x, int y, const Dictionary& scrollOptions, Exceptio
return;
IntSize scaledOffset(x * m_frame->pageZoomFactor(), y * m_frame->pageZoomFactor());
- // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instantly.
- view->scrollBy(scaledOffset);
+ view->scrollBy(scaledOffset, scrollBehavior);
}
void DOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, ExceptionState& exceptionState) const
@@ -1436,8 +1435,7 @@ void DOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, Exceptio
return;
IntPoint layoutPos(x * m_frame->pageZoomFactor(), y * m_frame->pageZoomFactor());
- // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instantly.
- view->setScrollPosition(layoutPos);
+ view->setScrollPosition(layoutPos, scrollBehavior);
}
void DOMWindow::moveBy(float x, float y) const

Powered by Google App Engine
This is Rietveld 408576698