Summary: | WebKit2: Implement a full screen window controller | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jer Noble <jer.noble> | ||||||
Component: | WebKit2 | Assignee: | Jer Noble <jer.noble> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, eric.carlson, jer.noble, sam | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | 55993 | ||||||||
Bug Blocks: | 56218 | ||||||||
Attachments: |
|
Description
Jer Noble
2011-03-11 11:30:05 PST
Created attachment 85515 [details]
Patch
Note this patch contains changes to WebFullScreenController.{h,cpp}. (Copyright year changes only.) This is because of the dumb way git does rename detection. Created attachment 85518 [details]
Patch
Updated the ChangeLog with more information.
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. 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! Committed r80923: <http://trac.webkit.org/changeset/80923> |