Bug 1491066 - Allow TextTrackManager to pass cue without videocontrols r=alwu

With UA Widget, the videocontrols container is created lazily.
It won't be a problem for WebVTT.processCues() in vtt.jsm, so
TextTrackManager::UpdateCueDisplay() should not early return there, but pass
nullptr to it.

Differential Revision: https://phabricator.services.mozilla.com/D3667

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Timothy Guan-tin Chien 2018-09-13 22:38:43 +00:00
Родитель feacd37eba
Коммит 9455e67e2c
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -276,7 +276,7 @@ TextTrackManager::UpdateCueDisplay()
nsCOMPtr<nsIContent> overlay = videoFrame->GetCaptionOverlay();
nsCOMPtr<nsIContent> controls = videoFrame->GetVideoControls();
if (!overlay || !controls) {
if (!overlay) {
return;
}

Просмотреть файл

@ -1021,6 +1021,10 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
controlBar = controls.parentNode.getElementById("controlBar");
}
controlBarShown = controlBar ? !!controlBar.clientHeight : false;
} else {
// There is no controls element. This only happen to UA Widget because
// it is created lazily.
controlBarShown = false;
}
// Determine if we need to compute the display states of the cues. This could