RESOLVED FIXED 63217
Full-screen: Don't change the collectionBehavior of the WebView's NSWindow if not necessary
https://bugs.webkit.org/show_bug.cgi?id=63217
Summary Full-screen: Don't change the collectionBehavior of the WebView's NSWindow if...
Jer Noble
Reported 2011-06-22 18:51:09 PDT
Full-screen: Don't change the collectionBehavior of the WebView's NSWindow if not necessary
Attachments
Patch (2.48 KB, patch)
2011-06-22 18:55 PDT, Jer Noble
no flags
Patch (2.42 KB, patch)
2011-07-11 15:22 PDT, Jer Noble
darin: review+
Jer Noble
Comment 1 2011-06-22 18:55:15 PDT
Jer Noble
Comment 2 2011-06-22 18:56:09 PDT
Daniel Bates
Comment 3 2011-07-01 11:51:36 PDT
Comment on attachment 98293 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98293&action=review > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:332 > +#if !defined(BUILDING_ON_LEOPARD) > + if (![webWindow isOnActiveSpace]) { > +#endif Have you considered encapsulating this functionality into a static function, say isWindowOnActiveSpace(NSWindow*) or windowIsOnActiveSpace(NSWindow*), that is hardcoded to return false when building on Leopard and sends the specified NSWindow an isOnActiveSpace: message when we aren't building on Leopard?
Mark Rowe (bdash)
Comment 4 2011-07-08 15:52:37 PDT
WebKit2 isn’t built on Leopard so the #if’s aren't necessary.
Jer Noble
Comment 5 2011-07-08 15:56:52 PDT
@Daniel(In reply to comment #3) > (From update of attachment 98293 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=98293&action=review > > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:332 > > +#if !defined(BUILDING_ON_LEOPARD) > > + if (![webWindow isOnActiveSpace]) { > > +#endif > > Have you considered encapsulating this functionality into a static function, say isWindowOnActiveSpace(NSWindow*) or windowIsOnActiveSpace(NSWindow*), that is hardcoded to return false when building on Leopard and sends the specified NSWindow an isOnActiveSpace: message when we aren't building on Leopard? Apparently, since WebKit2 isn't built on Leopard, I can just remove those checks entirely. ;-)
Daniel Bates
Comment 6 2011-07-08 15:59:06 PDT
Comment on attachment 98293 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98293&action=review >>> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:332 >>> +#endif >> >> Have you considered encapsulating this functionality into a static function, say isWindowOnActiveSpace(NSWindow*) or windowIsOnActiveSpace(NSWindow*), that is hardcoded to return false when building on Leopard and sends the specified NSWindow an isOnActiveSpace: message when we aren't building on Leopard? > > Apparently, since WebKit2 isn't built on Leopard, I can just remove those checks entirely. ;-) That sounds even better.
Jer Noble
Comment 7 2011-07-11 15:22:24 PDT
Darin Adler
Comment 8 2011-07-12 10:46:07 PDT
Comment on attachment 100370 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100370&action=review > Source/WebKit2/ChangeLog:9 > + collectionBehavior. The isOnActiveSpace API was added in 10.6, so skip this check on Leopard. This comment is now out of date. > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:330 > + if (![webWindow isOnActiveSpace]) { This check needs a why comment.
Jer Noble
Comment 9 2011-07-12 11:43:22 PDT
(In reply to comment #8) > (From update of attachment 100370 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=100370&action=review > > > Source/WebKit2/ChangeLog:9 > > + collectionBehavior. The isOnActiveSpace API was added in 10.6, so skip this check on Leopard. > > This comment is now out of date. I thought I squashed that comment. Will remove. > > Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:330 > > + if (![webWindow isOnActiveSpace]) { > > This check needs a why comment. The current comment says: // The user may have moved the fullScreen window in Spaces, so temporarily change // the collectionBehavior of the webView's window: I'll change this to: // If the user has moved the fullScreen window into a new space, temporarily change // the collectionBehavior of the webView's window so that it is pulled into the active space:
Jer Noble
Comment 10 2011-07-12 14:39:10 PDT
Note You need to log in before you can comment on or make changes to this bug.