author | Sebastian Hengst <archaeopteryx@coole-files.de> |
Tue, 31 May 2016 18:54:41 +0200 | |
changeset 338771 | 767ae8716c5b411b0e302494d5a5afc068ebf25c |
parent 338770 | 21c996f834375ada99da02b1eb9e1d266bb48c90 |
child 338772 | 73dc6bee6cf1cf490716058f30797082212f244c |
push id | 6249 |
push user | jlund@mozilla.com |
push date | Mon, 01 Aug 2016 13:59:36 +0000 |
treeherder | mozilla-beta@bad9d4f5bf7e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | backout |
bugs | 882718 |
milestone | 49.0a1 |
backs out | 453431d7a2c8842d757e98dd566e81c5a9419dd1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -771,21 +771,16 @@ void HTMLMediaElement::AbortExistingLoad if (mNetworkState != nsIDOMHTMLMediaElement::NETWORK_EMPTY) { NS_ASSERTION(!mDecoder && !mSrcStream, "How did someone setup a new stream/decoder already?"); // ChangeNetworkState() will call UpdateAudioChannelPlayingState() // indirectly which depends on mPaused. So we need to update mPaused first. mPaused = true; ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_EMPTY); ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_NOTHING); - //TODO: Apply the rules for text track cue rendering Bug 865407 - if (mTextTrackManager) { - mTextTrackManager->GetTextTracks()->SetCuesInactive(); - } - if (fireTimeUpdate) { // Since we destroyed the decoder above, the current playback position // will now be reported as 0. The playback position was non-zero when // we destroyed the decoder, so fire a timeupdate event so that the // change will be reflected in the controls. FireTimeUpdate(false); } DispatchAsyncEvent(NS_LITERAL_STRING("emptied"));
--- a/dom/media/TextTrack.cpp +++ b/dom/media/TextTrack.cpp @@ -87,20 +87,16 @@ TextTrack::WrapObject(JSContext* aCx, JS return TextTrackBinding::Wrap(aCx, this, aGivenProto); } void TextTrack::SetMode(TextTrackMode aValue) { if (mMode != aValue) { mMode = aValue; - if (aValue == TextTrackMode::Disabled) { - SetCuesInactive(); - //TODO: Apply the rules for text track cue rendering Bug 865407 - } if (mTextTrackList) { mTextTrackList->CreateAndDispatchChangeEvent(); } } } void TextTrack::GetId(nsAString& aId) const @@ -124,19 +120,16 @@ TextTrack::AddCue(TextTrackCue& aCue) } } SetDirty(); } void TextTrack::RemoveCue(TextTrackCue& aCue, ErrorResult& aRv) { - //TODO: Apply the rules for text track cue rendering Bug 865407 - aCue.SetActive(false); - mCueList->RemoveCue(aCue, aRv); SetDirty(); } void TextTrack::SetCuesDirty() { for (uint32_t i = 0; i < mCueList->Length(); i++) { @@ -265,16 +258,10 @@ TextTrack::GetTrackElement() { return mTrackElement; } void TextTrack::SetTrackElement(HTMLTrackElement* aTrackElement) { mTrackElement = aTrackElement; } -void -TextTrack::SetCuesInactive() -{ - mCueList->SetCuesInactive(); -} - } // namespace dom } // namespace mozilla
--- a/dom/media/TextTrack.h +++ b/dom/media/TextTrack.h @@ -113,18 +113,16 @@ public: HTMLTrackElement* GetTrackElement(); void SetTrackElement(HTMLTrackElement* aTrackElement); TextTrackSource GetTextTrackSource() { return mTextTrackSource; } - void SetCuesInactive(); - private: ~TextTrack(); RefPtr<TextTrackList> mTextTrackList; TextTrackKind mKind; nsString mLabel; nsString mLanguage;
--- a/dom/media/TextTrackCue.cpp +++ b/dom/media/TextTrackCue.cpp @@ -36,17 +36,16 @@ TextTrackCue::SetDefaultCueSettings() mPositionAlign = AlignSetting::Middle; mSize = 100; mPauseOnExit = false; mSnapToLines = true; mLineIsAutoKeyword = true; mAlign = AlignSetting::Middle; mLineAlign = AlignSetting::Start; mVertical = DirectionSetting::_empty; - mActive = false; } TextTrackCue::TextTrackCue(nsPIDOMWindowInner* aOwnerWindow, double aStartTime, double aEndTime, const nsAString& aText, ErrorResult& aRv) : DOMEventTargetHelper(aOwnerWindow)
--- a/dom/media/TextTrackCue.h +++ b/dom/media/TextTrackCue.h @@ -327,26 +327,16 @@ public: * * Returns a DocumentFragment that is the head of the tree of anonymous * content. */ already_AddRefed<DocumentFragment> GetCueAsHTML(); void SetTrackElement(HTMLTrackElement* aTrackElement); - void SetActive(bool aActive) - { - mActive = aActive; - } - - bool GetActive() - { - return mActive; - } - private: ~TextTrackCue(); void SetDefaultCueSettings(); nsresult StashDocument(); RefPtr<nsIDocument> mDocument; nsString mText; @@ -371,17 +361,15 @@ private: // Holds the computed DOM elements that represent the parsed cue text. // http://www.whatwg.org/specs/web-apps/current-work/#text-track-cue-display-state RefPtr<nsGenericHTMLElement> mDisplayState; // Tells whether or not we need to recompute mDisplayState. This is set // anytime a property that relates to the display of the TextTrackCue is // changed. bool mReset; - bool mActive; - static StaticRefPtr<nsIWebVTTParserWrapper> sParserWrapper; }; } // namespace dom } // namespace mozilla #endif // mozilla_dom_TextTrackCue_h
--- a/dom/media/TextTrackCueList.cpp +++ b/dom/media/TextTrackCueList.cpp @@ -112,18 +112,10 @@ TextTrackCueList::RemoveAll() void TextTrackCueList::GetArray(nsTArray<RefPtr<TextTrackCue> >& aCues) { aCues = nsTArray<RefPtr<TextTrackCue> >(mList); } -void -TextTrackCueList::SetCuesInactive() -{ - for(uint32_t i = 0; i < mList.Length(); ++i) { - mList[i]->SetActive(false); - } -} - } // namespace dom } // namespace mozilla
--- a/dom/media/TextTrackCueList.h +++ b/dom/media/TextTrackCueList.h @@ -49,18 +49,16 @@ public: // from the end of the current array should be more efficient than a general // sort step after all cues are loaded. void AddCue(TextTrackCue& aCue); void RemoveCue(TextTrackCue& aCue, ErrorResult& aRv); void RemoveCueAt(uint32_t aIndex); void RemoveAll(); void GetArray(nsTArray<RefPtr<TextTrackCue> >& aCues); - void SetCuesInactive(); - private: ~TextTrackCueList(); nsCOMPtr<nsISupports> mParent; // A sorted list of TextTrackCues sorted by earliest start time. If the start // times are equal then it will be sorted by end time, earliest first. nsTArray< RefPtr<TextTrackCue> > mList;
--- a/dom/media/TextTrackList.cpp +++ b/dom/media/TextTrackList.cpp @@ -206,18 +206,10 @@ TextTrackList::GetMediaElement() } void TextTrackList::SetTextTrackManager(TextTrackManager* aTextTrackManager) { mTextTrackManager = aTextTrackManager; } -void -TextTrackList::SetCuesInactive() -{ - for (uint32_t i = 0; i < Length(); i++) { - mTextTracks[i]->SetCuesInactive(); - } -} - } // namespace dom } // namespace mozilla
--- a/dom/media/TextTrackList.h +++ b/dom/media/TextTrackList.h @@ -56,17 +56,16 @@ public: void RemoveTextTrack(TextTrack* aTrack); void DidSeek(); HTMLMediaElement* GetMediaElement(); void SetTextTrackManager(TextTrackManager* aTextTrackManager); nsresult DispatchTrackEvent(nsIDOMEvent* aEvent); void CreateAndDispatchChangeEvent(); - void SetCuesInactive(); IMPL_EVENT_HANDLER(change) IMPL_EVENT_HANDLER(addtrack) IMPL_EVENT_HANDLER(removetrack) private: ~TextTrackList();