Bug 1193830 - _overPlayingIcon is not reset if there is no mouseenter/mouseleave event. r=Gijs

This commit is contained in:
Jared Wein 2015-08-13 14:34:08 -04:00
Родитель 42ca44cccd
Коммит 692c43148c
1 изменённых файлов: 14 добавлений и 17 удалений

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

@ -5868,7 +5868,19 @@
</property>
<field name="mOverCloseButton">false</field>
<field name="_overPlayingIcon">false</field>
<property name="_overPlayingIcon" readonly="true">
<getter><![CDATA[
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
let soundPlayingIcon =
document.getAnonymousElementByAttribute(this, "anonid", "soundplaying-icon");
let overlayIcon =
document.getAnonymousElementByAttribute(this, "anonid", "overlay-icon");
return soundPlayingIcon && soundPlayingIcon.mozMatchesSelector(":hover") ||
(overlayIcon && overlayIcon.mozMatchesSelector(":hover") && iconVisible);
]]></getter>
</property>
<field name="mCorrespondingMenuitem">null</field>
<!--
@ -5947,25 +5959,15 @@
<handlers>
<handler event="mouseover"><![CDATA[
let anonid = event.originalTarget.getAttribute("anonid");
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
if (anonid == "close-button")
this.mOverCloseButton = true;
else if ((anonid == "soundplaying-icon") ||
((anonid == "overlay-icon") && iconVisible))
this._overPlayingIcon = true;
this._mouseenter();
]]></handler>
<handler event="mouseout"><![CDATA[
let anonid = event.originalTarget.getAttribute("anonid");
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
if (anonid == "close-button")
this.mOverCloseButton = false;
else if ((anonid == "soundplaying-icon") ||
((anonid == "overlay-icon") && iconVisible))
this._overPlayingIcon = false;
this._mouseleave();
]]></handler>
@ -5993,13 +5995,8 @@
return;
}
let anonid = event.originalTarget.getAttribute("anonid");
let iconVisible = this.hasAttribute("soundplaying") ||
this.hasAttribute("muted");
if ((anonid == "soundplaying-icon") ||
((anonid == "overlay-icon") && iconVisible)) {
if (this._overPlayingIcon) {
this.toggleMuteAudio();
this._overPlayingIcon = false;
}
]]>
</handler>