RESOLVED FIXED 230024
[macOS] -[WKFullScreenWindowController exitFullScreenImmediately] does not exit fullscreen immediately
https://bugs.webkit.org/show_bug.cgi?id=230024
Summary [macOS] -[WKFullScreenWindowController exitFullScreenImmediately] does not ex...
Peng Liu
Reported 2021-09-07 15:17:47 PDT
[macOS] -[WKFullScreenWindowController exitFullScreenImmediately] does not exit fullscreen immediately
Attachments
Patch (6.87 KB, patch)
2021-09-07 15:51 PDT, Peng Liu
jer.noble: review+
Revise the patch based on Jer's comments (7.42 KB, patch)
2021-09-08 11:37 PDT, Peng Liu
no flags
Peng Liu
Comment 1 2021-09-07 15:51:51 PDT
Peng Liu
Comment 2 2021-09-07 15:53:04 PDT
Jer Noble
Comment 3 2021-09-08 10:39:06 PDT
Comment on attachment 437566 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437566&action=review LGTM. I'd take this opportunity to rename -finishedExitFullScreenAnimation: to something that says what the parameter is, like -finishedExitFullScreenAnimationAndExitImmediately:(BOOL)immediately. > Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm:572 > + if (immediately) > + [self completeFinishExitFullScreenAnimationAfterRepaint]; > + else { > + _page->forceRepaint([weakSelf = WeakObjCPtr<WKFullScreenWindowController>(self)] { > + [weakSelf completeFinishExitFullScreenAnimationAfterRepaint]; > + }); > + } Nit: I'd have an early return here, rather than an else.
Peng Liu
Comment 4 2021-09-08 11:37:23 PDT
Created attachment 437651 [details] Revise the patch based on Jer's comments
Peng Liu
Comment 5 2021-09-08 11:40:02 PDT
(In reply to Jer Noble from comment #3) > Comment on attachment 437566 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=437566&action=review > > LGTM. I'd take this opportunity to rename -finishedExitFullScreenAnimation: > to something that says what the parameter is, like > -finishedExitFullScreenAnimationAndExitImmediately:(BOOL)immediately. Good idea! Fixed. > > > Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm:572 > > + if (immediately) > > + [self completeFinishExitFullScreenAnimationAfterRepaint]; > > + else { > > + _page->forceRepaint([weakSelf = WeakObjCPtr<WKFullScreenWindowController>(self)] { > > + [weakSelf completeFinishExitFullScreenAnimationAfterRepaint]; > > + }); > > + } > > Nit: I'd have an early return here, rather than an else. Fixed. I also renamed `completeFinishExitFullScreenAnimationAfterRepaint` to `completeFinishExitFullScreenAnimation` because it is not always called "after repaint".
EWS
Comment 6 2021-09-08 15:03:39 PDT
Committed r282175 (241467@main): <https://commits.webkit.org/241467@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 437651 [details].
Note You need to log in before you can comment on or make changes to this bug.