WebKit Bugzilla
Attachment 340531 Details for
Bug 185699
: Fullscreen to PiP results in exit fullscreen call failure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185699-20180516152529.patch (text/plain), 3.78 KB, created by
Jeremy Jones
on 2018-05-16 15:25:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jeremy Jones
Created:
2018-05-16 15:25:03 PDT
Size:
3.78 KB
patch
obsolete
>Subversion Revision: 231157 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 94ad2070a4ea348dc42026f18b777d87595753d6..72b9464cebf529723995ec9a228b8e0ade808015 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2018-05-16 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 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests because no behavior change. >+ >+ Prevent multiple exit fullscreen calls when transitioning from fullscreen to picture-in-picture. >+ >+ * platform/ios/VideoFullscreenInterfaceAVKit.mm: >+ (-[WebAVPlayerViewControllerDelegate playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:]): >+ Implement this to prevent AVKit from automatically initiating exit fullscreen on pip. >+ >+ (VideoFullscreenInterfaceAVKit::didStartPictureInPicture): >+ Set the return to fullscreen flag here, since this is where exit fullscreen happens. >+ >+ (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): >+ Don't exit fullscreen here since it is already initiated in didStartPictureInPicture. >+ > 2018-04-30 Michael Catanzaro <mcatanzaro@igalia.com> > > [GTK] Webkit should spoof as Safari on a Mac when on Chase.com >diff --git a/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm b/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm >index f413f15dff45f05894522a0c73791f70a3f3ab6e..9803a195ba3d467a4db079a0ced351ad271fb910 100644 >--- a/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm >+++ b/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm >@@ -153,6 +153,12 @@ - (void)playerViewControllerDidStopPictureInPicture:(AVPlayerViewController *)pl > self.fullscreenInterface->didStopPictureInPicture(); > } > >+- (BOOL)playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:(AVPlayerViewController *)playerViewController >+{ >+ UNUSED_PARAM(playerViewController); >+ return NO; >+} >+ > static VideoFullscreenInterfaceAVKit::ExitFullScreenReason convertToExitFullScreenReason(AVPlayerViewControllerExitFullScreenReason reason) > { > switch (reason) { >@@ -1443,6 +1449,7 @@ void VideoFullscreenInterfaceAVKit::didStartPictureInPicture() > > if (m_currentMode.hasFullscreen()) { > if (![m_playerViewController pictureInPictureWasStartedWhenEnteringBackground]) { >+ m_shouldReturnToFullscreenWhenStoppingPiP = YES; > [[m_playerViewController view] layoutIfNeeded]; > [m_playerViewController exitFullScreenAnimated:YES completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError *error) { > exitFullscreenHandler(success, error); >@@ -1545,15 +1552,8 @@ bool VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason(VideoFullscre > if (!m_videoFullscreenModel) > return true; > >- if (reason == ExitFullScreenReason::PictureInPictureStarted) { >- m_shouldReturnToFullscreenWhenStoppingPiP = m_currentMode.hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard); >- dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this] () mutable { >- [m_playerViewController exitFullScreenAnimated:NO completionHandler:[protectedThis = WTFMove(protectedThis), this] (BOOL success, NSError *error) { >- exitFullscreenHandler(success, error); >- }]; >- }); >+ if (reason == ExitFullScreenReason::PictureInPictureStarted) > return false; >- } > > if (playbackSessionModel() && (reason == ExitFullScreenReason::DoneButtonTapped || reason == ExitFullScreenReason::RemoteControlStopEventReceived)) > playbackSessionModel()->pause();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
eric.carlson
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185699
: 340531 |
340646