TextTrackCue Extension for WebVTT Regions
authorvcarbune@chromium.org <vcarbune@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2013 20:10:48 +0000 (20:10 +0000)
committervcarbune@chromium.org <vcarbune@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2013 20:10:48 +0000 (20:10 +0000)
commitca387369645dfbf1c36c339d4e3d5fce5345819d
treeae3fd7b6bd8078248d0260c987ed5a4540171a68
parent9f8b3ac3b226e167b4895b910500e9da0f8b9a04
TextTrackCue Extension for WebVTT Regions
https://bugs.webkit.org/show_bug.cgi?id=109821

Reviewed by Eric Carlson.

Source/WebCore:

The TextTrackCue gets a new attribute and setting, regionId, which specifies
to which region the cue belongs to. The attribute is guarded by WEBVTT_REGIONS
and is by default disabled in ports.

Test: media/track/regions-webvtt/text-track-cue-region-attribute.html

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::TextTrackCue): Added member variable for the regionId attribute.
(WebCore):
(WebCore::TextTrackCue::setRegionId): Setter for the regionId attribute.
(WebCore::TextTrackCue::settingName): Added RegionId setting name.
(WebCore::TextTrackCue::setCueSettings): Parsed the "region:" cue setting.
* html/track/TextTrackCue.h:
(TextTrackCue):
(WebCore::TextTrackCue::regionId): Getter for the regionId attribute.
* html/track/TextTrackCue.idl: Updated to match the WebVTT Regions Extension.

LayoutTests:

* media/track/captions-webvtt/header-regions.vtt: Updated to include cues with
settings for which the "region:" setting should be ignored (for backwards compatibility
regarding WebVTT rendering rules).
* media/track/regions-webvtt/text-track-cue-region-attribute-expected.txt: Added.
* media/track/regions-webvtt/text-track-cue-region-attribute.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/track/captions-webvtt/header-regions.vtt
LayoutTests/media/track/regions-webvtt/text-track-cue-region-attribute-expected.txt [new file with mode: 0644]
LayoutTests/media/track/regions-webvtt/text-track-cue-region-attribute.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/track/TextTrackCue.cpp
Source/WebCore/html/track/TextTrackCue.h
Source/WebCore/html/track/TextTrackCue.idl