Title: [233534] trunk/Source/WebCore
Revision
233534
Author
pvol...@apple.com
Date
2018-07-05 12:39:44 -0700 (Thu, 05 Jul 2018)

Log Message

Use ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) in ScrollAnimatorMac.mm
https://bugs.webkit.org/show_bug.cgi?id=187334

Reviewed by Alex Christensen.

Use ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) instead of __MAC_OS_X_VERSION_MIN_REQUIRED when deciding
to use NSTimer or NSAnimation for scrollbar animation.

No new tests. No change in behavior.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
(-[WebScrollbarPartAnimation startAnimation]):
(-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (233533 => 233534)


--- trunk/Source/WebCore/ChangeLog	2018-07-05 19:28:01 UTC (rev 233533)
+++ trunk/Source/WebCore/ChangeLog	2018-07-05 19:39:44 UTC (rev 233534)
@@ -1,3 +1,20 @@
+2018-07-05  Per Arne Vollan  <pvol...@apple.com>
+
+        Use ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) in ScrollAnimatorMac.mm
+        https://bugs.webkit.org/show_bug.cgi?id=187334
+
+        Reviewed by Alex Christensen.
+
+        Use ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) instead of __MAC_OS_X_VERSION_MIN_REQUIRED when deciding
+        to use NSTimer or NSAnimation for scrollbar animation.
+
+        No new tests. No change in behavior.
+
+        * platform/mac/ScrollAnimatorMac.mm:
+        (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
+        (-[WebScrollbarPartAnimation startAnimation]):
+        (-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]):
+
 2018-07-05  Timothy Hatcher  <timo...@apple.com>
 
         Don't invert text color for selections in light mode.

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (233533 => 233534)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2018-07-05 19:28:01 UTC (rev 233533)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2018-07-05 19:39:44 UTC (rev 233534)
@@ -286,7 +286,7 @@
     ExpansionTransition
 };
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 @interface WebScrollbarPartAnimation : NSAnimation
 #else
 @interface WebScrollbarPartAnimation : NSObject
@@ -297,7 +297,7 @@
     FeatureToAnimate _featureToAnimate;
     CGFloat _startValue;
     CGFloat _endValue;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     NSTimeInterval _duration;
     RetainPtr<NSTimer> _timer;
     RetainPtr<NSDate> _startDate;
@@ -305,7 +305,7 @@
 #endif
 }
 - (id)initWithScrollbar:(Scrollbar*)scrollbar featureToAnimate:(FeatureToAnimate)featureToAnimate animateFrom:(CGFloat)startValue animateTo:(CGFloat)endValue duration:(NSTimeInterval)duration;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 - (void)setCurrentProgress:(NSTimer *)timer;
 - (void)setDuration:(NSTimeInterval)duration;
 - (void)stopAnimation;
@@ -316,7 +316,7 @@
 
 - (id)initWithScrollbar:(Scrollbar*)scrollbar featureToAnimate:(FeatureToAnimate)featureToAnimate animateFrom:(CGFloat)startValue animateTo:(CGFloat)endValue duration:(NSTimeInterval)duration
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     self = [super initWithDuration:duration animationCurve:NSAnimationEaseInOut];
     if (!self)
         return nil;
@@ -332,7 +332,7 @@
     _startValue = startValue;
     _endValue = endValue;
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     [self setAnimationBlockingMode:NSAnimationNonblocking];
 #endif
 
@@ -345,7 +345,7 @@
 
     _scrollerImp = scrollerImpForScrollbar(*_scrollbar);
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     [super startAnimation];
 #else
     [[NSRunLoop mainRunLoop] addTimer:_timer.get() forMode:NSDefaultRunLoopMode];
@@ -363,13 +363,13 @@
     _endValue = endValue;
 }
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 - (void)setCurrentProgress:(NSAnimationProgress)progress
 #else
 - (void)setCurrentProgress:(NSTimer *)timer
 #endif
 {
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
+#if !ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     [super setCurrentProgress:progress];
 #else
     CGFloat progress = 0;
@@ -420,7 +420,7 @@
     _scrollbar = 0;
 }
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
 - (void)setDuration:(NSTimeInterval)duration
 {
     _duration = duration;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to