Title: [229487] trunk/Source/WebKit
- Revision
- 229487
- Author
- [email protected]
- Date
- 2018-03-09 15:10:05 -0800 (Fri, 09 Mar 2018)
Log Message
webkitfullscreenchange event not fired at the same time as :-webkit-full-screen pseudo selector changes; causes glitchiness
https://bugs.webkit.org/show_bug.cgi?id=183383
<rdar://problem/38197028>
Reviewed by Eric Carlson.
Follow-up patch: now that the 'fullscreenchange' event is being fired slightly earlier, the
Fullscreen.TopContentInset tests triggers what appears to be an existing behavior: if you
exit in the middle of an enter fullscreen animation, the exit never happens, because the
NSWindow never starts the exit animation. The solution is to store the exit fullscreen
request, and only act upon it when the enter animation completes.
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController exitFullScreen]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (229486 => 229487)
--- trunk/Source/WebKit/ChangeLog 2018-03-09 23:07:26 UTC (rev 229486)
+++ trunk/Source/WebKit/ChangeLog 2018-03-09 23:10:05 UTC (rev 229487)
@@ -1,5 +1,24 @@
2018-03-09 Jer Noble <[email protected]>
+ webkitfullscreenchange event not fired at the same time as :-webkit-full-screen pseudo selector changes; causes glitchiness
+ https://bugs.webkit.org/show_bug.cgi?id=183383
+ <rdar://problem/38197028>
+
+ Reviewed by Eric Carlson.
+
+ Follow-up patch: now that the 'fullscreenchange' event is being fired slightly earlier, the
+ Fullscreen.TopContentInset tests triggers what appears to be an existing behavior: if you
+ exit in the middle of an enter fullscreen animation, the exit never happens, because the
+ NSWindow never starts the exit animation. The solution is to store the exit fullscreen
+ request, and only act upon it when the enter animation completes.
+
+ * UIProcess/mac/WKFullScreenWindowController.h:
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
+ (-[WKFullScreenWindowController exitFullScreen]):
+
+2018-03-09 Jer Noble <[email protected]>
+
Unconditionalize more methods in VideoFullscreenInterface (and related classes)
https://bugs.webkit.org/show_bug.cgi?id=183501
Modified: trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.h (229486 => 229487)
--- trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.h 2018-03-09 23:07:26 UTC (rev 229486)
+++ trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.h 2018-03-09 23:10:05 UTC (rev 229487)
@@ -54,6 +54,7 @@
RetainPtr<NSTimer> _watchdogTimer;
RetainPtr<NSArray> _savedConstraints;
+ bool _requestedExitFullScreen;
FullScreenState _fullScreenState;
double _savedScale;
Modified: trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm (229486 => 229487)
--- trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm 2018-03-09 23:07:26 UTC (rev 229486)
+++ trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm 2018-03-09 23:10:05 UTC (rev 229487)
@@ -329,10 +329,24 @@
}
NSEnableScreenUpdates();
+
+ if (_requestedExitFullScreen) {
+ _requestedExitFullScreen = NO;
+ [self exitFullScreen];
+ }
}
- (void)exitFullScreen
{
+ if (_fullScreenState == EnteringFullScreen
+ || _fullScreenState == WaitingToEnterFullScreen) {
+ // Do not try to exit fullscreen during the enter animation; remember
+ // that exit was requested and perform the exit upon enter fullscreen
+ // animation complete.
+ _requestedExitFullScreen = YES;
+ return;
+ }
+
if (_watchdogTimer) {
[_watchdogTimer invalidate];
_watchdogTimer.clear();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes