Remove unnecessary exit fullscreen call on application resume
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 23:03:50 +0000 (23:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 23:03:50 +0000 (23:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185747
rdar://problem/40345725

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-05-17
Reviewed by Jer Noble.

No new tests because no behavior change.

Auto-PiP doesn't automatically return to fullscreen on app resume,
so we don't need to keep this vestigial code for handling a corner case of that feature.
Also, this can cause an unnecessary exit fullscreen that could cause debug asserts.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm

index a896373..5f000e4 100644 (file)
@@ -1,5 +1,22 @@
 2018-05-17  Jeremy Jones  <jeremyj@apple.com>
 
+        Remove unnecessary exit fullscreen call on application resume
+        https://bugs.webkit.org/show_bug.cgi?id=185747
+        rdar://problem/40345725
+
+        Reviewed by Jer Noble.
+
+        No new tests because no behavior change.
+
+        Auto-PiP doesn't automatically return to fullscreen on app resume,
+        so we don't need to keep this vestigial code for handling a corner case of that feature.
+        Also, this can cause an unnecessary exit fullscreen that could cause debug asserts.
+
+        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+        (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
+
+2018-05-17  Jeremy Jones  <jeremyj@apple.com>
+
         Fullscreen to PiP results in exit fullscreen call failure
         https://bugs.webkit.org/show_bug.cgi?id=185699
         rdar://problem/40310291
index 54c9218..08b86f4 100644 (file)
@@ -1288,15 +1288,6 @@ bool VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason(VideoFullscre
 void VideoFullscreenInterfaceAVKit::applicationDidBecomeActive()
 {
     LOG(Fullscreen, "VideoFullscreenInterfaceAVKit::applicationDidBecomeActive(%p)", this);
-
-    // If we are both in PiP and in Fullscreen (i.e., via auto-PiP), and we did not stop fullscreen upon returning, it must be
-    // because the originating view is not visible, so hide the fullscreen window.
-    if (m_currentMode.hasFullscreen() && m_currentMode.hasPictureInPicture()) {
-        [[m_playerViewController view] layoutIfNeeded];
-        [m_playerViewController exitFullScreenAnimated:NO completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError *error) {
-            exitFullscreenHandler(success, error);
-        }];
-    }
 }
 
 void VideoFullscreenInterfaceAVKit::setupFullscreen(UIView& videoView, const IntRect& initialRect, UIView* parentView, HTMLMediaElementEnums::VideoFullscreenMode mode, bool allowsPictureInPicturePlayback, bool standby)