Changeset 86293 in webkit


Ignore:
Timestamp:
May 11, 2011 5:45:30 PM (13 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/9414874> Layout unnecessarily interrupts smooth scrolling at msnbc.com
https://bugs.webkit.org/show_bug.cgi?id=60677

Reviewed by Darin Adler.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::updateScrollbars): Only perform an immediate scroll, aborting any running
animation, if the new scroll offset computed here is different from the current scroll offset.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86292 r86293  
     12011-05-11  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/9414874> Layout unnecessarily interrupts smooth scrolling at msnbc.com
     6        https://bugs.webkit.org/show_bug.cgi?id=60677
     7
     8        * platform/ScrollView.cpp:
     9        (WebCore::ScrollView::updateScrollbars): Only perform an immediate scroll, aborting any running
     10        animation, if the new scroll offset computed here is different from the current scroll offset.
     11
    1122011-05-11  Kent Tamura  <tkent@chromium.org>
    213
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r86102 r86293  
    537537    m_inUpdateScrollbars = true;
    538538
    539     IntPoint scrollPoint = adjustScrollPositionWithinRange(IntPoint(desiredOffset));
    540     IntSize scroll(scrollPoint.x(), scrollPoint.y());
    541 
    542539    if (m_horizontalScrollbar) {
    543540        int clientWidth = visibleWidth();
     
    587584    }
    588585
    589     ScrollableArea::scrollToOffsetWithoutAnimation(FloatPoint(scroll.width() + m_scrollOrigin.x(), scroll.height() + m_scrollOrigin.y()));
     586    IntPoint scrollPoint = adjustScrollPositionWithinRange(IntPoint(desiredOffset)) + IntSize(m_scrollOrigin.x(), m_scrollOrigin.y());
     587    if (scrollPoint != scrollPosition())
     588        ScrollableArea::scrollToOffsetWithoutAnimation(scrollPoint);
    590589
    591590    // Make sure the scrollbar offsets are up to date.
Note: See TracChangeset for help on using the changeset viewer.