MediaDocument fullscreen pinch gesture should trigger navigate back.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jul 2017 04:20:53 +0000 (04:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jul 2017 04:20:53 +0000 (04:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174914

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-27
Reviewed by Jon Lee.

No new tests because only effect is from interaction with platform.

For media documents, pressing the "done" button on fullscreen video navigates back
to the previous page. The same should happen for other gestures that pause playback
when returning to inline. This allows the gesture to have the same behavior as the
button.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):

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

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

index 2e51c56ac047ff8a224abef6c29352ae0e9c129f..eb887503b212d7ca3891af86165b0b4ff4f0b55f 100644 (file)
@@ -1,3 +1,20 @@
+2017-07-27  Jeremy Jones  <jeremyj@apple.com>
+
+        MediaDocument fullscreen pinch gesture should trigger navigate back.
+        https://bugs.webkit.org/show_bug.cgi?id=174914
+
+        Reviewed by Jon Lee.
+
+        No new tests because only effect is from interaction with platform.
+
+        For media documents, pressing the "done" button on fullscreen video navigates back
+        to the previous page. The same should happen for other gestures that pause playback
+        when returning to inline. This allows the gesture to have the same behavior as the
+        button.
+
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
+
 2017-07-27  Aaron Chu  <aaron_chu@apple.com>
 
         AX: VoiceOver silent or skipping over time values on media player.
index 135ce3b73b0b2e24d8c7a1d556af400a4e3c196b..9eecc000ef7d903685f21e293f3ca781d8773424 100644 (file)
@@ -989,8 +989,9 @@ bool WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason(WebVideoFu
 
     if (webPlaybackSessionModel() && (reason == ExitFullScreenReason::DoneButtonTapped || reason == ExitFullScreenReason::RemoteControlStopEventReceived))
         webPlaybackSessionModel()->pause();
-    
-    m_videoFullscreenModel->requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenModeNone, reason == ExitFullScreenReason::DoneButtonTapped);
+
+    BOOL finished = reason == ExitFullScreenReason::DoneButtonTapped || reason == ExitFullScreenReason::PinchGestureHandled;
+    m_videoFullscreenModel->requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenModeNone, finished);
 
     if (!m_watchdogTimer.isActive())
         m_watchdogTimer.startOneShot(defaultWatchdogTimerInterval);