Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Text tracks are not visible in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=254473 rdar://107230116 Reviewed by Jer Noble. When the setting "GPU Process: Block Media Layer Re-hosting" is enabled, text tracks are not visible in fullscreen, since this depends on the ability to create a CA remote layer hosting context in the WebProcess. This patch works around the requirement to create a CA context in the WebContent process by sending the caption bitmaps to the UI process, where they are rendered into a CA layer, which is inserted into the fullscreen CA layer tree. The CA layer tree in the WebContent process is still being created, since there is some amount of caption code that depends on this in order to get the caption bounds correct. This patch also sets the flag "GPU Process: Block Media Layer Re-hosting" to true, which is required to be able to block CARenderServer in the WebContent process' sandbox. Layout test runs on iOS simulator on the bots showed some flaky timeouts of the test webrtc/video-rotation.html. Looking at test history, this test has already been flaky on simulator. This patch is about captions in fullscreen, so I don't think it will affect this test, although it cannot be ruled out. I marked the test as flaky. This is being tracked in webkit.org/b/254872. * LayoutTests/platform/ios-simulator-wk2/TestExpectations: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.cpp: (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentationIfNeeded): * Source/WebCore/platform/graphics/TextTrackRepresentation.cpp: (WebCore::TextTrackRepresentation::create): * Source/WebCore/platform/graphics/TextTrackRepresentation.h: * Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.h: * Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (WebCore::TextTrackRepresentation::create): (WebCore::TextTrackRepresentationCocoa::representationFactory): * Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h: * Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::textTrackRepresentationUpdate): (VideoFullscreenInterfaceAVKit::textTrackRepresentationSetContentsScale): (VideoFullscreenInterfaceAVKit::textTrackRepresentationSetHidden): (VideoFullscreenInterfaceAVKit::captionsLayer): (VideoFullscreenInterfaceAVKit::setCaptionsFrame): (VideoFullscreenInterfaceAVKit::setupCaptionsLayer): (VideoFullscreenInterfaceAVKit::removeCaptionsLayer): * Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h: * Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in: * Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::createLayerHostViewWithID): (WebKit::VideoFullscreenManagerProxy::textTrackRepresentationUpdate): (WebKit::VideoFullscreenManagerProxy::textTrackRepresentationSetContentsScale): (WebKit::VideoFullscreenManagerProxy::textTrackRepresentationSetHidden): (WebKit::VideoFullscreenManagerProxy::didCleanupFullscreen): (WebKit::VideoFullscreenManagerProxy::setVideoLayerFrame): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h: (WebKit::VideoFullscreenInterfaceContext::rootLayer const): (WebKit::VideoFullscreenInterfaceContext::setRootLayer): * Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::createModelAndInterface): (WebKit::VideoFullscreenManager::ensureModelAndInterface): (WebKit::VideoFullscreenManager::setupRemoteLayerHosting): (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement): (WebKit::VideoFullscreenManager::requestVideoContentLayer): (WebKit::VideoFullscreenManager::didCleanupFullscreen): (WebKit::VideoFullscreenManager::setVideoLayerFrameFenced): (WebKit::VideoFullscreenManager::updateTextTrackRepresentationForVideoElement): (WebKit::VideoFullscreenManager::setTextTrackRepresentationContentScaleForVideoElement): (WebKit::VideoFullscreenManager::setTextTrackRepresentationIsHiddenForVideoElement): Canonical link: https://commits.webkit.org/262487@main
- Loading branch information
Showing
18 changed files
with
378 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.