Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eb83b03a1b126f855603d1dc66332d493531b53f
      
https://github.com/WebKit/WebKit/commit/eb83b03a1b126f855603d1dc66332d493531b53f
  Author: Jean-Yves Avenard <j...@apple.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.h
    M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm
    M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h
    M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm

  Log Message:
  -----------
  REGRESSION (281109@main?): [ Guard-Malloc ] 
media/media-source/media-managedmse-video-with-poster.html is constantly 
crashing.
https://bugs.webkit.org/show_bug.cgi?id=277395
rdar://132767136

Reviewed by Youenn Fablet.

It was possible for the VideoPresentationInterfaceIOS to be removed from the
VideoPresentationManagerProxy's contexts HashMap. We adopt more smart pointers
adoption to get around the issue of the interface potentially being deleted
while exiting fullscreen.
We adopt the use of `Ref` in the HashMap for model/interface as they can never 
contained
null pointers. Which helps simplify the code in some instances and remove 
unnecessary tests.
Fly-by: Running some tests in debug mode triggered an assertion in 
`VideoPresentationManager::removeClientForContext`
We had handling for this case instead and exit early if the 
VideoPresentationManager had no client left.

Covered by existing tests.

* Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.h:
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm:
(WebKit::VideoPresentationInterfaceLMK::finalizeSetup):
(WebKit::VideoPresentationInterfaceLMK::presentFullscreen):
(WebKit::VideoPresentationInterfaceLMK::dismissFullscreen):
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionManagerProxy::createModelAndInterface):
(WebKit::PlaybackSessionManagerProxy::ensureModelAndInterface):
(WebKit::PlaybackSessionManagerProxy::ensureModel):
(WebKit::PlaybackSessionManagerProxy::ensureInterface):
(WebKit::PlaybackSessionManagerProxy::removeClientForContext):
(WebKit::PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID):
(WebKit::PlaybackSessionManagerProxy::currentTimeChanged):
(WebKit::PlaybackSessionManagerProxy::bufferedTimeChanged):
(WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged):
(WebKit::PlaybackSessionManagerProxy::canPlayFastReverseChanged):
(WebKit::PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged):
(WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged):
(WebKit::PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged):
(WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged):
(WebKit::PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged):
(WebKit::PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged):
(WebKit::PlaybackSessionManagerProxy::mutedChanged):
(WebKit::PlaybackSessionManagerProxy::volumeChanged):
(WebKit::PlaybackSessionManagerProxy::durationChanged):
(WebKit::PlaybackSessionManagerProxy::playbackStartedTimeChanged):
(WebKit::PlaybackSessionManagerProxy::rateChanged):
(WebKit::PlaybackSessionManagerProxy::pictureInPictureSupportedChanged):
(WebKit::PlaybackSessionManagerProxy::isInWindowFullscreenActiveChanged):
(WebKit::PlaybackSessionManagerProxy::supportsLinearMediaPlayerChanged):
(WebKit::PlaybackSessionManagerProxy::setVideoReceiverEndpoint):
(WebKit::PlaybackSessionManagerProxy::controlsManagerInterface):
(WebKit::PlaybackSessionManagerProxy::isPaused const):
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::controlsManagerInterface):
(WebKit::VideoPresentationManagerProxy::createModelAndInterface):
(WebKit::VideoPresentationManagerProxy::ensureModelAndInterface):
(WebKit::VideoPresentationManagerProxy::ensureModel):
(WebKit::VideoPresentationManagerProxy::ensureInterface):
(WebKit::VideoPresentationManagerProxy::findInterface const):
(WebKit::VideoPresentationManagerProxy::forEachSession):
(WebKit::VideoPresentationManagerProxy::createLayerWithID):
(WebKit::VideoPresentationManagerProxy::createLayerHostViewWithID):
(WebKit::VideoPresentationManagerProxy::returningToStandbyInterface const):
(WebKit::VideoPresentationManagerProxy::createViewWithID):
(WebKit::VideoPresentationManagerProxy::setupFullscreenWithID):
(WebKit::VideoPresentationManagerProxy::setPlayerIdentifier):
(WebKit::VideoPresentationManagerProxy::setHasVideo):
(WebKit::VideoPresentationManagerProxy::setVideoDimensions):
(WebKit::VideoPresentationManagerProxy::exitFullscreen):
(WebKit::VideoPresentationManagerProxy::exitFullscreenWithoutAnimationToMode):
(WebKit::VideoPresentationManagerProxy::setVideoFullscreenMode):
(WebKit::VideoPresentationManagerProxy::clearVideoFullscreenMode):
(WebKit::VideoPresentationManagerProxy::setInlineRect):
(WebKit::VideoPresentationManagerProxy::setHasVideoContentLayer):
(WebKit::VideoPresentationManagerProxy::cleanupFullscreen):
(WebKit::VideoPresentationManagerProxy::preparedToReturnToInline):
(WebKit::VideoPresentationManagerProxy::preparedToExitFullscreen):
(WebKit::VideoPresentationManagerProxy::textTrackRepresentationUpdate):
(WebKit::VideoPresentationManagerProxy::textTrackRepresentationSetContentsScale):
(WebKit::VideoPresentationManagerProxy::textTrackRepresentationSetHidden):
(WebKit::VideoPresentationManagerProxy::returnVideoView):
(WebKit::VideoPresentationManagerProxy::didExitFullscreen):
(WebKit::VideoPresentationManagerProxy::didEnterFullscreen):
(WebKit::VideoPresentationManagerProxy::didCleanupFullscreen):
(WebKit::VideoPresentationManagerProxy::setVideoLayerFrame):
(WebKit::VideoPresentationManagerProxy::playerViewController const):
(WebKit::VideoPresentationManagerProxy::playableViewController const):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _togglePiPAction:]):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController 
beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController didExitPictureInPicture]):
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::~PlaybackSessionManager):
(WebKit::PlaybackSessionManager::ensureModelAndInterface):
(WebKit::PlaybackSessionManager::ensureModel):
(WebKit::PlaybackSessionManager::ensureInterface):
(WebKit::PlaybackSessionManager::removeContext):
(WebKit::PlaybackSessionManager::setUpPlaybackControlsManager):
(WebKit::PlaybackSessionManager::contextIdForMediaElement):
(WebKit::PlaybackSessionManager::play):
(WebKit::PlaybackSessionManager::pause):
(WebKit::PlaybackSessionManager::togglePlayState):
(WebKit::PlaybackSessionManager::beginScrubbing):
(WebKit::PlaybackSessionManager::endScrubbing):
(WebKit::PlaybackSessionManager::seekToTime):
(WebKit::PlaybackSessionManager::fastSeek):
(WebKit::PlaybackSessionManager::beginScanningForward):
(WebKit::PlaybackSessionManager::beginScanningBackward):
(WebKit::PlaybackSessionManager::endScanning):
(WebKit::PlaybackSessionManager::setDefaultPlaybackRate):
(WebKit::PlaybackSessionManager::setPlaybackRate):
(WebKit::PlaybackSessionManager::selectAudioMediaOption):
(WebKit::PlaybackSessionManager::handleControlledElementIDRequest):
(WebKit::PlaybackSessionManager::togglePictureInPicture):
(WebKit::PlaybackSessionManager::enterFullscreen):
(WebKit::PlaybackSessionManager::exitFullscreen):
(WebKit::PlaybackSessionManager::toggleInWindow):
(WebKit::PlaybackSessionManager::toggleMuted):
(WebKit::PlaybackSessionManager::setMuted):
(WebKit::PlaybackSessionManager::setVolume):
(WebKit::PlaybackSessionManager::setPlayingOnSecondScreen):
(WebKit::PlaybackSessionManager::sendRemoteCommand):
(WebKit::PlaybackSessionManager::setSoundStageSize):
(WebKit::PlaybackSessionManager::setSpatialTrackingLabel):
(WebKit::PlaybackSessionManager::forEachModel):
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h:
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
(WebKit::VideoPresentationManager::~VideoPresentationManager):
(WebKit::VideoPresentationManager::ensureModelAndInterface):
(WebKit::VideoPresentationManager::ensureModel):
(WebKit::VideoPresentationManager::ensureInterface):
(WebKit::VideoPresentationManager::removeContext):
(WebKit::VideoPresentationManager::removeClientForContext):
(WebKit::VideoPresentationManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoPresentationManager::exitVideoFullscreenForVideoElement):
(WebKit::VideoPresentationManager::exitVideoFullscreenToModeWithoutAnimation):
(WebKit::VideoPresentationManager::requestFullscreenMode):
(WebKit::VideoPresentationManager::returnVideoContentLayer):
(WebKit::VideoPresentationManager::failedToEnterFullscreen):
(WebKit::VideoPresentationManager::didExitFullscreen):
(WebKit::VideoPresentationManager::didCleanupFullscreen):
(WebKit::VideoPresentationManager::requestRouteSharingPolicyAndContextUID):
(WebKit::VideoPresentationManager::ensureUpdatedVideoDimensions):
(WebKit::VideoPresentationManager::setVideoFullscreenFrame):
(WebKit::VideoPresentationManager::setRequiresTextTrackRepresentation):
(WebKit::VideoPresentationManager::setTextTrackRepresentationBounds):

Canonical link: https://commits.webkit.org/281680@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to