WebKit Bugzilla
Attachment 345843 Details for
Bug 188054
: Switching tabs should not close PiP window
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188054-20180726075853.patch (text/plain), 4.24 KB, created by
Eric Carlson
on 2018-07-26 07:58:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2018-07-26 07:58:53 PDT
Size:
4.24 KB
patch
obsolete
>Subversion Revision: 234210 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1e643d505f9c1471bb9f4a72d15bbc7e5f2aae00..4722b4cf1a3af836c12edfeaeae173d5bac5e906 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2018-07-26 Eric Carlson <eric.carlson@apple.com> >+ >+ Switching tabs should not close PiP window >+ https://bugs.webkit.org/show_bug.cgi?id=188054 >+ <rdar://problem/41212379> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests, fixes an existing test. >+ >+ Prior to r233926, calling VideoFullscreenInterfaceMac::requestHideAndExitFullscreen was a noop. >+ In r233926 it was updated to close the PiP window and was called from the PIPViewControllerDelegate >+ selectors to close the PiP window. requestHideAndExitFullscreen is also called from >+ WebPageProxy::viewDidLeaveWindow when the web view is removed from it window, so switching >+ tabs also closed the PiP window. Revert the changes to requestHideAndExitFullscreen, and add >+ a new method that is only used by the delegate to exit PiP. >+ >+ * platform/mac/VideoFullscreenInterfaceMac.h: >+ (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Make this an empty, >+ do-nothing method. >+ * platform/mac/VideoFullscreenInterfaceMac.mm: >+ (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]): Call requestHideAndExitPiP. >+ (-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]): Ditto. >+ (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitPiP): Renamed from requestHideAndExitFullscreen. >+ (WebCore::VideoFullscreenInterfaceMac::requestHideAndExitFullscreen): Deleted. >+ > 2018-07-25 David Fenton <david_fenton@apple.com> > > Unreviewed, rolling out r234187. >diff --git a/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h b/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h >index 8b68c6b1f8e210194fc49ce7ce087755fe56f447..af2c649f57e5e1585831df8b246262b2e73d6cb5 100644 >--- a/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h >+++ b/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h >@@ -77,7 +77,7 @@ public: > WEBCORE_EXPORT void exitFullscreenWithoutAnimationToMode(HTMLMediaElementEnums::VideoFullscreenMode); > WEBCORE_EXPORT void cleanupFullscreen(); > WEBCORE_EXPORT void invalidate(); >- WEBCORE_EXPORT void requestHideAndExitFullscreen(); >+ void requestHideAndExitFullscreen() { } > WEBCORE_EXPORT void preparedToReturnToInline(bool visible, const IntRect& inlineRect, NSWindow *parentWindow); > void preparedToExitFullscreen() { } > >@@ -94,6 +94,8 @@ public: > > WEBCORE_EXPORT WebVideoFullscreenInterfaceMacObjC *videoFullscreenInterfaceObjC(); > >+ WEBCORE_EXPORT void requestHideAndExitPiP(); >+ > private: > WEBCORE_EXPORT VideoFullscreenInterfaceMac(PlaybackSessionInterfaceMac&); > Ref<PlaybackSessionInterfaceMac> m_playbackSessionInterface; >diff --git a/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm b/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm >index 8d241337741973e979e6c65055d9d9ab892ad6f2..8a0d02053df134b2f5aeb0e8db49e5cdbb798e3c 100644 >--- a/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm >+++ b/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm >@@ -274,7 +274,7 @@ enum class PIPState { > if (!_videoFullscreenInterfaceMac || !_videoFullscreenInterfaceMac->videoFullscreenChangeObserver()) > return YES; > >- _videoFullscreenInterfaceMac->requestHideAndExitFullscreen(); >+ _videoFullscreenInterfaceMac->requestHideAndExitPiP(); > > return NO; > } >@@ -335,7 +335,7 @@ enum class PIPState { > if (PlaybackSessionModel* playbackSessionModel = _videoFullscreenInterfaceMac->playbackSessionModel()) > playbackSessionModel->pause(); > >- _videoFullscreenInterfaceMac->requestHideAndExitFullscreen(); >+ _videoFullscreenInterfaceMac->requestHideAndExitPiP(); > _pipState = PIPState::ExitingPIP; > } > >@@ -508,7 +508,7 @@ void VideoFullscreenInterfaceMac::invalidate() > m_webVideoFullscreenInterfaceObjC = nil; > } > >-void VideoFullscreenInterfaceMac::requestHideAndExitFullscreen() >+void VideoFullscreenInterfaceMac::requestHideAndExitPiP() > { > if (!m_videoFullscreenModel) > return;
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 188054
: 345843