Bug 1445292 - Use Services.els in tabbox.xml r=dao

MozReview-Commit-ID: Loia4p98D6C

--HG--
extra : rebase_source : 36f9bf51a96b351b276d58ae2fa6bb13f5673572
This commit is contained in:
Vivek Dhingra 2018-03-16 10:46:53 -04:00
Родитель f4c91f3461
Коммит d45f9ba3d8
1 изменённых файлов: 4 добавлений и 12 удалений

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

@ -186,12 +186,8 @@
<setter>
<![CDATA[
if (val != this._eventNode) {
const nsIEventListenerService =
Ci.nsIEventListenerService;
let els = Cc["@mozilla.org/eventlistenerservice;1"]
.getService(nsIEventListenerService);
els.addSystemEventListener(val, "keydown", this, false);
els.removeSystemEventListener(this._eventNode, "keydown", this, false);
Services.els.addSystemEventListener(val, "keydown", this, false);
Services.els.removeSystemEventListener(this._eventNode, "keydown", this, false);
this._eventNode = val;
}
return val;
@ -205,15 +201,11 @@
case "window": this._eventNode = window; break;
case "document": this._eventNode = document; break;
}
let els = Cc["@mozilla.org/eventlistenerservice;1"]
.getService(Ci.nsIEventListenerService);
els.addSystemEventListener(this._eventNode, "keydown", this, false);
Services.els.addSystemEventListener(this._eventNode, "keydown", this, false);
</constructor>
<destructor>
let els = Cc["@mozilla.org/eventlistenerservice;1"]
.getService(Ci.nsIEventListenerService);
els.removeSystemEventListener(this._eventNode, "keydown", this, false);
Services.els.removeSystemEventListener(this._eventNode, "keydown", this, false);
</destructor>
</implementation>
</binding>