Changeset 104855 in webkit


Ignore:
Timestamp:
Jan 12, 2012 1:39:54 PM (12 years ago)
Author:
andersca@apple.com
Message:

Make ScrollElasticityController members private
https://bugs.webkit.org/show_bug.cgi?id=76208

Reviewed by Andreas Kling.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::endScrollGesture):
Call ScrollElasticityController::endScrollGesture.

  • platform/mac/ScrollElasticityController.h:

Make members private.

  • platform/mac/ScrollElasticityController.mm:

(WebCore::ScrollElasticityController::endScrollGesture):
Call snapRubberBand.

(WebCore::ScrollElasticityController::snapRubberBandTimerFired):
Call stopSnapRubberbandTimer.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r104853 r104855  
     12012-01-12  Anders Carlsson  <andersca@apple.com>
     2
     3        Make ScrollElasticityController members private
     4        https://bugs.webkit.org/show_bug.cgi?id=76208
     5
     6        Reviewed by Andreas Kling.
     7
     8        * platform/mac/ScrollAnimatorMac.mm:
     9        (WebCore::ScrollAnimatorMac::endScrollGesture):
     10        Call ScrollElasticityController::endScrollGesture.
     11
     12        * platform/mac/ScrollElasticityController.h:
     13        Make members private.
     14
     15        * platform/mac/ScrollElasticityController.mm:
     16        (WebCore::ScrollElasticityController::endScrollGesture):
     17        Call snapRubberBand.
     18
     19        (WebCore::ScrollElasticityController::snapRubberBandTimerFired):
     20        Call stopSnapRubberbandTimer.
     21
    1222012-01-12  Anders Carlsson  <andersca@apple.com>
    223
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r104853 r104855  
    10861086    didEndScrollGesture();
    10871087
    1088     m_scrollElasticityController.snapRubberBand();
     1088    m_scrollElasticityController.endScrollGesture();
    10891089}
    10901090
  • trunk/Source/WebCore/platform/mac/ScrollElasticityController.h

    r104853 r104855  
    6565
    6666    void beginScrollGesture();
     67    void endScrollGesture();
    6768
    6869    bool handleWheelEvent(const PlatformWheelEvent&);
     
    7172private:
    7273    void stopSnapRubberbandTimer();
    73 
    74     // FIXME: These members should be private. They are currently public as a stop-gap measure, while
    75     // the rubber-band related code from ScrollAnimatorMac is being moved over.
    76 public:
    7774    void snapRubberBand();
    7875
  • trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm

    r104853 r104855  
    133133}
    134134
     135void ScrollElasticityController::endScrollGesture()
     136{
     137    snapRubberBand();
     138}
     139
    135140bool ScrollElasticityController::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
    136141{
     
    306311            m_startStretch = m_client->stretchAmount();
    307312            if (m_startStretch == FloatSize()) {
    308                 m_client->stopSnapRubberbandTimer();
     313                stopSnapRubberbandTimer();
    309314
    310315                m_stretchScrollForce = FloatSize();
     
    313318                m_origOrigin = FloatPoint();
    314319                m_origVelocity = FloatSize();
    315                 m_snapRubberbandTimerIsActive = false;
    316 
    317320                return;
    318321            }
     
    348351        } else {
    349352            m_client->immediateScrollBy(m_origOrigin - m_client->absoluteScrollPosition());
    350             m_client->stopSnapRubberbandTimer();
    351 
     353
     354            stopSnapRubberbandTimer();
    352355            m_stretchScrollForce = FloatSize();
    353356            m_startTime = 0;
     
    355358            m_origOrigin = FloatPoint();
    356359            m_origVelocity = FloatSize();
    357             m_snapRubberbandTimerIsActive = false;
    358360        }
    359361    } else {
Note: See TracChangeset for help on using the changeset viewer.