Auto-pip should use main content heuristic.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 May 2018 18:00:27 +0000 (18:00 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 May 2018 18:00:27 +0000 (18:00 +0000)
commit67870c2102cb986a8683185f9c47ab440d3c1cf6
treef14ffeb0ad699821e5e72230619171b4fd104cf7
parent89588b1733eb910712f5f4176229363c727c22fc
Auto-pip should use main content heuristic.
https://bugs.webkit.org/show_bug.cgi?id=186065
<rdar://problem/35862502>

Reviewed by Eric Carlson.

Make the m_pipStandbyElement clearable, which will allow the auto-pip mechanism to be torn down. Add
a WebProcess-side notification when the main content changes, to facilitate this.

* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::videoControlsManagerDidChange):
(WebKit::WebFullScreenManager::setPIPStandbyElement):
(WebKit::WebFullScreenManager::didEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::videoControlsManagerDidChange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/cocoa/PlaybackSessionManager.h:
* WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::setUpPlaybackControlsManager):
(WebKit::PlaybackSessionManager::clearPlaybackControlsManager):
(WebKit::PlaybackSessionManager::currentPlaybackControlsElement const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h
Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm