Bug 917945 - Part 1: Expose TextTrackRegion* as VTTRegion*. r=rillian, r=bz

--HG--
rename : dom/webidl/TextTrackRegion.webidl => dom/webidl/VTTRegion.webidl
rename : dom/webidl/TextTrackRegionList.webidl => dom/webidl/VTTRegionList.webidl
This commit is contained in:
Rick Eyre 2013-09-20 14:42:35 -04:00
parent acfcfeed61
commit 5e94197e01
7 changed files with 37 additions and 32 deletions

View File

@ -6,7 +6,7 @@
#include "mozilla/dom/TextTrack.h"
#include "mozilla/dom/TextTrackRegion.h"
#include "mozilla/dom/TextTrackRegionBinding.h"
#include "mozilla/dom/VTTRegionBinding.h"
namespace mozilla {
namespace dom {
@ -22,7 +22,7 @@ NS_INTERFACE_MAP_END
JSObject*
TextTrackRegion::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return TextTrackRegionBinding::Wrap(aCx, aScope, this);
return VTTRegionBinding::Wrap(aCx, aScope, this);
}
already_AddRefed<TextTrackRegion>

View File

@ -5,7 +5,7 @@
#include "mozilla/dom/TextTrackRegion.h"
#include "mozilla/dom/TextTrackRegionList.h"
#include "mozilla/dom/TextTrackRegionListBinding.h"
#include "mozilla/dom/VTTRegionListBinding.h"
namespace mozilla {
namespace dom {
@ -23,7 +23,7 @@ NS_INTERFACE_MAP_END
JSObject*
TextTrackRegionList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
{
return TextTrackRegionListBinding::Wrap(aCx, aScope, this);
return VTTRegionListBinding::Wrap(aCx, aScope, this);
}
TextTrackRegionList::TextTrackRegionList(nsISupports* aGlobal)

View File

@ -1254,6 +1254,14 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::TextTrackCue'
},
'VTTRegion': {
'nativeType': 'mozilla::dom::TextTrackRegion',
},
'VTTRegionList': {
'nativeType': 'mozilla::dom::TextTrackRegionList',
},
'WebGLActiveInfo': {
'nativeType': 'mozilla::WebGLActiveInfo',
'headerFile': 'WebGLActiveInfo.h',

View File

@ -34,7 +34,7 @@ interface TextTrack : EventTarget {
readonly attribute TextTrackCueList? cues;
readonly attribute TextTrackCueList? activeCues;
readonly attribute TextTrackRegionList? regions;
readonly attribute VTTRegionList? regions;
void addCue(VTTCue cue);
[Throws]
@ -42,6 +42,6 @@ interface TextTrack : EventTarget {
attribute EventHandler oncuechange;
[Throws]
void removeRegion(TextTrackRegion region);
void addRegion(TextTrackRegion region);
void removeRegion(VTTRegion region);
void addRegion(VTTRegion region);
};

View File

@ -7,25 +7,24 @@
* http://dev.w3.org/html5/webvtt/#extension-of-the-texttrack-interface-for-region-support
*/
[Constructor, Pref="media.webvtt.enabled"]
interface TextTrackRegion {
readonly attribute TextTrack? track;
attribute DOMString id;
[SetterThrows]
attribute double width;
attribute long lines;
[SetterThrows]
attribute double regionAnchorX;
[SetterThrows]
attribute double regionAnchorY;
[SetterThrows]
attribute double viewportAnchorX;
[SetterThrows]
interface VTTRegion {
readonly attribute TextTrack? track;
attribute DOMString id;
[SetterThrows]
attribute double width;
attribute long lines;
[SetterThrows]
attribute double regionAnchorX;
[SetterThrows]
attribute double regionAnchorY;
[SetterThrows]
attribute double viewportAnchorX;
[SetterThrows]
attribute double viewportAnchorY;
[SetterThrows]
[SetterThrows]
attribute DOMString scroll;
};

View File

@ -7,11 +7,9 @@
* http://dev.w3.org/html5/webvtt/#extension-of-the-texttrack-interface-for-region-support
*/
[Pref="media.webvtt.enabled"]
interface TextTrackRegionList {
interface VTTRegionList {
readonly attribute unsigned long length;
getter TextTrackRegion (unsigned long index);
TextTrackRegion? getRegionById(DOMString id);
getter VTTRegion (unsigned long index);
VTTRegion? getRegionById(DOMString id);
};

View File

@ -381,8 +381,6 @@ WEBIDL_FILES = [
'TextTrack.webidl',
'TextTrackCueList.webidl',
'TextTrackList.webidl',
'TextTrackRegion.webidl',
'TextTrackRegionList.webidl',
'TimeEvent.webidl',
'TimeRanges.webidl',
'Touch.webidl',
@ -397,6 +395,8 @@ WEBIDL_FILES = [
'URLUtils.webidl',
'URLUtilsReadOnly.webidl',
'VTTCue.webidl',
'VTTRegion.webidl',
'VTTRegionList.webidl',
'ValidityState.webidl',
'VideoPlaybackQuality.webidl',
'VideoStreamTrack.webidl',