+2009-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ More build fixes for Tiger.
+
+ * WebView/WebVideoFullscreenController.mm:
+ * WebView/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]):
+ (-[WebVideoFullscreenHUDWindowController fadeWindowIn]):
+ (-[WebVideoFullscreenHUDWindowController fadeWindowOut]):
+ (-[WebVideoFullscreenHUDWindowController closeWindow]):
+
2009-10-05 Simon Fraser <simon.fraser@apple.com>
Build fixes for Tiger.
#import "WebVideoFullscreenController.h"
#import "WebVideoFullscreenHUDWindowController.h"
#import "WebKitSystemInterface.h"
+#import "WebTypesInternal.h"
#import "WebWindowAnimation.h"
SOFT_LINK_FRAMEWORK(QTKit)
-
-
SOFT_LINK_CLASS(QTKit, QTMovieView)
-
@interface WebVideoFullscreenWindow : NSWindow
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER)
<NSAnimationDelegate>
#import <QTKit/QTKit.h>
#import "WebKitSystemInterface.h"
+#import "WebTypesInternal.h"
#import <wtf/RetainPtr.h>
#define HAVE_MEDIA_CONTROL (!defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD))
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
-#define WebNSUInteger unsigned int
-#else
-#define WebNSUInteger NSUInteger
-#endif
-
@interface WebVideoFullscreenHUDWindowController (Private) <NSWindowDelegate>
- (void)updateTime;
@implementation WebVideoFullscreenHUDWindow
-- (id)initWithContentRect:(NSRect)contentRect styleMask:(WebNSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
+- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
UNUSED_PARAM(aStyle);
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag];
// Note that this creates a retain cycle between the window and us.
_timelineUpdateTimer = [[NSTimer timerWithTimeInterval:0.25 target:self selector:@selector(updateTime) userInfo:nil repeats:YES] retain];
+#if defined(BUILDING_ON_TIGER)
+ [[NSRunLoop currentRunLoop] addTimer:_timelineUpdateTimer forMode:(NSString*)kCFRunLoopCommonModes];
+#else
[[NSRunLoop currentRunLoop] addTimer:_timelineUpdateTimer forMode:NSRunLoopCommonModes];
+#endif
}
- (void)unscheduleTimeUpdate
[window setAlphaValue:0];
[window makeKeyAndOrderFront:self];
+#if defined(BUILDING_ON_TIGER)
+ [window setAlphaValue:1];
+#else
[[window animator] setAlphaValue:1];
+#endif
[self scheduleTimeUpdate];
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fadeWindowOut) object:nil];
- (void)fadeWindowOut
{
[NSCursor setHiddenUntilMouseMoves:YES];
+#if defined(BUILDING_ON_TIGER)
+ [[self window] setAlphaValue:0];
+#else
[[[self window] animator] setAlphaValue:0];
+#endif
[self performSelector:@selector(unscheduleTimeUpdate) withObject:nil afterDelay:1];
}
NSWindow *window = [self window];
#if !defined(BUILDING_ON_TIGER)
[[window contentView] removeTrackingArea:_area];
-#endif
[self setArea:nil];
+#endif
[window close];
[window setDelegate:nil];
[self setWindow:nil];