Title: [102469] trunk/Source/WebCore
Revision
102469
Author
[email protected]
Date
2011-12-09 13:25:08 -0800 (Fri, 09 Dec 2011)

Log Message

Remove NSAnimationContext calls
https://bugs.webkit.org/show_bug.cgi?id=74207

Reviewed by Sam Weinig.

NSAnimationContext is not used for NSAnimation subclasses, so the calls to beginGrouping/endGrouping and setDuration:
are essentially no-ops. Remove them.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (102468 => 102469)


--- trunk/Source/WebCore/ChangeLog	2011-12-09 21:16:46 UTC (rev 102468)
+++ trunk/Source/WebCore/ChangeLog	2011-12-09 21:25:08 UTC (rev 102469)
@@ -1,5 +1,19 @@
 2011-12-09  Anders Carlsson  <[email protected]>
 
+        Remove NSAnimationContext calls
+        https://bugs.webkit.org/show_bug.cgi?id=74207
+
+        Reviewed by Sam Weinig.
+
+        NSAnimationContext is not used for NSAnimation subclasses, so the calls to beginGrouping/endGrouping and setDuration:
+        are essentially no-ops. Remove them.
+
+        * platform/mac/ScrollAnimatorMac.mm:
+        (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
+        (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
+
+2011-12-09  Anders Carlsson  <[email protected]>
+
         Rename scrollAnimatorDestroyed to invalidate
         https://bugs.webkit.org/show_bug.cgi?id=74206
 

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (102468 => 102469)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2011-12-09 21:16:46 UTC (rev 102468)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2011-12-09 21:25:08 UTC (rev 102469)
@@ -470,15 +470,12 @@
             [self scrollAnimator]->setVisibleScrollerThumbRect(IntRect());
     }
 
-    [NSAnimationContext beginGrouping];
-    [[NSAnimationContext currentContext] setDuration:duration];
     scrollbarPartAnimation.adoptNS([[WebScrollbarPartAnimation alloc] initWithScrollbar:_scrollbar 
                                                                        featureToAnimate:part == ThumbPart ? ThumbAlpha : TrackAlpha
                                                                             animateFrom:part == ThumbPart ? [scrollerPainter knobAlpha] : [scrollerPainter trackAlpha]
                                                                               animateTo:newAlpha 
                                                                                duration:duration]);
     [scrollbarPartAnimation.get() startAnimation];
-    [NSAnimationContext endGrouping];
 }
 
 - (void)scrollerImp:(id)scrollerImp animateKnobAlphaTo:(CGFloat)newKnobAlpha duration:(NSTimeInterval)duration
@@ -518,8 +515,6 @@
     // UIStateTransition always animates to 1. In case an animation is in progress this avoids a hard transition.
     [scrollerPainter setUiStateTransitionProgress:1 - [scrollerPainter uiStateTransitionProgress]];
 
-    [NSAnimationContext beginGrouping];
-    [[NSAnimationContext currentContext] setDuration:duration];
     if (!_uiStateTransitionAnimation)
         _uiStateTransitionAnimation.adoptNS([[WebScrollbarPartAnimation alloc] initWithScrollbar:_scrollbar 
                                                                                 featureToAnimate:UIStateTransition
@@ -533,7 +528,6 @@
         [_uiStateTransitionAnimation.get() setDuration:duration];
     }
     [_uiStateTransitionAnimation.get() startAnimation];
-    [NSAnimationContext endGrouping];
 }
 
 - (void)scrollerImp:(id)scrollerImp overlayScrollerStateChangedTo:(NSUInteger)newOverlayScrollerState
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to