Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Benoit Jacob bbd8cc51c5 Bug 1035394 - Fix dangerous public destructors in content/media - r=cpearce 2014-07-08 17:23:16 -04:00
Ehsan Akhgari 0616177a2f Bug 1028680 - Give TextTrackList an out-of-line destructor so that we can forward declare TextTrackManager in the header; r=bzbarsky
--HG--
extra : rebase_source : d8a6eaefd00fe20b0405bef5309100e74a0ac6d7
2014-06-24 07:20:54 -07: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
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 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 4c6493e492 Bug 977302 - Perform automatic text track selection. r=rillian
This takes care of automatic track selection for tracks with
the default attribute specified. However, it does not take
into account any user preferences set through Firefox such
as default language.
2014-02-28 15:40:00 -05: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 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 0f68038790 Bug 972479 - TextTracks added to a TextTrackList through an HTMLTrackElement should dispatch 'onaddtrack' event. r=rillian
The problem was that the HTMLTrackElement calls a different
AddTextTrack method then the HTMLMediaElement does when
addTextTrack is called on it. This patch has the method
that the HTMLTrackElement calls dispatch the onaddtrackevent
as well.
2014-02-13 13:28:21 -05: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 bc8fa5d9c8 Bug 881976 - Part 2: Expose TextTrackList's MediaElement to chrome JS. r=rillian, r=bz
Our JS WebVTT implementation (vtt.js) needs access to a TextTrackList's
MediaElement in order to compute a TextTrackCue's line position. Therefore,
we need to expose it to chrome JS.
2014-01-27 14:51:28 -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
Brendan Long edf15f09d2 Bug 882703 - Add TextTrackList change event; r=rillian,bz 2013-12-17 23:19:09 -06:00
Rick Eyre 1abc297cc7 Bug 865407 - Part 2: Change TextTrackList::RemoveTextTrack() to receive a pointer r=rillian
The only code using this is TextTrackManager::RemoveTextTrack() which
receives a non-const pointer.
2013-10-21 07:15:00 -07:00
Andrew Quartey f53cab1745 Bug 893309 - Implement TrackEvent. r=cpearce 2013-10-04 14:28:25 -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
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