RESOLVED FIXED 56210
WebKit2: Implement a full screen window controller
https://bugs.webkit.org/show_bug.cgi?id=56210
Summary WebKit2: Implement a full screen window controller
Jer Noble
Reported 2011-03-11 11:30:05 PST
WebKit2 needs a full screen window controller, like WebKit/WebFullScreenController.
Attachments
Patch (55.47 KB, patch)
2011-03-11 13:06 PST, Jer Noble
no flags
Patch (55.66 KB, patch)
2011-03-11 13:16 PST, Jer Noble
andersca: review+
Jer Noble
Comment 1 2011-03-11 13:06:32 PST
Jer Noble
Comment 2 2011-03-11 13:07:17 PST
Note this patch contains changes to WebFullScreenController.{h,cpp}. (Copyright year changes only.) This is because of the dumb way git does rename detection.
Jer Noble
Comment 3 2011-03-11 13:16:34 PST
Created attachment 85518 [details] Patch Updated the ChangeLog with more information.
Anders Carlsson
Comment 4 2011-03-11 16:59:11 PST
Comment on attachment 85518 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=85518&action=review > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:361 > +- (void)getFullScreenRect:(WebCore::IntRect*)rect This can just return an IntRect object. > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:368 > + rect->setX(roundl(NSMinX(windowFrame))); > + rect->setY(roundl(NSMinY(windowFrame))); > + rect->setWidth(roundl(NSWidth(windowFrame))); > + rect->setHeight(roundl(NSHeight(windowFrame))); Instead of doing this, you can just use enclosingIntRect([[self window] frame]); > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:477 > + return NULL; This should be return 0; > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:507 > + return (WKFullScreenWindow *)[self window]; Please add a ASSERT([[self window] isKindOfClass:[WKFullScreenWindow class]]) before casting.
Jer Noble
Comment 5 2011-03-11 17:27:13 PST
Comment on attachment 85518 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=85518&action=review >> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:361 >> +- (void)getFullScreenRect:(WebCore::IntRect*)rect > > This can just return an IntRect object. Great idea. :) >> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:368 >> + rect->setHeight(roundl(NSHeight(windowFrame))); > > Instead of doing this, you can just use enclosingIntRect([[self window] frame]); You learn something every day. Used. >> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:477 >> + return NULL; > > This should be return 0; Right. I got my C and C++ style guide rules backwards. Changed. >> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:507 >> + return (WKFullScreenWindow *)[self window]; > > Please add a > > ASSERT([[self window] isKindOfClass:[WKFullScreenWindow class]]) > > before casting. Added. Thanks!
Jer Noble
Comment 6 2011-03-11 21:39:31 PST
Note You need to log in before you can comment on or make changes to this bug.