Title: [148901] trunk/Source/WebKit2
- Revision
- 148901
- Author
- [email protected]
- Date
- 2013-04-22 12:37:01 -0700 (Mon, 22 Apr 2013)
Log Message
Refactor creation of the full screen window into an (overridable) method.
https://bugs.webkit.org/show_bug.cgi?id=110369
Reviewed by Eric Carlson.
Add a new WKView method -(NSWindow)createFullScreenWindow which can be overridden
by subclasses to provide custom full screen windows to the WKFullScreenWindowController.
* UIProcess/API/mac/WKView.mm:
(-[WKView fullScreenWindowController]):
(-[WKView createFullScreenWindow]):
* UIProcess/API/mac/WKViewPrivate.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (148900 => 148901)
--- trunk/Source/WebKit2/ChangeLog 2013-04-22 19:13:30 UTC (rev 148900)
+++ trunk/Source/WebKit2/ChangeLog 2013-04-22 19:37:01 UTC (rev 148901)
@@ -1,3 +1,20 @@
+2013-04-15 Jer Noble <[email protected]>
+
+ Refactor creation of the full screen window into an (overridable) method.
+ https://bugs.webkit.org/show_bug.cgi?id=110369
+
+ Reviewed by Eric Carlson.
+
+ Add a new WKView method -(NSWindow)createFullScreenWindow which can be overridden
+ by subclasses to provide custom full screen windows to the WKFullScreenWindowController.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView fullScreenWindowController]):
+ (-[WKView createFullScreenWindow]):
+ * UIProcess/API/mac/WKViewPrivate.h:
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (-[WKFullScreenWindowController initWithWindow:]):
+
2013-04-22 Carlos Garcia Campos <[email protected]>
[GTK] Add webkit_web_context_set_disk_cache_directory to WebKit2 GTK+ API
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (148900 => 148901)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-04-22 19:13:30 UTC (rev 148900)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2013-04-22 19:37:01 UTC (rev 148901)
@@ -83,6 +83,7 @@
#import <WebCore/TextAlternativeWithRange.h>
#import <WebCore/WebCoreNSStringExtras.h>
#import <WebCore/WebCoreFullScreenPlaceholderView.h>
+#import <WebCore/WebCoreFullScreenWindow.h>
#import <WebCore/FileSystem.h>
#import <WebKitSystemInterface.h>
#import <sys/stat.h>
@@ -3064,7 +3065,7 @@
- (WKFullScreenWindowController*)fullScreenWindowController
{
if (!_data->_fullScreenWindowController) {
- _data->_fullScreenWindowController.adoptNS([[WKFullScreenWindowController alloc] init]);
+ _data->_fullScreenWindowController.adoptNS([[WKFullScreenWindowController alloc] initWithWindow:[self createFullScreenWindow]]);
[_data->_fullScreenWindowController.get() setWebView:self];
}
return _data->_fullScreenWindowController.get();
@@ -3490,6 +3491,15 @@
}
}
+- (NSWindow*)createFullScreenWindow
+{
+#if ENABLE(FULLSCREEN_API)
+ return [[[WebCoreFullScreenWindow alloc] initWithContentRect:NSZeroRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease];
+#else
+ return nil;
+#endif
+}
+
@end
@implementation WKResponderChainSink
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h (148900 => 148901)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h 2013-04-22 19:13:30 UTC (rev 148900)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h 2013-04-22 19:37:01 UTC (rev 148901)
@@ -64,6 +64,7 @@
@property(copy, nonatomic) NSColor *underlayColor;
- (NSView*)fullScreenPlaceholderView;
+- (NSWindow*)createFullScreenWindow;
- (void)beginDeferringViewInWindowChanges;
- (void)endDeferringViewInWindowChanges;
Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (148900 => 148901)
--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2013-04-22 19:13:30 UTC (rev 148900)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2013-04-22 19:37:01 UTC (rev 148901)
@@ -90,14 +90,13 @@
#pragma mark -
#pragma mark Initialization
-- (id)init
+- (id)initWithWindow:(NSWindow *)window
{
- RetainPtr<NSWindow> window = adoptNS([[WebCoreFullScreenWindow alloc] initWithContentRect:NSZeroRect styleMask:NSClosableWindowMask backing:NSBackingStoreBuffered defer:NO]);
- self = [super initWithWindow:window.get()];
+ self = [super initWithWindow:window];
if (!self)
return nil;
- [window.get() setDelegate:self];
- [window.get() setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary)];
+ [window setDelegate:self];
+ [window setCollectionBehavior:([window collectionBehavior] | NSWindowCollectionBehaviorFullScreenPrimary)];
[self windowDidLoad];
return self;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes