Title: [115589] trunk/Source/WebCore
Revision
115589
Author
[email protected]
Date
2012-04-28 18:32:16 -0700 (Sat, 28 Apr 2012)

Log Message

Smooth scrolling needs a new key
<rdar://problem/11331632>

Reviewed by Geoffrey Garen.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollAnimationEnabledForSystem):
(WebCore::ScrollAnimatorMac::scroll):
Update for new key.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115588 => 115589)


--- trunk/Source/WebCore/ChangeLog	2012-04-29 01:14:05 UTC (rev 115588)
+++ trunk/Source/WebCore/ChangeLog	2012-04-29 01:32:16 UTC (rev 115589)
@@ -1,3 +1,15 @@
+2012-04-28  Sam Weinig  <[email protected]>
+
+        Smooth scrolling needs a new key
+        <rdar://problem/11331632>
+
+        Reviewed by Geoffrey Garen.
+
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::scrollAnimationEnabledForSystem):
+        (WebCore::ScrollAnimatorMac::scroll):
+        Update for new key.
+
 2012-04-28  Li Yin  <[email protected]>
 
         MessagePort must set m_closed to be true at the end of MessagePort::close function

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (115588 => 115589)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2012-04-29 01:14:05 UTC (rev 115588)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2012-04-29 01:32:16 UTC (rev 115589)
@@ -589,11 +589,20 @@
     }
 }
 
+static bool scrollAnimationEnabledForSystem()
+{
+#if defined(BUILDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION)
+    return [[NSUserDefaults standardUserDefaults] boolForKey:@"AppleScrollAnimationEnabled"];
+#else
+    return [[NSUserDefaults standardUserDefaults] boolForKey:@"NSScrollAnimationEnabled"];
+#endif
+}
+
 bool ScrollAnimatorMac::scroll(ScrollbarOrientation orientation, ScrollGranularity granularity, float step, float multiplier)
 {
     m_haveScrolledSincePageLoad = true;
 
-    if (![[NSUserDefaults standardUserDefaults] boolForKey:@"AppleScrollAnimationEnabled"] || !m_scrollableArea->scrollAnimatorEnabled())
+    if (!scrollAnimationEnabledForSystem() || !m_scrollableArea->scrollAnimatorEnabled())
         return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
 
     if (granularity == ScrollByPixel)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to