Bug 168716 - Implement WebVTT VTTCue region attribute
Summary: Implement WebVTT VTTCue region attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-02-22 03:16 PST by Simon Pieters (:zcorpan)
Modified: 2020-12-12 11:40 PST (History)
16 users (show)

See Also:


Attachments
Patch (48.62 KB, patch)
2020-12-11 13:58 PST, frankolivier
no flags Details | Formatted Diff | Diff
Patch (47.08 KB, patch)
2020-12-12 10:42 PST, frankolivier
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Simon Pieters (:zcorpan) 2017-03-09 05:08:27 PST
I suppose it makes sense to update the WebVTT region-related API changes all at once; see https://github.com/w3c/web-platform-tests/pull/4997

In historical.html, tests that fail in Safari TP:

VTTCue regionId member must be nuked
TextTrack regions member must be nuked
TextTrack addRegion member must be nuked
TextTrack removeRegion member must be nuked
VTTRegion track member must be nuked
VTTRegion id member must be nuked

(Note: VTTRegion id is very likely to be added back to the spec.)


See also IDL tests added in https://github.com/w3c/web-platform-tests/pull/4992
Comment 2 Simon Pieters (:zcorpan) 2017-08-15 03:01:38 PDT
(In reply to Simon Pieters from comment #1)
> VTTRegion id member must be nuked
> 
> (Note: VTTRegion id is very likely to be added back to the spec.)

id was re-introduced in https://github.com/w3c/webvtt/pull/349
test at https://github.com/w3c/web-platform-tests/pull/6885
Comment 3 Silvia Pfeiffer 2017-10-14 01:06:06 PDT
Also please note that there is a :cue-region and :cue-region(id) pseudo-class to implement https://github.com/w3c/webvtt/issues/355
Comment 4 Radar WebKit Bug Importer 2020-11-30 11:42:21 PST
<rdar://problem/71815641>
Comment 5 frankolivier 2020-12-11 13:58:20 PST
Created attachment 416044 [details]
Patch
Comment 6 Eric Carlson 2020-12-11 15:44:36 PST
Comment on attachment 416044 [details]
Patch

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

> Source/WebCore/html/track/TextTrackCueGeneric.cpp:97
> +        

Nit: don't need this new whitespace

> Source/WebCore/html/track/VTTCue.cpp:199
> +    

Ditto.

> Source/WebCore/html/track/VTTCue.cpp:584
> +        // return Exception { SyntaxError };

Did you mean to leave this commented out?

> Source/WebCore/html/track/VTTCue.cpp:1063
> +        if (m_region) {
> +            if (m_displayTree)
> +                m_region->willRemoveTextTrackCueBox(m_displayTree.get());
>          }

Nit: this could be simplified to `if (m_region && m_displayTree) ...`

> Source/WebCore/html/track/VTTCue.h:210
> +//    bool linePositionIsAuto() const;

Should this be deleted?

> Source/WebCore/rendering/RenderVTTCue.cpp:62
> +    

Nit: whitespace

> Source/WebCore/rendering/RenderVTTCue.cpp:391
> +
> +

Nit: extra blank line
Comment 7 frankolivier 2020-12-12 10:42:05 PST
Created attachment 416099 [details]
Patch
Comment 8 EWS 2020-12-12 11:40:18 PST
Committed r270738: <https://trac.webkit.org/changeset/270738>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416099 [details].