зеркало из https://github.com/mozilla/gecko-dev.git
Bug 855590 - Start page does not refresh app bar Star button state. r=sfoster
This commit is contained in:
Родитель
2e30fd197b
Коммит
522ef88320
|
@ -12,7 +12,7 @@ var Appbar = {
|
|||
activeTileset: null,
|
||||
|
||||
init: function Appbar_init() {
|
||||
window.addEventListener('MozContextUIShow', this, false);
|
||||
window.addEventListener('MozAppbarShowing', this, false);
|
||||
window.addEventListener('MozPrecisePointer', this, false);
|
||||
window.addEventListener('MozImprecisePointer', this, false);
|
||||
window.addEventListener('MozContextActionsChange', this, false);
|
||||
|
@ -26,7 +26,7 @@ var Appbar = {
|
|||
|
||||
handleEvent: function Appbar_handleEvent(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case 'MozContextUIShow':
|
||||
case 'MozAppbarShowing':
|
||||
this._updatePinButton();
|
||||
this._updateStarButton();
|
||||
break;
|
||||
|
|
|
@ -34,10 +34,22 @@
|
|||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<method name="_fire">
|
||||
<parameter name="aName"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent(aName, true, false);
|
||||
this.dispatchEvent(event);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="dismiss">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this._fire("MozAppbarDismissing");
|
||||
this.removeAttribute("visible");
|
||||
]]>
|
||||
</body>
|
||||
|
@ -46,6 +58,7 @@
|
|||
<method name="show">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this._fire("MozAppbarShowing");
|
||||
this.setAttribute("visible", "true");
|
||||
]]>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче