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()).
This patch was mostly generated with this command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""
plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
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.
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".
- 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.
- 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.
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.
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.
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.
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.
- 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.
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.
- 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.
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.