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); |