⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259846 in webkit


Ignore:
Timestamp:
Apr 9, 2020, 10:22:16 PM (6 years ago)
Author:
cathiechen
Message:

Fix up code style for scroll animation
https://bugs.webkit.org/show_bug.cgi?id=210171

Reviewed by Simon Fraser.

  1. Use AnimatedScroll instead of bool to indicate animated or not.
  2. Remove parameter ScrollRectToVisibleOptions, the autoscroll status is available from EventHandler.
  3. In order to keep consistent, use RenderLayer::setScrollPosition instead of RenderLayer::scrollToPosition.
  4. Add AnimatedScroll parameter to ScrollView::setContentsScrollPosition, then the scroll animation

can be dealt in FrameView::setScrollPosition.

  1. In ScrollView::setScrollPosition, the scroll animation should be cancled before return.
  • dom/Element.cpp: Use AnimatedScroll instead of bool.

(WebCore::Element::scrollTo):
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::scrollTo const): No need to call scrollToOffsetWithAnimation here.

  • page/FrameView.cpp:

(WebCore::FrameView::setScrollPosition):

  • page/FrameView.h:
  • platform/ScrollTypes.h: Add AnimatedScroll.
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setContentsScrollPosition): Add parameter AnimatedScroll.
(WebCore::ScrollView::setScrollPosition): Cancel the scroll animation before return.

  • platform/ScrollView.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
(WebCore::RenderBox::setScrollPosition):

  • rendering/RenderBox.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollToXPosition):
(WebCore::RenderLayer::scrollToYPosition):
(WebCore::RenderLayer::setScrollPosition):
(WebCore::RenderLayer::scrollRectToVisible): Remove AutoscrollStatus.
(WebCore::RenderLayer::autoscroll):
(WebCore::RenderLayer::scrollToPosition): Deleted. Use setScrollPosition instead.

  • rendering/RenderLayer.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::setScrollLeft):
(WebCore::RenderListBox::setScrollTop):

  • rendering/RenderListBox.h:
  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::setScrollLeft):
(WebCore::RenderTextControlSingleLine::setScrollTop):

  • rendering/RenderTextControlSingleLine.h:
Location:
trunk/Source/WebCore
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259845 r259846  
     12020-04-09  Cathie Chen  <cathiechen@igalia.com>
     2
     3        Fix up code style for scroll animation
     4        https://bugs.webkit.org/show_bug.cgi?id=210171
     5
     6        Reviewed by Simon Fraser.
     7
     8        1. Use AnimatedScroll instead of bool to indicate animated or not.
     9        2. Remove parameter ScrollRectToVisibleOptions, the autoscroll status is available from EventHandler.
     10        3. In order to keep consistent, use RenderLayer::setScrollPosition instead of RenderLayer::scrollToPosition.
     11        4. Add AnimatedScroll parameter to ScrollView::setContentsScrollPosition, then the scroll animation
     12        can be dealt in FrameView::setScrollPosition.
     13        5. In ScrollView::setScrollPosition, the scroll animation should be cancled before return.
     14
     15        * dom/Element.cpp: Use AnimatedScroll instead of bool.
     16        (WebCore::Element::scrollTo):
     17        (WebCore::Element::setScrollLeft):
     18        (WebCore::Element::setScrollTop):
     19        * page/DOMWindow.cpp:
     20        (WebCore::DOMWindow::scrollTo const): No need to call scrollToOffsetWithAnimation here.
     21        * page/FrameView.cpp:
     22        (WebCore::FrameView::setScrollPosition):
     23        * page/FrameView.h:
     24        * platform/ScrollTypes.h: Add AnimatedScroll.
     25        * platform/ScrollView.cpp:
     26        (WebCore::ScrollView::setContentsScrollPosition): Add parameter AnimatedScroll.
     27        (WebCore::ScrollView::setScrollPosition): Cancel the scroll animation before return.
     28        * platform/ScrollView.h:
     29        * rendering/RenderBox.cpp:
     30        (WebCore::RenderBox::setScrollLeft):
     31        (WebCore::RenderBox::setScrollTop):
     32        (WebCore::RenderBox::setScrollPosition):
     33        * rendering/RenderBox.h:
     34        * rendering/RenderLayer.cpp:
     35        (WebCore::RenderLayer::scrollToXPosition):
     36        (WebCore::RenderLayer::scrollToYPosition):
     37        (WebCore::RenderLayer::setScrollPosition):
     38        (WebCore::RenderLayer::scrollRectToVisible): Remove AutoscrollStatus.
     39        (WebCore::RenderLayer::autoscroll):
     40        (WebCore::RenderLayer::scrollToPosition): Deleted. Use setScrollPosition instead.
     41        * rendering/RenderLayer.h:
     42        * rendering/RenderListBox.cpp:
     43        (WebCore::RenderListBox::setScrollLeft):
     44        (WebCore::RenderListBox::setScrollTop):
     45        * rendering/RenderListBox.h:
     46        * rendering/RenderTextControlSingleLine.cpp:
     47        (WebCore::RenderTextControlSingleLine::setScrollLeft):
     48        (WebCore::RenderTextControlSingleLine::setScrollTop):
     49        * rendering/RenderTextControlSingleLine.h:
     50
    1512020-04-09  Alex Christensen  <achristensen@webkit.org>
    252
  • trunk/Source/WebCore/dom/Element.cpp

    r259687 r259846  
    951951        clampToInteger(scrollToOptions.top.value() * renderer->style().effectiveZoom())
    952952    );
    953     bool animated = useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), this);
     953    AnimatedScroll animated = useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), this) ? AnimatedScroll::Yes : AnimatedScroll::No;
    954954    renderer->setScrollPosition(scrollPosition, ScrollType::Programmatic, clamping, animated);
    955955}
     
    12941294            // FIXME: Should we use document()->scrollingElement()?
    12951295            // See https://bugs.webkit.org/show_bug.cgi?id=205059
    1296             bool animated = useSmoothScrolling(ScrollBehavior::Auto, document().documentElement());
     1296            AnimatedScroll animated = useSmoothScrolling(ScrollBehavior::Auto, document().documentElement()) ? AnimatedScroll::Yes : AnimatedScroll::No;
    12971297            IntPoint position(static_cast<int>(newLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), frame->view()->scrollY());
    12981298            frame->view()->setScrollPosition(position, ScrollClamping::Clamped, animated);
     
    13031303    if (auto* renderer = renderBox()) {
    13041304        int clampedLeft = clampToInteger(newLeft * renderer->style().effectiveZoom());
    1305         bool animated = useSmoothScrolling(ScrollBehavior::Auto, this);
     1305        AnimatedScroll animated = useSmoothScrolling(ScrollBehavior::Auto, this) ? AnimatedScroll::Yes : AnimatedScroll::No;
    13061306        renderer->setScrollLeft(clampedLeft, ScrollType::Programmatic, ScrollClamping::Clamped, animated);
    13071307        if (auto* scrollableArea = renderer->layer())
     
    13181318            // FIXME: Should we use document()->scrollingElement()?
    13191319            // See https://bugs.webkit.org/show_bug.cgi?id=205059
    1320             bool animated = useSmoothScrolling(ScrollBehavior::Auto, document().documentElement());
     1320            AnimatedScroll animated = useSmoothScrolling(ScrollBehavior::Auto, document().documentElement()) ? AnimatedScroll::Yes : AnimatedScroll::No;
    13211321            IntPoint position(frame->view()->scrollX(), static_cast<int>(newTop * frame->pageZoomFactor() * frame->frameScaleFactor()));
    13221322            frame->view()->setScrollPosition(position, ScrollClamping::Clamped, animated);
     
    13271327    if (auto* renderer = renderBox()) {
    13281328        int clampedTop = clampToInteger(newTop * renderer->style().effectiveZoom());
    1329         bool animated = useSmoothScrolling(ScrollBehavior::Auto, this);
     1329        AnimatedScroll animated = useSmoothScrolling(ScrollBehavior::Auto, this) ? AnimatedScroll::Yes : AnimatedScroll::No;
    13301330        renderer->setScrollTop(clampedTop, ScrollType::Programmatic, ScrollClamping::Clamped, animated);
    13311331        if (auto* scrollableArea = renderer->layer())
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r258850 r259846  
    16891689    // FIXME: Should we use document()->scrollingElement()?
    16901690    // See https://bugs.webkit.org/show_bug.cgi?id=205059
    1691     if (useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), document()->documentElement())) {
    1692         view->scrollToOffsetWithAnimation(layoutPos, ScrollType::Programmatic, clamping);
    1693         return;
    1694     }
    1695 
    1696     view->setContentsScrollPosition(layoutPos, clamping);
     1691    AnimatedScroll animated = useSmoothScrolling(scrollToOptions.behavior.valueOr(ScrollBehavior::Auto), document()->documentElement()) ? AnimatedScroll::Yes : AnimatedScroll::No;
     1692
     1693    view->setContentsScrollPosition(layoutPos, clamping, animated);
    16971694}
    16981695
  • trunk/Source/WebCore/page/FrameView.cpp

    r259761 r259846  
    22832283}
    22842284
    2285 void FrameView::setScrollPosition(const ScrollPosition& scrollPosition, ScrollClamping clamping, bool animated)
     2285void FrameView::setScrollPosition(const ScrollPosition& scrollPosition, ScrollClamping clamping, AnimatedScroll animated)
    22862286{
    22872287    LOG_WITH_STREAM(Scrolling, stream << "FrameView::setScrollPosition " << scrollPosition << " , clearing anchor");
     
    22962296    if (page && page->isMonitoringWheelEvents())
    22972297        scrollAnimator().setWheelEventTestMonitor(page->wheelEventTestMonitor());
    2298     if (animated)
     2298    if (animated == AnimatedScroll::Yes)
    22992299        scrollToOffsetWithAnimation(scrollOffsetFromPosition(scrollPosition), currentScrollType(), clamping);
    23002300    else
  • trunk/Source/WebCore/page/FrameView.h

    r259761 r259846  
    231231    WEBCORE_EXPORT void setFixedVisibleContentRect(const IntRect&) final;
    232232#endif
    233     WEBCORE_EXPORT void setScrollPosition(const ScrollPosition&, ScrollClamping = ScrollClamping::Clamped, bool animated = false) final;
     233    WEBCORE_EXPORT void setScrollPosition(const ScrollPosition&, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No) final;
    234234    void restoreScrollbar();
    235235    void scheduleScrollToFocusedElement(SelectionRevealMode);
  • trunk/Source/WebCore/platform/ScrollTypes.h

    r255957 r259846  
    6161};
    6262
     63enum class AnimatedScroll : uint8_t {
     64    No,
     65    Yes
     66};
     67
    6368inline ScrollDirection logicalToPhysical(ScrollLogicalDirection direction, bool isVertical, bool isFlipped)
    6469{
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r259761 r259846  
    208208}
    209209
    210 void ScrollView::setContentsScrollPosition(const IntPoint& position, ScrollClamping clamping)
     210void ScrollView::setContentsScrollPosition(const IntPoint& position, ScrollClamping clamping, AnimatedScroll animated)
    211211{
    212212#if PLATFORM(IOS_FAMILY)
     
    214214        setActualScrollPosition(position);
    215215#endif
    216     setScrollPosition(position, clamping);
     216    setScrollPosition(position, clamping, animated);
    217217}
    218218
     
    515515}
    516516
    517 void ScrollView::setScrollPosition(const ScrollPosition& scrollPosition, ScrollClamping clamping, bool/* animated*/)
     517void ScrollView::setScrollPosition(const ScrollPosition& scrollPosition, ScrollClamping clamping, AnimatedScroll/* animated*/)
    518518{
    519519    LOG_WITH_STREAM(Scrolling, stream << "ScrollView::setScrollPosition " << scrollPosition);
     
    527527    }
    528528
    529     ScrollPosition newScrollPosition = (!delegatesScrolling() && clamping == ScrollClamping::Clamped) ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
    530 
    531     if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation && newScrollPosition == this->scrollPosition())
    532         return;
    533 
    534529    if (currentScrollBehaviorStatus() == ScrollBehaviorStatus::InNonNativeAnimation)
    535530        scrollAnimator().cancelAnimations();
     531
     532    ScrollPosition newScrollPosition = (!delegatesScrolling() && clamping == ScrollClamping::Clamped) ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
     533    if ((!delegatesScrolling() || currentScrollType() == ScrollType::User) && currentScrollBehaviorStatus() == ScrollBehaviorStatus::NotInAnimation && newScrollPosition == this->scrollPosition())
     534        return;
    536535
    537536    if (!requestScrollPositionUpdate(newScrollPosition, currentScrollType(), clamping))
  • trunk/Source/WebCore/platform/ScrollView.h

    r259761 r259846  
    233233    // Scroll position used by web-exposed features (has legacy iOS behavior).
    234234    WEBCORE_EXPORT IntPoint contentsScrollPosition() const;
    235     void setContentsScrollPosition(const IntPoint&, ScrollClamping = ScrollClamping::Clamped);
     235    void setContentsScrollPosition(const IntPoint&, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
    236236
    237237#if PLATFORM(IOS_FAMILY)
     
    263263
    264264    // Functions for scrolling the view.
    265     virtual void setScrollPosition(const ScrollPosition&, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
     265    virtual void setScrollPosition(const ScrollPosition&, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
    266266
    267267    void scrollBy(const IntSize& s) { return setScrollPosition(scrollPosition() + s); }
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r259575 r259846  
    582582}
    583583
    584 void RenderBox::setScrollLeft(int newLeft, ScrollType scrollType, ScrollClamping clamping, bool animated)
     584void RenderBox::setScrollLeft(int newLeft, ScrollType scrollType, ScrollClamping clamping, AnimatedScroll animated)
    585585{
    586586    if (!hasOverflowClip() || !layer())
     
    590590}
    591591
    592 void RenderBox::setScrollTop(int newTop, ScrollType scrollType, ScrollClamping clamping, bool animated)
     592void RenderBox::setScrollTop(int newTop, ScrollType scrollType, ScrollClamping clamping, AnimatedScroll animated)
    593593{
    594594    if (!hasOverflowClip() || !layer())
     
    598598}
    599599
    600 void RenderBox::setScrollPosition(const ScrollPosition& position, ScrollType scrollType, ScrollClamping clamping, bool animated)
     600void RenderBox::setScrollPosition(const ScrollPosition& position, ScrollType scrollType, ScrollClamping clamping, AnimatedScroll animated)
    601601{
    602602    if (!hasOverflowClip() || !layer())
    603603        return;
    604604    setupWheelEventMonitor(*layer());
    605     layer()->scrollToPosition(position, scrollType, clamping, animated);
     605    layer()->setScrollPosition(position, scrollType, clamping, animated);
    606606}
    607607
  • trunk/Source/WebCore/rendering/RenderBox.h

    r259210 r259846  
    248248    virtual int scrollWidth() const;
    249249    virtual int scrollHeight() const;
    250     virtual void setScrollLeft(int, ScrollType, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
    251     virtual void setScrollTop(int, ScrollType, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
    252     void setScrollPosition(const ScrollPosition&, ScrollType, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
     250    virtual void setScrollLeft(int, ScrollType, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
     251    virtual void setScrollTop(int, ScrollType, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
     252    void setScrollPosition(const ScrollPosition&, ScrollType, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
    253253
    254254    LayoutUnit marginTop() const override { return m_marginBox.top(); }
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r259762 r259846  
    25912591}
    25922592
    2593 void RenderLayer::scrollToXPosition(int x, ScrollType scrollType, ScrollClamping clamping, bool animated)
     2593void RenderLayer::scrollToXPosition(int x, ScrollType scrollType, ScrollClamping clamping, AnimatedScroll animated)
    25942594{
    25952595    ScrollPosition position(x, m_scrollPosition.y());
    2596     scrollToPosition(position, scrollType, clamping, animated);
    2597 }
    2598 
    2599 void RenderLayer::scrollToYPosition(int y, ScrollType scrollType, ScrollClamping clamping, bool animated)
     2596    setScrollPosition(position, scrollType, clamping, animated);
     2597}
     2598
     2599void RenderLayer::scrollToYPosition(int y, ScrollType scrollType, ScrollClamping clamping, AnimatedScroll animated)
    26002600{
    26012601    ScrollPosition position(m_scrollPosition.x(), y);
    2602     scrollToPosition(position, scrollType, clamping, animated);
    2603 }
    2604 
    2605 void RenderLayer::scrollToPosition(const ScrollPosition& position, ScrollType scrollType, ScrollClamping clamping, bool animated)
    2606 {
    2607     if (animated)
     2602    setScrollPosition(position, scrollType, clamping, animated);
     2603}
     2604
     2605void RenderLayer::setScrollPosition(const ScrollPosition& position, ScrollType scrollType, ScrollClamping clamping, AnimatedScroll animated)
     2606{
     2607    if (animated == AnimatedScroll::Yes)
    26082608        scrollToOffsetWithAnimation(scrollOffsetFromPosition(position), scrollType, clamping);
    26092609    else
     
    28062806}
    28072807
    2808 void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions& options, AutoscrollStatus autoscrollStatus)
     2808void RenderLayer::scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions& options)
    28092809{
    28102810    LOG_WITH_STREAM(Scrolling, stream << "Layer " << this << " scrollRectToVisible " << absoluteRect);
     
    28132813    FrameView& frameView = renderer().view().frameView();
    28142814    auto* parentLayer = enclosingContainingBlockLayer(*this, CrossFrameBoundaries::No);
     2815    bool autoscrollNotInProgress = !renderer().frame().eventHandler().autoscrollInProgress();
    28152816
    28162817    if (allowsCurrentScroll()) {
     
    28312832        if (clampedScrollOffset != scrollOffset() || currentScrollBehaviorStatus() != ScrollBehaviorStatus::NotInAnimation) {
    28322833            ScrollOffset oldScrollOffset = scrollOffset();
    2833             bool animated = autoscrollStatus == AutoscrollStatus::NotInProgress && useSmoothScrolling(options.behavior, box->element());
    2834             scrollToPosition(scrollPositionFromOffset(clampedScrollOffset), ScrollType::Programmatic, ScrollClamping::Clamped, animated);
     2834            AnimatedScroll animated = AnimatedScroll::No;
     2835            if (autoscrollNotInProgress && useSmoothScrolling(options.behavior, box->element()))
     2836                animated = AnimatedScroll::Yes;
     2837            setScrollPosition(scrollPositionFromOffset(clampedScrollOffset), ScrollType::Programmatic, ScrollClamping::Clamped, animated);
    28352838            IntSize scrollOffsetDifference = clampedScrollOffset - oldScrollOffset;
    28362839            localExposeRect.move(-scrollOffsetDifference);
     
    28582861                // FIXME: Should we use contentDocument()->scrollingElement()?
    28592862                // See https://bugs.webkit.org/show_bug.cgi?id=205059
    2860                 bool animated = autoscrollStatus == AutoscrollStatus::NotInProgress && ownerElement->contentDocument() && useSmoothScrolling(options.behavior, ownerElement->contentDocument()->documentElement());
     2863                AnimatedScroll animated = AnimatedScroll::No;
     2864                if (autoscrollNotInProgress
     2865                    && ownerElement->contentDocument()
     2866                    && useSmoothScrolling(options.behavior, ownerElement->contentDocument()->documentElement()))
     2867                    animated = AnimatedScroll::Yes;
    28612868                frameView.setScrollPosition(scrollPosition, ScrollClamping::Clamped, animated);
    28622869
     
    29012908                // FIXME: Should we use document()->scrollingElement()?
    29022909                // See https://bugs.webkit.org/show_bug.cgi?id=205059
    2903                 bool animated = autoscrollStatus == AutoscrollStatus::NotInProgress && useSmoothScrolling(options.behavior, renderer().document().documentElement());
     2910                AnimatedScroll animated = AnimatedScroll::No;
     2911                if (autoscrollNotInProgress && useSmoothScrolling(options.behavior, renderer().document().documentElement()))
     2912                    animated = AnimatedScroll::Yes;
    29042913                frameView.setScrollPosition(clampedScrollPosition, ScrollClamping::Clamped, animated);
    29052914            }
     
    30413050{
    30423051    IntPoint currentDocumentPosition = renderer().view().frameView().windowToContents(positionInWindow);
    3043     scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), false, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded, ShouldAllowCrossOriginScrolling::Yes }, AutoscrollStatus::InProgress);
     3052    scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), false, { SelectionRevealMode::Reveal, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded, ShouldAllowCrossOriginScrolling::Yes });
    30443053}
    30453054
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r259761 r259846  
    451451    WEBCORE_EXPORT void scrollToOffsetWithAnimation(const ScrollOffset&, ScrollType = ScrollType::Programmatic, ScrollClamping = ScrollClamping::Clamped);
    452452
    453     void scrollToXPosition(int x, ScrollType, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
    454     void scrollToYPosition(int y, ScrollType, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
    455     void scrollToPosition(const ScrollPosition&, ScrollType, ScrollClamping = ScrollClamping::Clamped, bool animated = false);
     453    void scrollToXPosition(int x, ScrollType, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
     454    void scrollToYPosition(int y, ScrollType, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
     455    void setScrollPosition(const ScrollPosition&, ScrollType, ScrollClamping = ScrollClamping::Clamped, AnimatedScroll = AnimatedScroll::No);
    456456
    457457    // These are only used by marquee.
     
    467467    void availableContentSizeChanged(AvailableSizeChangeReason) final;
    468468
    469     enum AutoscrollStatus { NotInProgress, InProgress };
    470469    // "absoluteRect" is in scaled document coordinates.
    471     void scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions&, AutoscrollStatus = AutoscrollStatus::NotInProgress);
     470    void scrollRectToVisible(const LayoutRect& absoluteRect, bool insideFixed, const ScrollRectToVisibleOptions&);
    472471
    473472    bool scrollsOverflow() const;
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r259597 r259846  
    744744}
    745745
    746 void RenderListBox::setScrollLeft(int, ScrollType, ScrollClamping, bool)
     746void RenderListBox::setScrollLeft(int, ScrollType, ScrollClamping, AnimatedScroll)
    747747{
    748748}
     
    761761}
    762762
    763 void RenderListBox::setScrollTop(int newTop, ScrollType, ScrollClamping, bool)
     763void RenderListBox::setScrollTop(int newTop, ScrollType, ScrollClamping, AnimatedScroll)
    764764{
    765765    // Determine an index and scroll to it.   
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r259597 r259846  
    107107    int scrollWidth() const override;
    108108    int scrollHeight() const override;
    109     void setScrollLeft(int, ScrollType, ScrollClamping, bool) override;
    110     void setScrollTop(int, ScrollType, ScrollClamping, bool) override;
     109    void setScrollLeft(int, ScrollType, ScrollClamping, AnimatedScroll) override;
     110    void setScrollTop(int, ScrollType, ScrollClamping, AnimatedScroll) override;
    111111
    112112    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r259232 r259846  
    381381}
    382382
    383 void RenderTextControlSingleLine::setScrollLeft(int newLeft, ScrollType, ScrollClamping, bool)
     383void RenderTextControlSingleLine::setScrollLeft(int newLeft, ScrollType, ScrollClamping, AnimatedScroll)
    384384{
    385385    if (innerTextElement())
     
    387387}
    388388
    389 void RenderTextControlSingleLine::setScrollTop(int newTop, ScrollType, ScrollClamping, bool)
     389void RenderTextControlSingleLine::setScrollTop(int newTop, ScrollType, ScrollClamping, AnimatedScroll)
    390390{
    391391    if (innerTextElement())
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h

    r255957 r259846  
    5858    int scrollWidth() const override;
    5959    int scrollHeight() const override;
    60     void setScrollLeft(int, ScrollType, ScrollClamping, bool) override;
    61     void setScrollTop(int, ScrollType, ScrollClamping, bool) override;
     60    void setScrollLeft(int, ScrollType, ScrollClamping, AnimatedScroll) override;
     61    void setScrollTop(int, ScrollType, ScrollClamping, AnimatedScroll) override;
    6262    bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) final;
    6363    bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) final;
Note: See TracChangeset for help on using the changeset viewer.