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

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

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/html/HTMLBodyElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index ed9a8f2e6811923007d013922095cb82826c7984..5ce70e8d18be6f6eee9ecfd0d9bd55e92c803e8f 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -1384,7 +1384,7 @@ static bool scrollBehaviorFromScrollOptions(const Dictionary& scrollOptions, Scr
return false;
}
-void LocalDOMWindow::scrollBy(int x, int y) const
+void LocalDOMWindow::scrollBy(int x, int y, ScrollBehavior scrollBehavior) const
{
if (!isCurrentlyDisplayedInFrame())
return;
@@ -1397,7 +1397,7 @@ void LocalDOMWindow::scrollBy(int x, int y) const
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 LocalDOMWindow::scrollBy(int x, int y, const Dictionary& scrollOptions, ExceptionState &exceptionState) const
@@ -1405,10 +1405,10 @@ void LocalDOMWindow::scrollBy(int x, int y, const Dictionary& scrollOptions, Exc
ScrollBehavior scrollBehavior = ScrollBehaviorAuto;
if (!scrollBehaviorFromScrollOptions(scrollOptions, scrollBehavior, exceptionState))
return;
- scrollBy(x, y);
+ scrollBy(x, y, scrollBehavior);
}
-void LocalDOMWindow::scrollTo(int x, int y) const
+void LocalDOMWindow::scrollTo(int x, int y, ScrollBehavior scrollBehavior) const
{
if (!isCurrentlyDisplayedInFrame())
return;
@@ -1421,7 +1421,7 @@ void LocalDOMWindow::scrollTo(int x, int y) const
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 LocalDOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, ExceptionState& exceptionState) const
@@ -1429,7 +1429,7 @@ void LocalDOMWindow::scrollTo(int x, int y, const Dictionary& scrollOptions, Exc
ScrollBehavior scrollBehavior = ScrollBehaviorAuto;
if (!scrollBehaviorFromScrollOptions(scrollOptions, scrollBehavior, exceptionState))
return;
- scrollTo(x, y);
+ scrollTo(x, y, scrollBehavior);
}
void LocalDOMWindow::moveBy(float x, float y) const
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/html/HTMLBodyElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698