Bug 1453345 part 5. Remove pointless JS implemenations of QI to nsIDOMEventListener. r=smaug

MozReview-Commit-ID: Db0v6GZ0deo
This commit is contained in:
Boris Zbarsky 2018-04-12 00:03:45 -04:00
parent 3914e3a54e
commit b43b5abed4
12 changed files with 17 additions and 33 deletions

View File

@ -39,8 +39,7 @@ var FullZoom = {
// nsISupports
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMEventListener,
Ci.nsIObserver,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIContentPrefObserver,
Ci.nsISupportsWeakReference,
Ci.nsISupports]),
@ -87,7 +86,7 @@ var FullZoom = {
// Event Handlers
// nsIDOMEventListener
// EventListener
handleEvent: function FullZoom_handleEvent(event) {
switch (event.type) {

View File

@ -546,7 +546,7 @@ FeedWriter.prototype = {
}
},
// nsIDomEventListener
// EventListener
handleEvent(event) {
if (event.target.ownerDocument != this._document) {
LOG("FeedWriter.handleEvent: Someone passed the feed writer as a listener to the events of another document!");
@ -981,7 +981,7 @@ FeedWriter.prototype = {
},
classID: FEEDWRITER_CID,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMEventListener, Ci.nsIObserver,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIDOMGlobalPropertyInitializer])
};

View File

@ -349,7 +349,7 @@ var BookmarkPropertiesPanel = {
acceptButton.disabled = acceptButtonDisabled;
},
// nsIDOMEventListener
// EventListener
handleEvent: function BPP_handleEvent(aEvent) {
var target = aEvent.target;
switch (aEvent.type) {
@ -373,8 +373,7 @@ var BookmarkPropertiesPanel = {
// nsISupports
QueryInterface: function BPP_QueryInterface(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener) ||
aIID.equals(Ci.nsISupports))
if (aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;

View File

@ -1009,8 +1009,7 @@ PlacesToolbar.prototype = {
"mousemove", "mouseover", "mouseout"],
QueryInterface: function PT_QueryInterface(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener) ||
aIID.equals(Ci.nsITimerCallback))
if (aIID.equals(Ci.nsITimerCallback))
return this;
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
@ -1911,13 +1910,6 @@ function PlacesMenu(aPopupShowingEvent, aPlace, aOptions) {
PlacesMenu.prototype = {
__proto__: PlacesViewBase.prototype,
QueryInterface: function PM_QueryInterface(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener))
return this;
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
},
_removeChild: function PM_removeChild(aChild) {
PlacesViewBase.prototype._removeChild.apply(this, arguments);
},

View File

@ -465,8 +465,7 @@ var gEditItemOverlay = {
},
QueryInterface:
XPCOMUtils.generateQI([Ci.nsIDOMEventListener,
Ci.nsINavBookmarkObserver]),
XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
_element(aID) {
return document.getElementById("editBMPanel_" + aID);
@ -955,7 +954,7 @@ var gEditItemOverlay = {
this._folderTree.columns.getFirstColumn());
},
// nsIDOMEventListener
// EventListener
handleEvent(aEvent) {
switch (aEvent.type) {
case "CheckboxStateChange":

View File

@ -197,8 +197,7 @@ var PlacesOrganizer = {
},
QueryInterface: function PO_QueryInterface(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener) ||
aIID.equals(Ci.nsISupports))
if (aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;

View File

@ -1295,7 +1295,7 @@ var gMainPane = {
// nsISupports
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsIDOMEventListener]),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
// nsIObserver
@ -1327,7 +1327,7 @@ var gMainPane = {
},
// nsIDOMEventListener
// EventListener
handleEvent(aEvent) {
if (aEvent.type == "unload") {

View File

@ -429,7 +429,6 @@ Object.freeze(SessionStore);
var SessionStoreInternal = {
QueryInterface: XPCOMUtils.generateQI([
Ci.nsIDOMEventListener,
Ci.nsIObserver,
Ci.nsISupportsWeakReference
]),
@ -999,7 +998,7 @@ var SessionStoreInternal = {
/* ........ Window Event Handlers .............. */
/**
* Implement nsIDOMEventListener for handling various window and tab events
* Implement EventListener for handling various window and tab events
*/
handleEvent: function ssi_handleEvent(aEvent) {
let win = aEvent.currentTarget.ownerGlobal;

View File

@ -155,8 +155,7 @@ function PreviewController(win, tab) {
}
PreviewController.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController,
Ci.nsIDOMEventListener]),
QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController]),
destroy() {
this.tab.removeEventListener("TabAttrModified", this);
@ -333,7 +332,7 @@ PreviewController.prototype = {
return true;
},
// nsIDOMEventListener
// EventListener
handleEvent(evt) {
switch (evt.type) {
case "TabAttrModified":
@ -496,7 +495,7 @@ TabWindow.prototype = {
}
},
// nsIDOMEventListener
// EventListener
handleEvent(evt) {
let tab = evt.originalTarget;
switch (evt.type) {

View File

@ -63,7 +63,6 @@ SessionStore.prototype = {
classID: Components.ID("{8c1f07d6-cba3-4226-a315-8bd43d67d032}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsISessionStore,
Ci.nsIDOMEventListener,
Ci.nsIObserver,
Ci.nsISupportsWeakReference]),

View File

@ -22,7 +22,7 @@ PromptFactory.prototype = {
classID: Components.ID("{076ac188-23c1-4390-aa08-7ef1f78ca5d9}"),
QueryInterface: XPCOMUtils.generateQI([
Ci.nsIDOMEventListener, Ci.nsIPromptFactory, Ci.nsIPromptService]),
Ci.nsIPromptFactory, Ci.nsIPromptService]),
handleEvent: function(aEvent) {
switch (aEvent.type) {

View File

@ -48,7 +48,6 @@ var observer = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIFormSubmitObserver,
Ci.nsIWebProgressListener,
Ci.nsIDOMEventListener,
Ci.nsISupportsWeakReference]),
// nsIFormSubmitObserver