Title: [158968] trunk/Source/WebCore
Revision
158968
Author
[email protected]
Date
2013-11-08 15:53:54 -0800 (Fri, 08 Nov 2013)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (158967 => 158968)


--- trunk/Source/WebCore/ChangeLog	2013-11-08 23:46:57 UTC (rev 158967)
+++ trunk/Source/WebCore/ChangeLog	2013-11-08 23:53:54 UTC (rev 158968)
@@ -1,3 +1,24 @@
+2013-11-08  Simon Fraser  <[email protected]>
+
+        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):
+
 2013-11-08  Hans Muller  <[email protected]>
 
         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (158967 => 158968)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2013-11-08 23:46:57 UTC (rev 158967)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2013-11-08 23:53:54 UTC (rev 158968)
@@ -559,10 +559,16 @@
 
         // If we ever turn one scrollbar off, always turn the other one off too.  Never ever
         // try to both gain/lose a scrollbar in the same pass.
-        if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn)
+        bool needAnotherPass = false;
+        if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn) {
             newHasVerticalScrollbar = false;
-        if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn)
+            needAnotherPass = true;
+        }
+
+        if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn) {
             newHasHorizontalScrollbar = false;
+            needAnotherPass = true;
+        }
 
         if (hasHorizontalScrollbar != newHasHorizontalScrollbar && (hasHorizontalScrollbar || !avoidScrollbarCreation())) {
             if (scrollOrigin().y() && !newHasHorizontalScrollbar)
@@ -590,7 +596,7 @@
             }
         }
 
-        if (sendContentResizedNotification && m_updateScrollbarsPass < cMaxUpdateScrollbarsPass) {
+        if ((sendContentResizedNotification || needAnotherPass) && m_updateScrollbarsPass < cMaxUpdateScrollbarsPass) {
             m_updateScrollbarsPass++;
             contentsResized();
             visibleContentsResized();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to