mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1108721, HTMLMediaElement.textTracks needs to be nullable in Gecko for now, r=peterv
--HG-- extra : rebase_source : 8c4b0b13e50a200907f1b4ba923fee4165318ca9
This commit is contained in:
parent
c3bd5ba35d
commit
f0befe594b
@ -4272,11 +4272,11 @@ HTMLMediaElement::VideoTracks()
|
||||
return mVideoTrackList;
|
||||
}
|
||||
|
||||
/* readonly attribute TextTrackList textTracks; */
|
||||
/* readonly attribute TextTrackList? textTracks; */
|
||||
TextTrackList*
|
||||
HTMLMediaElement::TextTracks()
|
||||
HTMLMediaElement::GetTextTracks()
|
||||
{
|
||||
return GetOrCreateTextTrackManager()->TextTracks();
|
||||
return GetOrCreateTextTrackManager()->GetTextTracks();
|
||||
}
|
||||
|
||||
already_AddRefed<TextTrack>
|
||||
|
@ -579,7 +579,7 @@ public:
|
||||
|
||||
VideoTrackList* VideoTracks();
|
||||
|
||||
TextTrackList* TextTracks();
|
||||
TextTrackList* GetTextTracks();
|
||||
|
||||
already_AddRefed<TextTrack> AddTextTrack(TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
|
@ -153,13 +153,12 @@ HTMLTrackElement::CreateTextTrack()
|
||||
kind = TextTrackKind::Subtitles;
|
||||
}
|
||||
|
||||
bool hasHadScriptObject = true;
|
||||
nsIScriptGlobalObject* scriptObject =
|
||||
OwnerDoc()->GetScriptHandlingObject(hasHadScriptObject);
|
||||
nsISupports* parentObject =
|
||||
OwnerDoc()->GetParentObject();
|
||||
|
||||
NS_ENSURE_TRUE_VOID(scriptObject || !hasHadScriptObject);
|
||||
NS_ENSURE_TRUE_VOID(parentObject);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(scriptObject);
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(parentObject);
|
||||
mTrack = new TextTrack(window, kind, label, srcLang,
|
||||
TextTrackMode::Disabled,
|
||||
TextTrackReadyState::NotLoaded,
|
||||
|
@ -91,13 +91,12 @@ TextTrackManager::TextTrackManager(HTMLMediaElement *aMediaElement)
|
||||
: mMediaElement(aMediaElement)
|
||||
, performedTrackSelection(false)
|
||||
{
|
||||
bool hasHadScriptObject = true;
|
||||
nsIScriptGlobalObject* scriptObject =
|
||||
mMediaElement->OwnerDoc()->GetScriptHandlingObject(hasHadScriptObject);
|
||||
nsISupports* parentObject =
|
||||
mMediaElement->OwnerDoc()->GetParentObject();
|
||||
|
||||
NS_ENSURE_TRUE_VOID(scriptObject || !hasHadScriptObject);
|
||||
NS_ENSURE_TRUE_VOID(parentObject);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(scriptObject);
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(parentObject);
|
||||
mNewCues = new TextTrackCueList(window);
|
||||
mTextTracks = new TextTrackList(window, this);
|
||||
mPendingTextTracks = new TextTrackList(window, this);
|
||||
@ -115,7 +114,7 @@ TextTrackManager::~TextTrackManager()
|
||||
}
|
||||
|
||||
TextTrackList*
|
||||
TextTrackManager::TextTracks() const
|
||||
TextTrackManager::GetTextTracks() const
|
||||
{
|
||||
return mTextTracks;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
|
||||
explicit TextTrackManager(HTMLMediaElement* aMediaElement);
|
||||
|
||||
TextTrackList* TextTracks() const;
|
||||
TextTrackList* GetTextTracks() const;
|
||||
already_AddRefed<TextTrack> AddTextTrack(TextTrackKind aKind,
|
||||
const nsAString& aLabel,
|
||||
const nsAString& aLanguage,
|
||||
|
@ -91,7 +91,7 @@ interface HTMLMediaElement : HTMLElement {
|
||||
[Pref="media.track.enabled"]
|
||||
readonly attribute VideoTrackList videoTracks;
|
||||
[Pref="media.webvtt.enabled"]
|
||||
readonly attribute TextTrackList textTracks;
|
||||
readonly attribute TextTrackList? textTracks;
|
||||
[Pref="media.webvtt.enabled"]
|
||||
TextTrack addTextTrack(TextTrackKind kind,
|
||||
optional DOMString label = "",
|
||||
|
Loading…
Reference in New Issue
Block a user