Changeset 234081 in webkit


Ignore:
Timestamp:
Jul 20, 2018 8:50:46 PM (6 years ago)
Author:
jer.noble@apple.com
Message:

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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r234080 r234081  
     12018-07-20  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION(r233925): Can't go into PiP twice
     4        https://bugs.webkit.org/show_bug.cgi?id=187876
     5        <rdar://problem/42444520>
     6
     7        Reviewed by Jon Lee.
     8
     9        We fail to enter PiP the second time because the video fullscreen interface no longer has a
     10        model, and so gives a contentSize of 0x0. This happens because we disassociate the
     11        interface from the model in didCleanupFullscreen. However, the interface and model can still
     12        be re-used if they're kept alive by another client. We should delay disassociating the model
     13        from the interface until just before the model is destroyed in removeClientForContext.
     14
     15        * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
     16        (WebKit::VideoFullscreenManagerProxy::removeClientForContext):
     17        (WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen):
     18
    1192018-07-20  John Wilander  <wilander@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm

    r233926 r234081  
    450450
    451451    if (clientCount <= 0) {
     452        ensureInterface(contextId).setVideoFullscreenModel(nullptr);
    452453        m_playbackSessionManagerProxy->removeClientForContext(contextId);
    453454        m_clientCounts.remove(contextId);
     
    647648
    648649    interface->setMode(HTMLMediaElementEnums::VideoFullscreenModeNone);
    649     interface->setVideoFullscreenModel(nullptr);
    650650    removeClientForContext(contextId);
    651651}
Note: See TracChangeset for help on using the changeset viewer.