Bug 203649

Summary: Add experimental TextTrackCue API
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, calvaris, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, joepeck, kangil.han, kondapallykalyan, pdr, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
none
WIP
none
Patch
none
Patch for landing none

Description Eric Carlson 2019-10-30 17:37:44 PDT
Add the "Generic" TextTrackCue API presented at TPAC and FOMS. The API is disabled-by-default.
Comment 1 Eric Carlson 2019-10-30 17:38:03 PDT
<rdar://problem/55675172>
Comment 2 Eric Carlson 2019-10-30 17:54:43 PDT
Created attachment 382399 [details]
WIP
Comment 3 Eric Carlson 2019-10-30 18:17:35 PDT
Created attachment 382402 [details]
WIP
Comment 4 Jer Noble 2019-11-01 10:40:32 PDT
Comment on attachment 382402 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=382402&action=review

> Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:180
> +void MediaControlsHost::updateCaptionDisplaySizes(bool forceUpdate)

A parameter of “enum class ForceUpdate { Yes, No }” might be nice here

> Source/WebCore/html/shadow/MediaControlElements.cpp:1193
> +        for (size_t i = 0; i < activeCues.size(); ++i) {

Can this be?: for (auto& cue : activeCues)

> Source/WebCore/html/shadow/MediaControlElements.cpp:1199
> +                RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree(m_videoDisplaySize.size(), m_fontSize);

Auto?

> Source/WebCore/html/shadow/MediaControlElements.cpp:1223
> +    if (!region) {

Or: if (auto region = ....)  { ... } else { ... }
Comment 5 Eric Carlson 2019-11-01 11:42:33 PDT
Created attachment 382604 [details]
Patch
Comment 6 Eric Carlson 2019-11-01 13:55:49 PDT
Created attachment 382624 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2019-11-01 15:50:02 PDT
Comment on attachment 382624 [details]
Patch for landing

Clearing flags on attachment: 382624

Committed r251950: <https://trac.webkit.org/changeset/251950>
Comment 8 WebKit Commit Bot 2019-11-01 15:50:04 PDT
All reviewed patches have been landed.  Closing bug.