When Mission Control closes fullscreen window, allow media element to update its...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Jun 2017 18:00:40 +0000 (18:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Jun 2017 18:00:40 +0000 (18:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173671
rdar://problem/32892671

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-26
Reviewed by Eric Carlson.

When Mission Control closes element fullscreen without an animation, we need to notify the
media element that fullscreen has exited.

Without this change, the page still behaves like the element is in fullscreen.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218813 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

index 6f388eb..c6001c0 100644 (file)
@@ -1,3 +1,20 @@
+2017-06-26  Jeremy Jones  <jeremyj@apple.com>
+
+        When Mission Control closes fullscreen window, allow media element to update its state.
+        https://bugs.webkit.org/show_bug.cgi?id=173671
+        rdar://problem/32892671
+
+        Reviewed by Eric Carlson.
+
+        When Mission Control closes element fullscreen without an animation, we need to notify the
+        media element that fullscreen has exited.
+
+        Without this change, the page still behaves like the element is in fullscreen.
+
+        * UIProcess/mac/WKFullScreenWindowController.mm:
+        (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
+        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
+
 2017-06-26  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iOS DnD] [WK2] Beginning a drag session should prevent clicking via long press
index 3753799..5b579dc 100644 (file)
@@ -383,6 +383,7 @@ static const float minVideoWidth = 480 + 20 + 20; // Note: Keep in sync with med
         // fullscreen was exited without being initiated by WebKit. Do not return early, but continue to
         // clean up our state by calling those methods which would have been called by -exitFullscreen,
         // and proceed to close the fullscreen window.
+        [self _manager]->requestExitFullScreen();
         [_webViewPlaceholder setTarget:nil];
         [self _manager]->setAnimatingFullScreen(false);
         [self _manager]->willExitFullScreen();