Changeset 83376 in webkit


Ignore:
Timestamp:
Apr 9, 2011 1:31:00 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-09 Jon Lee <jonlee@apple.com>

Reviewed by Beth Dakin.

Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
https://bugs.webkit.org/show_bug.cgi?id=58180
<rdar://problem/9047984>

  • platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83375 r83376  
     12011-04-09  Jon Lee  <jonlee@apple.com>
     2
     3        Reviewed by Beth Dakin.
     4
     5        Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
     6        https://bugs.webkit.org/show_bug.cgi?id=58180
     7        <rdar://problem/9047984>
     8
     9        * platform/mac/ScrollAnimatorMac.mm:
     10        (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting
     11        (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
     12        (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
     13
    1142011-04-09  Sreeram Ramachandran  <sreeram@google.com>
    215
  • trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm

    r83254 r83376  
    581581    FloatPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
    582582 
     583    if (adjustedPosition.x() == m_currentPosX && adjustedPosition.y() == m_currentPosY)
     584        return;
     585   
    583586    m_currentPosX = adjustedPosition.x();
    584587    m_currentPosY = adjustedPosition.y();
     
    588591void ScrollAnimatorMac::immediateScrollByDeltaX(float deltaX)
    589592{
    590     m_currentPosX = adjustScrollXPositionIfNecessary(m_currentPosX + deltaX);
     593    float newPosX = adjustScrollXPositionIfNecessary(m_currentPosX + deltaX);
     594   
     595    if (newPosX == m_currentPosX)
     596        return;
     597   
     598    m_currentPosX = newPosX;
    591599    notityPositionChanged();
    592600}
     
    594602void ScrollAnimatorMac::immediateScrollByDeltaY(float deltaY)
    595603{
    596     m_currentPosY = adjustScrollYPositionIfNecessary(m_currentPosY + deltaY);
     604    float newPosY = adjustScrollYPositionIfNecessary(m_currentPosY + deltaY);
     605   
     606    if (newPosY == m_currentPosY)
     607        return;
     608   
     609    m_currentPosY = newPosY;
    597610    notityPositionChanged();
    598611}
Note: See TracChangeset for help on using the changeset viewer.