Commit 514c1913 authored by jer.noble@apple.com's avatar jer.noble@apple.com

Fix the Leopard build: Replace CoreAnimation SL-only functions

with Leopard equivalents.

* WebView/WebFullScreenController.mm:
(+[CATransaction setDisableActions:]):
(+[CATransaction setAnimationDuration:]):
(-[WebFullScreenController _animationDuration]):
(-[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2397e5f1
2011-01-07 Jer Noble <jer.noble@apple.com>
Fix the Leopard build: Replace CoreAnimation SL-only functions
with Leopard equivalents.
* WebView/WebFullScreenController.mm:
(+[CATransaction setDisableActions:]):
(+[CATransaction setAnimationDuration:]):
(-[WebFullScreenController _animationDuration]):
(-[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:]):
2010-12-21 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
......
......@@ -58,6 +58,26 @@ static NSString* const isEnteringFullscreenKey = @"isEnteringFullscreen";
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
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER)
<NSAnimationDelegate>
......@@ -761,7 +781,7 @@ private:
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
NSUInteger modifierFlags = [NSEvent modifierFlags];
#else
NSUInteger modifierFlags = [[NSEvent currentEvent] modifierFlags];
NSUInteger modifierFlags = [[NSApp currentEvent] modifierFlags];
#endif
if ((modifierFlags & NSControlKeyMask) == NSControlKeyMask)
duration *= 2;
......@@ -791,7 +811,11 @@ private:
[self setAcceptsMouseMovedEvents:YES];
[self setReleasedWhenClosed:NO];
[self setHasShadow:YES];
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
[self setMovable:NO];
#else
[self setMovableByWindowBackground:NO];
#endif
NSView* contentView = [self contentView];
_animationView = [[NSView alloc] initWithFrame:[contentView bounds]];
......@@ -804,7 +828,11 @@ private:
_backgroundLayer = [[CALayer alloc] init];
[contentLayer addSublayer:_backgroundLayer];
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
[contentLayer setGeometryFlipped:YES];
#else
[contentLayer setSublayerTransform:CATransform3DMakeScale(1, -1, 1)];
#endif
[contentLayer setOpacity:0];
[_backgroundLayer setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment