Bug 756993 - Reset fullscreen approval UI each time fullscren is entered. r=dao

This commit is contained in:
Chris Pearce 2012-05-24 13:58:59 +12:00
parent 4cfe762d78
commit e8413228ba

View File

@ -4299,6 +4299,12 @@ var FullScreen = {
// Add a listener to clean up state after the warning is hidden.
this.warningBox.addEventListener("transitionend", this);
this.warningBox.removeAttribute("hidden");
} else {
if (this.warningFadeOutTimeout) {
clearTimeout(this.warningFadeOutTimeout);
this.warningFadeOutTimeout = null;
}
this.warningBox.removeAttribute("fade-warning-out");
}
// If fullscreen mode has not yet been approved for the fullscreen
@ -4308,9 +4314,10 @@ var FullScreen = {
// showing a local file or a local data URI, and we require explicit
// approval every time.
let authUI = document.getElementById("full-screen-approval-pane");
if (isApproved)
if (isApproved) {
authUI.setAttribute("hidden", "true");
else {
this.warningBox.removeAttribute("obscure-browser");
} else {
// Partially obscure the <browser> element underneath the approval UI.
this.warningBox.setAttribute("obscure-browser", "true");
authUI.removeAttribute("hidden");