REGRESSION(r156316): Scrollbar on a large document is broken
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2014 21:36:47 +0000 (21:36 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2014 21:36:47 +0000 (21:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130474
<rdar://problem/16371523>

Reviewed by Anders Carlsson.

The bug was caused by updateArrowPlacement() doing the work even though Scrollbar Overlay API is available.
Prior to r156316, this function exited early:
http://trac.webkit.org/browser/trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm?rev=156315#L147

Fixed the bug by deleting updateArrowPlacement() entirely.

* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::preferencesChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/ScrollbarThemeMac.mm

index a159d5f9fe22c82c3071ca7940462717ebb9162f..d7f5122dfd8d9548de1175ef07e92c8ccb15407e 100644 (file)
@@ -1,3 +1,20 @@
+2014-03-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        REGRESSION(r156316): Scrollbar on a large document is broken
+        https://bugs.webkit.org/show_bug.cgi?id=130474
+        <rdar://problem/16371523>
+
+        Reviewed by Anders Carlsson.
+
+        The bug was caused by updateArrowPlacement() doing the work even though Scrollbar Overlay API is available.
+        Prior to r156316, this function exited early:
+        http://trac.webkit.org/browser/trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm?rev=156315#L147
+
+        Fixed the bug by deleting updateArrowPlacement() entirely.
+
+        * platform/mac/ScrollbarThemeMac.mm:
+        (WebCore::ScrollbarThemeMac::preferencesChanged):
+
 2014-03-19  Jer Noble  <jer.noble@apple.com>
 
         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
index 78b2cf4687cafc1ffbcd93f395ffe79fdbd074dd..cc70ca41fe8d98c49f91c180f4e4204389a456d4 100644 (file)
@@ -141,21 +141,6 @@ static bool supportsExpandedScrollbars()
     return globalSupportsExpandedScrollbars;
 }
 
-static void updateArrowPlacement()
-{
-    NSString *buttonPlacement = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleScrollBarVariant"];
-    if ([buttonPlacement isEqualToString:@"Single"])
-        gButtonPlacement = ScrollbarButtonsSingle;
-    else if ([buttonPlacement isEqualToString:@"DoubleMin"])
-        gButtonPlacement = ScrollbarButtonsDoubleStart;
-    else if ([buttonPlacement isEqualToString:@"DoubleBoth"])
-        gButtonPlacement = ScrollbarButtonsDoubleBoth;
-    else {
-
-        gButtonPlacement = ScrollbarButtonsDoubleEnd;
-    }
-}
-
 static NSControlSize scrollbarControlSizeToNSControlSize(ScrollbarControlSize controlSize)
 {
     switch (controlSize) {
@@ -226,7 +211,6 @@ void ScrollbarThemeMac::preferencesChanged()
 {
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     [defaults synchronize];
-    updateArrowPlacement();
     gInitialButtonDelay = [defaults floatForKey:@"NSScrollerButtonDelay"];
     gAutoscrollButtonDelay = [defaults floatForKey:@"NSScrollerButtonPeriod"];
     gJumpOnTrackClick = [defaults boolForKey:@"AppleScrollerPagingBehavior"];