Changeset 107429 in webkit


Ignore:
Timestamp:
Feb 10, 2012 12:49:45 PM (12 years ago)
Author:
andersca@apple.com
Message:

Minor ScrollableArea cleanup
https://bugs.webkit.org/show_bug.cgi?id=78372

Reviewed by Beth Dakin.

Get rid of scrollToXOffsetWithoutAnimation and scrollToYOffsetWithoutAnimation.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):

  • platform/ScrollableArea.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::computeLogicalHeight):
(WebCore::RenderListBox::scrollToRevealElementAtListIndex):
(WebCore::RenderListBox::setScrollTop):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107428 r107429  
     12012-02-10  Anders Carlsson  <andersca@apple.com>
     2
     3        Minor ScrollableArea cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=78372
     5
     6        Reviewed by Beth Dakin.
     7
     8        Get rid of scrollToXOffsetWithoutAnimation and scrollToYOffsetWithoutAnimation.
     9
     10        * platform/ScrollableArea.cpp:
     11        (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
     12        * platform/ScrollableArea.h:
     13        * rendering/RenderListBox.cpp:
     14        (WebCore::RenderListBox::computeLogicalHeight):
     15        (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
     16        (WebCore::RenderListBox::setScrollTop):
     17
    1182012-02-10  Benjamin Poulain  <bpoulain@apple.com>
    219
  • trunk/Source/WebCore/platform/ScrollableArea.cpp

    r106061 r107429  
    134134{
    135135    if (orientation == HorizontalScrollbar)
    136         scrollToXOffsetWithoutAnimation(offset);
     136        scrollToOffsetWithoutAnimation(FloatPoint(offset, scrollAnimator()->currentPosition().y()));
    137137    else
    138         scrollToYOffsetWithoutAnimation(offset);
    139 }
    140 
    141 void ScrollableArea::scrollToXOffsetWithoutAnimation(float x)
    142 {
    143     scrollToOffsetWithoutAnimation(FloatPoint(x, scrollAnimator()->currentPosition().y()));
    144 }
    145 
    146 void ScrollableArea::scrollToYOffsetWithoutAnimation(float y)
    147 {
    148     scrollToOffsetWithoutAnimation(FloatPoint(scrollAnimator()->currentPosition().x(), y));
     138        scrollToOffsetWithoutAnimation(FloatPoint(scrollAnimator()->currentPosition().x(), offset));
    149139}
    150140
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r107006 r107429  
    4848    void scrollToOffsetWithoutAnimation(const FloatPoint&);
    4949    void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
    50     void scrollToXOffsetWithoutAnimation(float x);
    51     void scrollToYOffsetWithoutAnimation(float x);
    5250
    5351    virtual void zoomAnimatorTransformChanged(float, float, float, ZoomAnimationState);
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r107032 r107429  
    256256        m_vBar->setProportion(numVisibleItems(), numItems());
    257257        if (!enabled) {
    258             scrollToYOffsetWithoutAnimation(0);
     258            scrollToOffsetWithoutAnimation(VerticalScrollbar, 0);
    259259            m_indexOffset = 0;
    260260        }
     
    580580        newOffset = index - numVisibleItems() + 1;
    581581
    582     ScrollableArea::scrollToYOffsetWithoutAnimation(newOffset);
     582    scrollToOffsetWithoutAnimation(VerticalScrollbar, newOffset);
    583583
    584584    return true;
     
    676676        return;
    677677   
    678     ScrollableArea::scrollToYOffsetWithoutAnimation(index);
     678    scrollToOffsetWithoutAnimation(VerticalScrollbar, index);
    679679}
    680680
Note: See TracChangeset for help on using the changeset viewer.