зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
feacd37eba
Коммит
9455e67e2c
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче