Bug 1072193 - Hide video controls when mouse leaves from the left or right. r=dolske

This commit is contained in:
Ben Craddock 2014-09-24 10:58:15 -07:00
parent d877ba6b16
commit ae1064de91

View File

@ -937,8 +937,11 @@
var isMouseOver = (event.type == "mouseover");
var isMouseInControls = event.clientY > this.controlBar.getBoundingClientRect().top &&
event.clientY < this.controlBar.getBoundingClientRect().bottom;
var controlRect = this.controlBar.getBoundingClientRect();
var isMouseInControls = event.clientY > controlRect.top &&
event.clientY < controlRect.bottom &&
event.clientX > controlRect.left &&
event.clientX < controlRect.right;
// Suppress fading out the controls until the video has rendered
// its first frame. But since autoplay videos start off with no