void ScrollableArea::programmaticScrollHelper(const DoublePoint& position, ScrollBehavior scrollBehavior) { cancelScrollAnimation(); if (scrollBehavior == ScrollBehaviorSmooth) programmaticScrollAnimator()->animateToOffset(toFloatPoint(position)); else programmaticScrollAnimator()->scrollToOffsetWithoutAnimation(toFloatPoint(position)); }
void ScrollableArea::programmaticallyScrollSmoothlyToOffset(const FloatPoint& offset) { if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) scrollAnimator->cancelAnimations(); programmaticScrollAnimator()->animateToOffset(offset); }