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.
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()).
- Added vtt.js, a JS WebVTT parser, to Gecko.
- Added a wrapper to interface between it and Gecko.
- Updated TextTrackCue and WebVTTListener to work with it.
--HG--
rename : content/media/WebVTTLoadListener.cpp => content/media/WebVTTListener.cpp
rename : content/media/WebVTTLoadListener.h => content/media/WebVTTListener.h
- Remove left over references to WebVTT C parser in TextTrackCue and
WebVTTListener classes.
- Remove miscellaneous unused code as well and included libraries as
well.
Following up with the changes made in http://dev.w3.org/html5/webvtt/#dfn-dom-vttcue-vertical, this patch comes to create a new enum to validate and control the possible values for TextTrackCue::Vertical. Throwing behavior was removed for spec conformance.
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
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.
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.
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.
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.
- 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.
- 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.