Title: [234305] branches/safari-606-branch/Source/WebCore
Revision
234305
Author
[email protected]
Date
2018-07-26 23:02:19 -0700 (Thu, 26 Jul 2018)

Log Message

Cherry-pick r234264. rdar://problem/42650373

    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.

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

Modified Paths

Diff

Modified: branches/safari-606-branch/Source/WebCore/ChangeLog (234304 => 234305)


--- branches/safari-606-branch/Source/WebCore/ChangeLog	2018-07-27 06:02:17 UTC (rev 234304)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog	2018-07-27 06:02:19 UTC (rev 234305)
@@ -1,5 +1,62 @@
 2018-07-26  Babak Shafiei  <[email protected]>
 
+        Cherry-pick r234264. rdar://problem/42650373
+
+    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.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-26  Babak Shafiei  <[email protected]>
+
         Cherry-pick r234078. rdar://problem/42490088
 
     REGRESSION (r233974): Cannot close pip'd video; pops back into PiP.

Modified: branches/safari-606-branch/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h (234304 => 234305)


--- branches/safari-606-branch/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h	2018-07-27 06:02:17 UTC (rev 234304)
+++ branches/safari-606-branch/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h	2018-07-27 06:02:19 UTC (rev 234305)
@@ -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: branches/safari-606-branch/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm (234304 => 234305)


--- branches/safari-606-branch/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm	2018-07-27 06:02:17 UTC (rev 234304)
+++ branches/safari-606-branch/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm	2018-07-27 06:02:19 UTC (rev 234305)
@@ -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