REGRESSION(r201474): Subtitles are not resizing in other fullscreen modes
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 21:59:07 +0000 (21:59 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 21:59:07 +0000 (21:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158355

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
Set the text track representation layer's frame based on the active video layer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201661 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

index 2ddc742..e2c66b3 100644 (file)
@@ -1,3 +1,14 @@
+2016-06-03  Ada Chan  <adachan@apple.com>
+
+        REGRESSION(r201474): Subtitles are not resizing in other fullscreen modes
+        https://bugs.webkit.org/show_bug.cgi?id=158355
+
+        Reviewed by Eric Carlson.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
+        Set the text track representation layer's frame based on the active video layer.
+
 2016-06-03  Brady Eidson  <beidson@apple.com>
 
         Miscellaneous IDBBindingUtilities cleanup.
index 0ad0d9b..3cd1cbd 100644 (file)
@@ -2181,7 +2181,8 @@ void MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds()
         return;
 
     FloatRect videoFullscreenFrame = m_videoFullscreenLayerManager->videoFullscreenFrame();
-    CGRect textFrame = m_videoLayer ? [m_videoLayer videoRect] : CGRectMake(0, 0, videoFullscreenFrame.width(), videoFullscreenFrame.height());
+    auto activeLayer = m_secondaryVideoLayer.get() ?: m_videoLayer.get();
+    CGRect textFrame = activeLayer ? [activeLayer videoRect] : CGRectMake(0, 0, videoFullscreenFrame.width(), videoFullscreenFrame.height());
     [m_textTrackRepresentationLayer setFrame:textFrame];
 #endif
 }