Changeset 96874 in webkit


Ignore:
Timestamp:
Oct 6, 2011 4:42:57 PM (13 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/9717490> Flash of white when navigating daringfireball.net
https://bugs.webkit.org/show_bug.cgi?id=69581

Reviewed by Darin Adler.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::updateScrollbars): Moved the calls to Scrollbar::setEnabled() into the code
section where invalidation is suppressed if necessary, so that they do not trigger premature invalidation.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r96873 r96874  
     12011-10-06  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/9717490> Flash of white when navigating daringfireball.net
     4        https://bugs.webkit.org/show_bug.cgi?id=69581
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/ScrollView.cpp:
     9        (WebCore::ScrollView::updateScrollbars): Moved the calls to Scrollbar::setEnabled() into the code
     10        section where invalidation is suppressed if necessary, so that they do not trigger premature invalidation.
     11
    1122011-10-06  Dan Bernstein  <mitz@apple.com>
    213
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r96639 r96874  
    533533    if (m_horizontalScrollbar) {
    534534        int clientWidth = visibleWidth();
    535         m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth);
    536535        int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
    537536        IntRect oldRect(m_horizontalScrollbar->frameRect());
     
    546545        if (m_scrollbarsSuppressed)
    547546            m_horizontalScrollbar->setSuppressInvalidation(true);
     547        m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth);
    548548        m_horizontalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
    549549        m_horizontalScrollbar->setProportion(clientWidth, contentsWidth());
     
    554554    if (m_verticalScrollbar) {
    555555        int clientHeight = visibleHeight();
    556         m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
    557556        int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
    558557        IntRect oldRect(m_verticalScrollbar->frameRect());
     
    567566        if (m_scrollbarsSuppressed)
    568567            m_verticalScrollbar->setSuppressInvalidation(true);
     568        m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
    569569        m_verticalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
    570570        m_verticalScrollbar->setProportion(clientHeight, contentsHeight());
Note: See TracChangeset for help on using the changeset viewer.