[Mac] WebKit abandons overlay scrollbar CALayers.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 19:44:00 +0000 (19:44 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 19:44:00 +0000 (19:44 +0000)
<https://webkit.org/b/141943>
<rdar://problem/19932199>

Reviewed by Beth Dakin.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
amounts of abandoned memory to accumulate over time.

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

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

index fb0b214..d32f3eb 100644 (file)
@@ -1,3 +1,17 @@
+2015-02-24  Andreas Kling  <akling@apple.com>
+
+        [Mac] WebKit abandons overlay scrollbar CALayers.
+        <https://webkit.org/b/141943>
+        <rdar://problem/19932199>
+
+        Reviewed by Beth Dakin.
+
+        * platform/mac/ScrollAnimatorMac.mm:
+        (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
+        Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
+        The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
+        amounts of abandoned memory to accumulate over time.
+
 2015-02-24  Anders Carlsson  <andersca@apple.com>
 
         Implement more of the data fetching API
index 08b2abd..65a51c7 100644 (file)
@@ -315,7 +315,8 @@ enum FeatureToAnimate {
     _startValue = startValue;
     _endValue = endValue;
 
-    [self setAnimationBlockingMode:NSAnimationNonblocking];
+    // FIXME: This is a workaround for <rdar://problem/19899011>.
+    [self setAnimationBlockingMode:NSAnimationNonblockingThreaded];
 
     return self;
 }