WebKit Bugzilla
Attachment 340646 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 for landing
bug-185699-20180517144418.patch (text/plain), 4.23 KB, created by
Jeremy Jones
on 2018-05-17 14:44:18 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Jeremy Jones
Created:
2018-05-17 14:44:18 PDT
Size:
4.23 KB
patch
obsolete
>Subversion Revision: 231157 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 94ad2070a4ea348dc42026f18b777d87595753d6..92fa626a6629aea77e5685df024028067a73e194 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 Eric Carlson. >+ >+ 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..54c9218e44aa70fe86b33b1575bd08408d92557d 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) { >@@ -1442,12 +1448,11 @@ void VideoFullscreenInterfaceAVKit::didStartPictureInPicture() > [m_playerViewController setShowsPlaybackControls:YES]; > > if (m_currentMode.hasFullscreen()) { >- if (![m_playerViewController pictureInPictureWasStartedWhenEnteringBackground]) { >- [[m_playerViewController view] layoutIfNeeded]; >- [m_playerViewController exitFullScreenAnimated:YES completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError *error) { >- exitFullscreenHandler(success, error); >- }]; >- } >+ m_shouldReturnToFullscreenWhenStoppingPiP = YES; >+ [[m_playerViewController view] layoutIfNeeded]; >+ [m_playerViewController exitFullScreenAnimated:YES completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError *error) { >+ exitFullscreenHandler(success, error); >+ }]; > } else { > [m_window setHidden:YES]; > [[m_playerViewController view] setHidden:YES]; >@@ -1545,15 +1550,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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185699
:
340531
| 340646