Title: [234264] trunk/Source/WebCore
Revision
234264
Author
[email protected]
Date
2018-07-26 10:03:39 -0700 (Thu, 26 Jul 2018)

Log Message

Switching tabs should not close PiP window
https://bugs.webkit.org/show_bug.cgi?id=188054
<rdar://problem/41212379>

Reviewed by Jon Lee.

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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234263 => 234264)


--- trunk/Source/WebCore/ChangeLog	2018-07-26 17:02:30 UTC (rev 234263)
+++ trunk/Source/WebCore/ChangeLog	2018-07-26 17:03:39 UTC (rev 234264)
@@ -1,3 +1,29 @@
+2018-07-26  Eric Carlson  <[email protected]>
+
+        Switching tabs should not close PiP window
+        https://bugs.webkit.org/show_bug.cgi?id=188054
+        <rdar://problem/41212379>
+
+        Reviewed by Jon Lee.
+
+        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-04  Darin Adler  <[email protected]>
 
         Improve WebGPU implementation, including using Metal Objective-C protocols more simply and correctly

Modified: trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h (234263 => 234264)


--- trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h	2018-07-26 17:02:30 UTC (rev 234263)
+++ trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h	2018-07-26 17:03:39 UTC (rev 234264)
@@ -77,7 +77,7 @@
     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 @@
 
     WEBCORE_EXPORT WebVideoFullscreenInterfaceMacObjC *videoFullscreenInterfaceObjC();
 
+    WEBCORE_EXPORT void requestHideAndExitPiP();
+
 private:
     WEBCORE_EXPORT VideoFullscreenInterfaceMac(PlaybackSessionInterfaceMac&);
     Ref<PlaybackSessionInterfaceMac> m_playbackSessionInterface;

Modified: trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm (234263 => 234264)


--- trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm	2018-07-26 17:02:30 UTC (rev 234263)
+++ trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm	2018-07-26 17:03:39 UTC (rev 234264)
@@ -274,7 +274,7 @@
     if (!_videoFullscreenInterfaceMac || !_videoFullscreenInterfaceMac->videoFullscreenChangeObserver())
         return YES;
 
-    _videoFullscreenInterfaceMac->requestHideAndExitFullscreen();
+    _videoFullscreenInterfaceMac->requestHideAndExitPiP();
 
     return NO;
 }
@@ -335,7 +335,7 @@
     if (PlaybackSessionModel* playbackSessionModel = _videoFullscreenInterfaceMac->playbackSessionModel())
         playbackSessionModel->pause();
 
-    _videoFullscreenInterfaceMac->requestHideAndExitFullscreen();
+    _videoFullscreenInterfaceMac->requestHideAndExitPiP();
     _pipState = PIPState::ExitingPIP;
 }
 
@@ -508,7 +508,7 @@
     m_webVideoFullscreenInterfaceObjC = nil;
 }
 
-void VideoFullscreenInterfaceMac::requestHideAndExitFullscreen()
+void VideoFullscreenInterfaceMac::requestHideAndExitPiP()
 {
     if (!m_videoFullscreenModel)
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to