⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 271273 in webkit


Ignore:
Timestamp:
Jan 7, 2021, 4:30:58 PM (6 years ago)
Author:
Peng Liu
Message:

PlaybackSessionManager::m_clientCounts is not updated correctly when a video enters picture-in-picture from fullscreen
https://bugs.webkit.org/show_bug.cgi?id=220435

Reviewed by Eric Carlson.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
When a fullscreen video enters picture-in-picture, we should not call addClientForContext()
because m_clientCounts was updated when the video entered fullscreen.
(WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
We need to call removeClientForContext() in this function like didCleanupFullscreen() does.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r271270 r271273  
     12021-01-07  Peng Liu  <peng.liu6@apple.com>
     2
     3        PlaybackSessionManager::m_clientCounts is not updated correctly when a video enters picture-in-picture from fullscreen
     4        https://bugs.webkit.org/show_bug.cgi?id=220435
     5
     6        Reviewed by Eric Carlson.
     7
     8        * WebProcess/cocoa/VideoFullscreenManager.mm:
     9        (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
     10        When a fullscreen video enters picture-in-picture, we should not call `addClientForContext()`
     11        because `m_clientCounts` was updated when the video entered fullscreen.
     12        (WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
     13        We need to call `removeClientForContext()` in this function like `didCleanupFullscreen()` does.
     14
    1152021-01-07  Eric Carlson  <eric.carlson@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm

    r269610 r271273  
    251251    HTMLMediaElementEnums::VideoFullscreenMode oldMode = interface->fullscreenMode();
    252252
    253     addClientForContext(contextId);
     253    if (oldMode == HTMLMediaElementEnums::VideoFullscreenModeNone)
     254        addClientForContext(contextId);
     255
    254256    if (!interface->layerHostingContext())
    255257        interface->setLayerHostingContext(LayerHostingContext::createForExternalHostingProcess());
     
    330332
    331333    interface.setTargetIsFullscreen(false);
     334    removeClientForContext(contextId);
    332335
    333336    m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreenWithoutAnimationToMode(contextId, targetMode));
Note: See TracChangeset for help on using the changeset viewer.