Changeset 104345 in webkit


Ignore:
Timestamp:
Jan 6, 2012 2:58:50 PM (12 years ago)
Author:
andersca@apple.com
Message:

Add and use ScrollElasticityControllerClient::absoluteScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=75744

Reviewed by Dan Bernstein.

  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::absoluteScrollPosition):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):

  • platform/mac/ScrollElasticityController.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r104344 r104345  
     12012-01-06  Anders Carlsson  <andersca@apple.com>
     2
     3        Add and use ScrollElasticityControllerClient::absoluteScrollPosition
     4        https://bugs.webkit.org/show_bug.cgi?id=75744
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * platform/mac/ScrollAnimatorMac.h:
     9        * platform/mac/ScrollAnimatorMac.mm:
     10        (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
     11        (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
     12        * platform/mac/ScrollElasticityController.h:
     13
    1142012-01-06  Adam Barth  <abarth@webkit.org>
    215
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h

    r104321 r104345  
    131131    virtual bool canScrollHorizontally() OVERRIDE;
    132132    virtual bool canScrollVertically() OVERRIDE;
     133    virtual WebCore::IntPoint absoluteScrollPosition() OVERRIDE;
    133134    virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) OVERRIDE;
    134135    virtual void immediateScrollBy(const FloatSize&) OVERRIDE;
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r104341 r104345  
    10671067        return false;
    10681068    return scrollbar->enabled();
     1069}
     1070
     1071IntPoint ScrollAnimatorMac::absoluteScrollPosition()
     1072{
     1073    return m_scrollableArea->visibleContentRect().location() + m_scrollableArea->scrollOrigin();
    10691074}
    10701075
     
    13511356            }
    13521357
    1353             m_scrollElasticityController.m_origOrigin = (m_scrollableArea->visibleContentRect().location() + m_scrollableArea->scrollOrigin()) - m_scrollElasticityController.m_startStretch;
     1358            m_scrollElasticityController.m_origOrigin = m_scrollElasticityController.m_client->absoluteScrollPosition() - m_scrollElasticityController.m_startStretch;
    13541359            m_scrollElasticityController.m_origVelocity = m_scrollElasticityController.m_momentumVelocity;
    13551360
  • trunk/Source/WebCore/platform/mac/ScrollElasticityController.h

    r104321 r104345  
    4444    virtual bool canScrollHorizontally() = 0;
    4545    virtual bool canScrollVertically() = 0;
     46
     47    // Return the absolute scroll position, not relative to the scroll origin.
     48    virtual WebCore::IntPoint absoluteScrollPosition() = 0;
     49
    4650    virtual void immediateScrollBy(const FloatSize&) = 0;
    4751    virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) = 0;
Note: See TracChangeset for help on using the changeset viewer.