REGRESSION(r233925): Can't go into PiP twice
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jul 2018 03:50:46 +0000 (03:50 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jul 2018 03:50:46 +0000 (03:50 +0000)
commit204cba7bcc58635bebee0ef84506870a993450f9
tree687b1da2dc2d9b5c06b81b530fc24ab84ad31f27
parent02f9497c8d134b6169ef4c95425159aaab57e5dc
REGRESSION(r233925): Can't go into PiP twice
https://bugs.webkit.org/show_bug.cgi?id=187876
<rdar://problem/42444520>

Reviewed by Jon Lee.

We fail to enter PiP the second time because the video fullscreen interface no longer has a
model, and so gives a contentSize of 0x0. This happens because we disassociate the
interface from the model in didCleanupFullscreen. However, the interface and model can still
be re-used if they're kept alive by another client. We should delay disassociating the model
from the interface until just before the model is destroyed in removeClientForContext.

* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::removeClientForContext):
(WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm