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

Unified Diff: Source/platform/scroll/ScrollableArea.cpp

Issue 146003002: Bindings for CSSOM View smooth scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 6 years, 11 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/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableArea.cpp
diff --git a/Source/platform/scroll/ScrollableArea.cpp b/Source/platform/scroll/ScrollableArea.cpp
index 5fbbfbbd03dfdf50afa858a83ae473712a5c25e5..1a2ff4288d4088308386510b88b1aacbf20f252c 100644
--- a/Source/platform/scroll/ScrollableArea.cpp
+++ b/Source/platform/scroll/ScrollableArea.cpp
@@ -188,6 +188,20 @@ void ScrollableArea::scrollPositionChanged(const IntPoint& position)
scrollAnimator()->notifyContentAreaScrolled(scrollPosition() - oldPosition);
}
+bool ScrollableArea::scrollBehaviorFromString(const String& behaviorString, ScrollBehavior& behavior)
+{
+ if (behaviorString == "auto")
+ behavior = ScrollBehaviorAuto;
+ else if (behaviorString == "instant")
+ behavior = ScrollBehaviorInstant;
+ else if (behaviorString == "smooth")
+ behavior = ScrollBehaviorSmooth;
+ else
+ return false;
+
+ return true;
+}
+
bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
{
return scrollAnimator()->handleWheelEvent(wheelEvent);
« no previous file with comments | « Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698