Title: [87003] trunk/Source/WebKit/mac
Revision
87003
Author
[email protected]
Date
2011-05-20 17:29:51 -0700 (Fri, 20 May 2011)

Log Message

2011-05-20  Jeremy Noble  <[email protected]>

        Reviewed by Simon Fraser.

        Stack overflow in WebFullScreenController when built on Leopard and run on SnowLeopard.
        https://bugs.webkit.org/show_bug.cgi?id=61224

        Remove the CATransaction(SnowLeopardConvenience) functions, and replace them with the Leopard
        versions of same.

        * WebView/WebFullScreenController.mm:
        (-[WebFullScreenController windowDidEnterFullscreen:]):
        (-[WebFullScreenController enterFullscreen:]):
        (-[WebFullScreenController exitFullscreen]):
        (-[WebFullscreenWindow setRendererLayer:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (87002 => 87003)


--- trunk/Source/WebKit/mac/ChangeLog	2011-05-21 00:20:46 UTC (rev 87002)
+++ trunk/Source/WebKit/mac/ChangeLog	2011-05-21 00:29:51 UTC (rev 87003)
@@ -1,3 +1,19 @@
+2011-05-20  Jeremy Noble  <[email protected]>
+
+        Reviewed by Simon Fraser.
+
+        Stack overflow in WebFullScreenController when built on Leopard and run on SnowLeopard.
+        https://bugs.webkit.org/show_bug.cgi?id=61224
+
+        Remove the CATransaction(SnowLeopardConvenience) functions, and replace them with the Leopard
+        versions of same.
+
+        * WebView/WebFullScreenController.mm:
+        (-[WebFullScreenController windowDidEnterFullscreen:]):
+        (-[WebFullScreenController enterFullscreen:]):
+        (-[WebFullScreenController exitFullscreen]):
+        (-[WebFullscreenWindow setRendererLayer:]):
+
 2011-05-20  Andy Estes  <[email protected]>
 
         Reviewed by Darin Adler.

Modified: trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm (87002 => 87003)


--- trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm	2011-05-21 00:20:46 UTC (rev 87002)
+++ trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm	2011-05-21 00:29:51 UTC (rev 87003)
@@ -61,26 +61,6 @@
 
 using namespace WebCore;
 
-#if defined(BUILDING_ON_LEOPARD)
-@interface CATransaction(SnowLeopardConvenienceFunctions)
-+ (void)setDisableActions:(BOOL)flag;
-+ (void)setAnimationDuration:(CFTimeInterval)dur;
-@end
-
-@implementation CATransaction(SnowLeopardConvenienceFunctions)
-+ (void)setDisableActions:(BOOL)flag
-{
-    [self setValue:[NSNumber numberWithBool:flag] forKey:kCATransactionDisableActions];
-}
-
-+ (void)setAnimationDuration:(CFTimeInterval)dur
-{
-    [self setValue:[NSNumber numberWithDouble:dur] forKey:kCATransactionAnimationDuration];
-}
-@end
-
-#endif
-
 @interface WebFullscreenWindow : NSWindow
 #ifndef BUILDING_ON_LEOPARD
 <NSAnimationDelegate>
@@ -307,7 +287,7 @@
         [window setOpaque:YES];
 
         [CATransaction begin];
-        [CATransaction setDisableActions:YES];
+        [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
         [[[window animationView] layer] setOpacity:0];
         [CATransaction commit];
     }
@@ -469,7 +449,7 @@
     // Start the opacity animation. We can use implicit animations here because we don't care when
     // the animation finishes.
     [CATransaction begin];
-    [CATransaction setAnimationDuration:duration];
+    [CATransaction setValue:[NSNumber numberWithDouble:duration] forKey:kCATransactionAnimationDuration];
     [backgroundLayer setOpacity:1];
     [CATransaction commit];
     
@@ -486,7 +466,7 @@
     
     // Disable implicit animations and set the layer's transformation matrix to its final state.
     [CATransaction begin];
-    [CATransaction setDisableActions:YES];
+    [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
     [rendererLayer setTransform:CATransform3DIdentity];
     [rendererLayer addAnimation:zoomAnimation forKey:@"zoom"];
     [backgroundLayer setFrame:NSRectToCGRect(backgroundBounds)];
@@ -554,7 +534,7 @@
         // disable animations when changing the layer's opacity. Other-
         // wise, the content will appear to fade into view.
         [CATransaction begin];
-        [CATransaction setDisableActions:YES];
+        [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
         WebFullscreenWindow* window = [self _fullscreenWindow];
         [[[window animationView] layer] setOpacity:1];
         [window setBackgroundColor:[NSColor clearColor]];
@@ -617,7 +597,7 @@
 
     CALayer* backgroundLayer = [[self _fullscreenWindow] backgroundLayer];
     [CATransaction begin];
-    [CATransaction setAnimationDuration:duration];
+    [CATransaction setValue:[NSNumber numberWithDouble:duration] forKey:kCATransactionAnimationDuration];
     [backgroundLayer setOpacity:0];
     [CATransaction commit];
     
@@ -882,7 +862,7 @@
 - (void)setRendererLayer:(CALayer *)rendererLayer
 {
     [CATransaction begin];
-    [CATransaction setDisableActions:YES];
+    [CATransaction setValue:[NSNumber numberWithBool:YES] forKey:kCATransactionDisableActions];
     [rendererLayer retain];
     [_rendererLayer removeFromSuperlayer];
     [_rendererLayer release];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to