Commit Graph

36 Commits

Author SHA1 Message Date
Benoit Jacob
bbd8cc51c5 Bug 1035394 - Fix dangerous public destructors in content/media - r=cpearce 2014-07-08 17:23:16 -04:00
Ehsan Akhgari
4992220d59 Bug 1024459 - Define an out of line destructor for TextTrack so that we can forward delcare HTMLTrackElement in TextTrack.h; r=bzbarsky
This is required because the destructor for the nsRefPtr<HTMLTrackElement>
member requires the full definition of the type.
2014-06-14 22:53:52 -04:00
Rick Eyre
ca1c5aecfa Bug 976580 - Set cue state to dirty when video resize happens. r=rillian, r=bz
This way when the video is resized the rendering algorithm for the cues
will run again and hence, the caption size will be increased/decreased
for the new size of the video.
2014-04-07 15:42:33 -04:00
Rick Eyre
fd2961dce2 Bug 950308 - TextTrack, TextTrackCue, TextTrackList should BindToOwner. r=smaug 2014-04-07 13:58:38 -04:00
Boris Zbarsky
79dab91ff6 Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
Rick Eyre
245d1a6e17 Bug 882677 - Part 1: Dispatch loaded and error events to the HTMLTrackElement. r=cpearce 2014-03-14 12:13:41 -04:00
Masayuki Nakano
930436ef24 Bug 984269 Rename nsDOMEventTargetHelper to mozilla::DOMEventTargetHelper r=smaug
--HG--
rename : dom/events/nsDOMEventTargetHelper.cpp => dom/events/DOMEventTargetHelper.cpp
rename : dom/events/nsDOMEventTargetHelper.h => dom/events/DOMEventTargetHelper.h
2014-04-01 15:13:50 +09:00
Rick Eyre
966f17bf77 Bug 891381 - Tracks loaded via TrackElement should have the same id as the TrackElement. r=cpearce 2014-03-19 11:27:39 -04:00
Rick Eyre
e528d12f52 Bug 977299 - Don't display subtitles if their mode is 'hidden'. r=rillian
I've renamed TextTrackList::GetAllActiveCues to
UpdateAndGetShowingCues to make it a bit more clear what
this function is doing.
2014-02-27 10:02:40 -05:00
Rick Eyre
a8e926db00 Bug 985484 - Remove TextTrackCue::CueChange. r=cpearce 2014-03-19 11:01:38 -04:00
Rick Eyre
ce47d2cbba Bug 983293 - Part 4: Pass ReadyState variables to AddTextTrack methods and TextTrack ctors. r=cpearce
This makes it more clear what part of the code is triggering the ReadyState
to be what it is. I.E. Tracks added through the HTMLMediaElement::AddTextTrack
method should have a ReadyState of "Loaded" and so it's more clear for
function to specify that. Vice versa for TrackElements which add TextTracks
with a default ReadyState of "None".
2014-03-13 14:41:21 -04:00
Rick Eyre
ac80b91953 Bug 983293 - Part 3: Rename the READY_STATE enum to TextTrackReadyState. r=cpearce
- This allows us to pass around ReadyState values. It also makes the type
explicit which will save us from potentially shooting ourselves in
the foot.
- I also renamed 'READY_STATE_NONE' and 'READY_STATE_ERROR' to
'NotLoaded' and 'FailedToLoad' respectively in the enum. This is to
avoid some name collision errors we were having. It also makes it more
clear where in the spec this is as these names are the spec's names
for the TextTrack enum.
2014-03-13 14:29:32 -04:00
Rick Eyre
5b8f62b638 Bug 983293 - Part 2: Move the READY_STATE enum to Track instead of HTMLTrackElement. r=cpearce
This makes more sense as the READY_STATE values in the spec are always
referred to be 'text track readiness states' not HTMLTrackElement
readiness states.
2014-03-13 13:48:09 -04:00
Rick Eyre
a57f966bb2 Bug 983293 - Part 1: Remove unused TextTrack constructor. r=cpearce 2014-03-13 13:37:31 -04:00
Rick Eyre
182d5316ee Bug 983207 - Tracks created through a TrackElement should have a default mode of 'disabled'. r=cpearce
- I've refactored the way we set modes as well, making it a part
of the TextTrack ctors.
- I've also changed TextTracks in the track tests to have their
mode set to 'hidden' in order to be able to call TextTrack::Cues.
This is correct since TextTracks with a mode of 'disabled' do not
return null for their cue lists.
2014-03-13 13:18:06 -04:00
Rick Eyre
1b31667459 Bug 882664 - Part 2: Perform sorting on TextTrackLists. r=rillian
- This implements sorting on the MediaElement's list of TextTracks as
described in: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-model
This is important as automatically positioned cues will have a line
position that is relative to their TextTrack's position in the
MediaElement's list of TextTracks.
- Added a TextTrackSource enum which all TextTracks have. This helps
distinguish where a TextTrack came from.
2014-02-27 12:47:23 -05:00
Rick Eyre
50ef0f7c31 Bug 882664 - Part 1: TextTrack should hold a ref to its TrackElement, if any. r=rillian 2014-02-27 14:07:39 -05:00
Rick Eyre
0f67bb4ee3 Bug 978163 - Part 1: Remove VTTRegionList and VTTRegion TextTrack extensions. r=rillian, r=bz
- These two parts of the spec were recently removed as they
were seen as unecessary or bad design, in the case of the
VTTRegion TextTrack extensions. See the spec bug at:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24380
2014-03-10 11:33:06 -04:00
Rick Eyre
0bf15cf8bd Bug 881976 - Part 3: Refactor TextTrack classes. r=rillian
Change the way they store references to eachother to make more sense.
A Track will never belong to a MediaElement directly. It will always
belong to one through a TextTrackList.
2014-01-27 15:17:20 -05:00
Rick Eyre
86a0813daf Bug 881976 - Part 1: Expose TextTrack::TextTrackList to Chrome JS. r=rillian, r=bz
Our JS WebVTT implementation (vtt.js) needs access to the Track's
TextTrackList in order to compute the line position of a TextTrackCue.
Therefore, we need to expose it to chrome JS so that vtt.js can have
access to it.
2014-01-27 13:10:06 -05:00
Rick Eyre
70ab9a1568 Bug 865407 - Part 5: Move update display of cues code to TextTrackManager. r=bz, r=rillian 2013-12-12 12:02:17 -05:00
Rick Eyre
0f40bbdceb Bug 865407 - Part 3: Add TextTrackList::GetAllActiveCues(). r=rillian 2013-12-12 10:57:21 -05:00
Ryan VanderMeulen
ad7ccba84d Backed out 5 changesets (bug 865407) for Windows crashes.
Backed out changeset d3e7f6392670 (bug 865407)
Backed out changeset 7ba94f08b7a5 (bug 865407)
Backed out changeset 3de6e32a4346 (bug 865407)
Backed out changeset 5c0572c6727b (bug 865407)
Backed out changeset 5db43cac79f5 (bug 865407)
2014-01-10 11:50:49 -05:00
Rick Eyre
714e04f170 Bug 865407 - Part 5: Move update display of cues code to TextTrackManager. r=bz, r=rillian 2013-12-12 12:02:17 -05:00
Rick Eyre
4ca6ff109d Bug 865407 - Part 3: Add TextTrackList::GetAllActiveCues(). r=rillian 2013-12-12 10:57:21 -05:00
Andrew Quartey
bccdc26ea8 Bug 882665 - Part a: Add readiness state attribute to text track. r= rillian, khuey 2013-10-25 00:14:36 -04:00
Rick Eyre
46699b0bdf Bug 883173 - Part 3: Implement TextTrack::ActiveCues. r=cpearce, r=rillian
- Active cues now returns the subset of cues in mCueList that are valid
for the current playback time.
- Introduces new code in media element, when seeking, and in TextTrack, when
adding and removing cues, to mark the active cue list as dirty so that we know
when we might need to rebuild the list completely.
2013-06-14 16:10:36 -04:00
Rick Eyre
fecd77a25a Bug 867823 - Implement TextTrack Add/RemoveCue. r=rillian
- Updated RemoveCue to throw NotFoundError if the cue being removed is
not in the cue list.
- Updated AddCue to not add cues that are already in the list. This is
done by reference comparing.
2013-06-28 13:31:43 -04:00
Andrew Quartey
c9ac8008b9 Bug 897504 - Implement region API for Gecko. r=giles, khuey 2013-09-13 19:44:33 -04:00
Ehsan Akhgari
210ba12d7c Bug 912702 - Minimize the #includes in content/media; r=roc 2013-09-05 16:25:17 -04:00
Ehsan Akhgari
45746b149c Backed out changeset 2f15518f566e (bug 912702) because of B2G JB Emulator build bustage
--HG--
extra : rebase_source : 6c01ad3bc2f91b0e7e3edab84aedbfe064310a8b
2013-09-05 13:29:38 -04:00
Ehsan Akhgari
66abd6bfb5 Bug 912702 - Minimize the #includes in content/media; r=roc 2013-09-04 17:58:14 -04:00
Rick Eyre
75a54dece9 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
Rick Eyre
4b1d58d1cc Bug 882706 - Implement TextTrackList::GetTrackById(). r=rillian
I've also added an Id attribute to the TextTrack implementation as it wasn't
there yet.
2013-07-09 11:44:35 -04:00
Rick Eyre
0bdf09070f 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
cc2db4daf4 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