void RootFrameViewport::setScrollOffset(const ScrollOffset& offset, ScrollType scrollType, ScrollBehavior scrollBehavior) { updateScrollAnimator(); if (scrollBehavior == ScrollBehaviorAuto) scrollBehavior = scrollBehaviorStyle(); if (scrollType == ProgrammaticScroll && !layoutViewport().isProgrammaticallyScrollable()) return; if (scrollType == AnchoringScroll) { distributeScrollBetweenViewports(offset, scrollType, scrollBehavior, LayoutViewport); return; } if (scrollBehavior == ScrollBehaviorSmooth) { distributeScrollBetweenViewports(offset, scrollType, scrollBehavior, VisualViewport); return; } ScrollOffset clampedOffset = clampScrollOffset(offset); ScrollableArea::setScrollOffset(clampedOffset, scrollType, scrollBehavior); }
void RootFrameViewport::setScrollPosition(const DoublePoint& position, ScrollType scrollType, ScrollBehavior scrollBehavior) { updateScrollAnimator(); if (scrollBehavior == ScrollBehaviorAuto) scrollBehavior = scrollBehaviorStyle(); if (scrollType == ProgrammaticScroll && !layoutViewport().isProgrammaticallyScrollable()) return; if (scrollBehavior == ScrollBehaviorSmooth) { distributeScrollBetweenViewports(position, scrollType, scrollBehavior); return; } DoublePoint clampedPosition = clampScrollPosition(position); ScrollableArea::setScrollPosition(clampedPosition, scrollType, scrollBehavior); }
void RootFrameViewport::updateScrollOffset(const ScrollOffset& offset, ScrollType scrollType) { distributeScrollBetweenViewports(offset, scrollType, ScrollBehaviorInstant, VisualViewport); }
void RootFrameViewport::setScrollOffset(const DoublePoint& offset, ScrollType scrollType) { distributeScrollBetweenViewports(DoublePoint(offset), scrollType, ScrollBehaviorInstant); }