Bug 707736 - Hide the cursor when it's motionless over a fullscreen video. r=dolske

This commit is contained in:
Jan Bambach 2012-02-13 11:14:00 -08:00
Родитель 8ea3a1426a
Коммит 25f68c2f08
2 изменённых файлов: 11 добавлений и 0 удалений

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

@ -26,6 +26,10 @@
text-decoration: none !important;
}
.controlsSpacer[hideCursor] {
cursor: none;
}
/* CSS Transitions
*
* These are overriden by the default theme; the rules here just

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

@ -619,6 +619,7 @@
// If video hasn't shown anything yet, disable the controls.
if (!this.firstFrameShown)
this.startFadeOut(this.controlBar);
this.controlsSpacer.removeAttribute("hideCursor");
}
break;
default:
@ -900,8 +901,14 @@
// when we remove the attribute.
element.clientTop;
element.removeAttribute("fadeout");
if (element.className == "controlBar")
this.controlsSpacer.removeAttribute("hideCursor");
} else {
element.setAttribute("fadeout", true);
if (element.className == "controlBar" && !this.hasError() &&
document.mozFullScreenElement == this.video)
this.controlsSpacer.setAttribute("hideCursor", true);
}
},