Backed out changeset 395ba8f68dbe (bug 1109614)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 07 Mar 2016 20:43:18 +0100
changeset 337994 b7ded112cb5e9d98b36779f558228c26f1aac77f
parent 337519 bb0d852716ac54c9b4eb63acb35b7bfbafe039d9
child 337995 1559ba62821aa89c3d3aa404ff494da57016dd99
push id12405
push usercku@mozilla.com
push dateTue, 08 Mar 2016 03:35:29 +0000
bugs1109614
milestone47.0a1
backs out395ba8f68dbe6dec9fd7d5448135d94d11429e93
Backed out changeset 395ba8f68dbe (bug 1109614)
dom/html/TextTrackManager.cpp
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -195,32 +195,30 @@ TextTrackManager::DidSeek()
 
 void
 TextTrackManager::UpdateCueDisplay()
 {
   if (!mMediaElement || !mTextTracks) {
     return;
   }
 
-  // Cues must be updated regardless before checking for the presence of a video
-  // frame so that Audio tracks get updated cues and fire cuechanges.
-  nsTArray<RefPtr<TextTrackCue> > activeCues;
-  mTextTracks->UpdateAndGetShowingCues(activeCues);
-
   nsIFrame* frame = mMediaElement->GetPrimaryFrame();
   nsVideoFrame* videoFrame = do_QueryFrame(frame);
   if (!videoFrame) {
     return;
   }
 
   nsCOMPtr<nsIContent> overlay = videoFrame->GetCaptionOverlay();
   if (!overlay) {
     return;
   }
 
+  nsTArray<RefPtr<TextTrackCue> > activeCues;
+  mTextTracks->UpdateAndGetShowingCues(activeCues);
+
   if (activeCues.Length() > 0) {
     RefPtr<nsVariantCC> jsCues = new nsVariantCC();
 
     jsCues->SetAsArray(nsIDataType::VTYPE_INTERFACE,
                        &NS_GET_IID(nsIDOMEventTarget),
                        activeCues.Length(),
                        static_cast<void*>(activeCues.Elements()));