From 25f68c2f08a0879d09e18a0dbbca5aae2d56a23e Mon Sep 17 00:00:00 2001 From: Jan Bambach Date: Mon, 13 Feb 2012 11:14:00 -0800 Subject: [PATCH] Bug 707736 - Hide the cursor when it's motionless over a fullscreen video. r=dolske --- toolkit/content/widgets/videocontrols.css | 4 ++++ toolkit/content/widgets/videocontrols.xml | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/toolkit/content/widgets/videocontrols.css b/toolkit/content/widgets/videocontrols.css index d100682df41f..ec38d974b6b0 100644 --- a/toolkit/content/widgets/videocontrols.css +++ b/toolkit/content/widgets/videocontrols.css @@ -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 diff --git a/toolkit/content/widgets/videocontrols.xml b/toolkit/content/widgets/videocontrols.xml index 83ae6beec0b5..e5713e17f8a1 100644 --- a/toolkit/content/widgets/videocontrols.xml +++ b/toolkit/content/widgets/videocontrols.xml @@ -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); + } },