Switching tabs should not close PiP window
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2018 17:03:39 +0000 (17:03 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2018 17:03:39 +0000 (17:03 +0000)
commit93186813967627190173ba7ee93d3136389283b8
tree4ba231dc58ebfdf7d2d98a171176dc020a673e16
parent887fddce33639ad0a554bc07c989c80b87de0e28
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
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.h
Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm