Changeset 232220 in webkit


Ignore:
Timestamp:
May 25, 2018 6:02:44 PM (6 years ago)
Author:
eric.carlson@apple.com
Message:

Captions are sized incorrectly in PiP mode
https://bugs.webkit.org/show_bug.cgi?id=186005
<rdar://problem/39729718>

Reviewed by Dean Jackson.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateSizes): Only sync text track bounds
when the size actually changes.

  • platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:

(WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenFrame): Call syncTextTrackBounds.
(WebCore::VideoFullscreenLayerManagerObjC::syncTextTrackBounds): Set the text track layer size
to m_videoFullscreenFrame, it is always set the size of the PiP/Fullscreen layer.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r232218 r232220  
     12018-05-25  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Captions are sized incorrectly in PiP mode
     4        https://bugs.webkit.org/show_bug.cgi?id=186005
     5        <rdar://problem/39729718>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * html/shadow/MediaControlElements.cpp:
     10        (WebCore::MediaControlTextTrackContainerElement::updateSizes): Only sync text track bounds
     11        when the size actually changes.
     12
     13        * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
     14        (WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenFrame): Call syncTextTrackBounds.
     15        (WebCore::VideoFullscreenLayerManagerObjC::syncTextTrackBounds): Set the text track layer size
     16        to m_videoFullscreenFrame, it is always set the size of the PiP/Fullscreen layer.
     17
    1182018-05-25  Timothy Hatcher  <timothy@apple.com>
    219
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r229694 r232220  
    13831383        return;
    13841384
    1385     mediaElement->syncTextTrackBounds();
    1386 
    13871385    IntRect videoBox;
    13881386    if (m_textTrackRepresentation) {
     
    14021400    m_videoDisplaySize = videoBox;
    14031401    m_updateTextTrackRepresentationStyle = true;
     1402    mediaElement->syncTextTrackBounds();
    14041403
    14051404    // FIXME (121170): This function is called during layout, and should lay out the text tracks immediately.
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm

    r230269 r232220  
    145145
    146146    [m_videoLayer setFrame:m_videoFullscreenFrame];
     147    syncTextTrackBounds();
    147148}
    148149
     
    168169    [CATransaction setDisableActions:YES];
    169170
    170     CGRect textFrame = m_videoLayer ? m_videoInlineFrame : m_videoFullscreenFrame;
    171     [m_textTrackRepresentationLayer setFrame:textFrame];
     171    [m_textTrackRepresentationLayer setFrame:m_videoFullscreenFrame];
    172172
    173173    [CATransaction commit];
Note: See TracChangeset for help on using the changeset viewer.