Skip to content
Permalink
Browse files
[iOS] iPhone fullscreen captions are sometimes duplicated
https://bugs.webkit.org/show_bug.cgi?id=241464
rdar://94261522

Reviewed by Jer Noble.

Clear the text track representation when the video layer is cleared.

* Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
(WebCore::VideoLayerManagerObjC::didDestroyVideoLayer): Clear the text track representation.

* Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
(WebCore::TextTrackRepresentationCocoa::TextTrackRepresentationCocoa): Name the text
track representation layer to aid debugging in the future.

Canonical link: https://commits.webkit.org/251445@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eric-carlson committed Jun 9, 2022
1 parent 4139966 commit 63ef77d40604321c37f05572e58a94061dd3605d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
@@ -91,6 +91,9 @@
{
ALWAYS_LOG(LOGIDENTIFIER);

#if ENABLE(VIDEO_PRESENTATION_MODE)
setTextTrackRepresentationLayer(nil);
#endif
[m_videoLayer removeFromSuperlayer];

m_videoInlineLayer = nil;
@@ -119,6 +119,8 @@ - (id)actionForLayer:(CALayer *)layer forKey:(NSString *)event
{
[m_layer setDelegate:m_delegate.get()];
[m_layer setContentsGravity:kCAGravityBottom];

[m_layer setName:@"TextTrackRepresentation"];
}

TextTrackRepresentationCocoa::~TextTrackRepresentationCocoa()

0 comments on commit 63ef77d

Please sign in to comment.