Commit Graph

10 Commits

Author SHA1 Message Date
Rick Eyre
73c2f74ef5 Bug 868509 - Rename TextTrackCue to VTTCue r=rillian
This way we can ensure that JS code written for WebVTT is spec
compliant while at the same time not having to abstract VTTCue
from TextTrackCue.

--HG--
rename : dom/webidl/TextTrackCue.webidl => dom/webidl/VTTCue.webidl
2013-08-27 13:07:00 -07:00
Kyle Huey
de0ee30e74 Bug 903772: Part 3 - Refactor GlobalObject. r=peterv 2013-08-22 22:17:08 -07:00
Rick Eyre
67da9a7c47 Bug 905320 - Fix TextTrack classes to utilize cycle collection correctly. r=khuey
We were incorrectly using the wrapper cache cycle collection macros when that
functionality was already implemented by the base classes. Therefore, we
should instead use the inherited version of the cycle collection macros.
2013-08-15 11:11:15 -04:00
Marcus Saad
8b4f8baa85 Bug 882743 - Make TextTrackCue setters throw. r=rillian, r=bz
From 8f5dccf7fd5f5d2a74341ead60586346e4ab3ead Mon Sep 17 00:00:00 2001
Now throwing javascript exceptions from attribute setters for TextTrack-related DOM classes.
As can be seen in http://dev.w3.org/html5/webvtt/#webvtt-api, some of the attributes require validation and throwing.
There is no validation implemented to the align property because there is a bug opened against the spec to change it to an Enum.
When cleared, it should have the IDL changed to remove the throwing.
Validation comments were removed from the properties that didn't have proper validation defined by the spec.
2013-07-24 14:18:54 -04:00
Ralph Giles
87be796147 Bug 894104 - Part 3: remove TextTrackCue's mGlobal. r=bz
From 095c76c72dd5915b2fa8ec74f4e2b0b45de244f1 Mon Sep 17 00:00:00 2001
Since we keep a document reference we no longer need the
separate global. It was only used in GetParentObject() and
we can return nullptr there (meaning 'use whatever magic global')
or return the document instead, which is what this patch does.
2013-07-18 15:01:48 -07:00
Ralph Giles
5dd627ae07 Bug 894104 - Part 1: Retain a document reference for GetCueAsHTML.
From 447985000db919e2f054012ca10f03d626c401b1 Mon Sep 17 00:00:00 2001
 r=bz
Save a copy of the owning document at creation time instead
of looking it up from mGlobal in each call. This ensures it
is available even if we're called after our window is unlinked
at teardown.

Make the constructors throw if a window is not available,
so we can return an INVALID_STATE_ERR if we're called
in an incomplete environment.
2013-07-16 22:14:40 -07:00
Ralph Giles
d187fe7323 Bug 887463 - remove webvtt parser library. r=cpearce. 2013-07-09 17:02:00 -07:00
Rick Eyre
ecb691da3b Bug 882714 - Implement TextTrackCue::DisplayState r=rillian
- Renamed mCueDiv to mDisplayState to match spec.
- Introduced mReset which is set whenever TextTrackCue changes in
a way that will mean we have to rebuild the computed cuetext of the
TextTrackCue.
2013-07-04 23:24:43 +02:00
Rick Eyre
73e8300de5 Bug 833382 - Implement WebVTTLoadListener r=cpearce,bz
- Implemented WebVTTLoadListener to manage the webvtt parser.
- TextTrackCue now handles the conversion of webvtt nodes to
  anonymous content which will be displayed on the video div
  overlay.
- HTMLTrackElement manages the lifetime of the WebVTTLoadListener.
2013-06-10 08:30:00 -07:00
Ralph Giles
d98efa09c2 Bug 833385 - Implement HTMLTrackElement and TextTrack. r=bz,Ms2ger
Add webidl interfaces and implementations of the HTML <track>
element and related TextTrack, TextTrackList, TextTrackCue,
and TextTrackCueList dom objects.

Visibility is controlled by the media.webvtt.enabled pref,
which defaults to false.

HTMLMediaElement:NewURIFromString() is hoisted to
nsGenericHTMLElement so it's available to the track
element as well.

This patch is primarily work by Dale Karp, David Humphrey
and others as Seneca College.
2013-05-22 00:14:00 +08:00