Changeset 158968 in webkit


Ignore:
Timestamp:
Nov 8, 2013 3:53:54 PM (10 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=124075

Reviewed by Beth Dakin.

In r155660 I removed some scrollbar-related layouts when scrollbars
are in overlay mode.

However, ScrollView::updateScrollbars() has a case where we still need
to do multiple pases, related to its "Never ever try to both gain/lose a
scrollbar in the same pass" comment. When we avoid making a new scrollbar
because the other was removed, we need to do another pass to bring the
correct scrollbar back.

Can't test overlay scrollbars in tests.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::updateScrollbars):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r158967 r158968  
     12013-11-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
     4        https://bugs.webkit.org/show_bug.cgi?id=124075
     5
     6        Reviewed by Beth Dakin.
     7       
     8        In r155660 I removed some scrollbar-related layouts when scrollbars
     9        are in overlay mode.
     10       
     11        However, ScrollView::updateScrollbars() has a case where we still need
     12        to do multiple pases, related to its "Never ever try to both gain/lose a
     13        scrollbar in the same pass" comment. When we avoid making a new scrollbar
     14        because the other was removed, we need to do another pass to bring the
     15        correct scrollbar back.
     16
     17        Can't test overlay scrollbars in tests.
     18
     19        * platform/ScrollView.cpp:
     20        (WebCore::ScrollView::updateScrollbars):
     21
    1222013-11-08  Hans Muller  <hmuller@adobe.com>
    223
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r157653 r158968  
    560560        // If we ever turn one scrollbar off, always turn the other one off too.  Never ever
    561561        // try to both gain/lose a scrollbar in the same pass.
    562         if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn)
     562        bool needAnotherPass = false;
     563        if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn) {
    563564            newHasVerticalScrollbar = false;
    564         if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn)
     565            needAnotherPass = true;
     566        }
     567
     568        if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn) {
    565569            newHasHorizontalScrollbar = false;
     570            needAnotherPass = true;
     571        }
    566572
    567573        if (hasHorizontalScrollbar != newHasHorizontalScrollbar && (hasHorizontalScrollbar || !avoidScrollbarCreation())) {
     
    591597        }
    592598
    593         if (sendContentResizedNotification && m_updateScrollbarsPass < cMaxUpdateScrollbarsPass) {
     599        if ((sendContentResizedNotification || needAnotherPass) && m_updateScrollbarsPass < cMaxUpdateScrollbarsPass) {
    594600            m_updateScrollbarsPass++;
    595601            contentsResized();
Note: See TracChangeset for help on using the changeset viewer.