Merge inbound to mozilla-central. a=merge

This commit is contained in:
Andreea Pavel 2018-04-28 20:30:18 +03:00
Родитель 1915a41571 30938bcddd
Коммит 443c91d4b4
583 изменённых файлов: 2221 добавлений и 2481 удалений

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

@ -502,7 +502,7 @@ this.ContentControl.prototype = {
this._autoMove = 0;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference,
Ci.nsIMessageListener
])
};

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

@ -556,10 +556,7 @@ this.EventManager.prototype = {
this.present(Presentation.tabStateChanged(docAcc, "newdoc"));
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference,
Ci.nsISupports,
Ci.nsIObserver])
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference, Ci.nsIObserver])
};
const AccessibilityEventObserver = {

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

@ -67,7 +67,7 @@ BaseTraversalRule.prototype = {
return matchResult;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAccessibleTraversalRule])
QueryInterface: ChromeUtils.generateQI([Ci.nsIAccessibleTraversalRule])
};
var gSimpleTraversalRoles =

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

@ -1057,6 +1057,6 @@ PrefCache.prototype = {
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference])
};

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

@ -34,7 +34,7 @@ var HeadersTraversalRule =
return FILTER_MATCH;
},
QueryInterface: XPCOMUtils.generateQI([nsIAccessibleTraversalRule])
QueryInterface: ChromeUtils.generateQI([nsIAccessibleTraversalRule])
};
/**
@ -62,7 +62,7 @@ var ObjectTraversalRule =
return rv;
},
QueryInterface: XPCOMUtils.generateQI([nsIAccessibleTraversalRule])
QueryInterface: ChromeUtils.generateQI([nsIAccessibleTraversalRule])
};
// //////////////////////////////////////////////////////////////////////////////

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

@ -301,12 +301,7 @@ appUpdater.prototype =
/**
* See nsISupports.idl
*/
QueryInterface(aIID) {
if (!aIID.equals(Ci.nsIUpdateCheckListener) &&
!aIID.equals(Ci.nsISupports))
throw Cr.NS_ERROR_NO_INTERFACE;
return this;
}
QueryInterface: ChromeUtils.generateQI(["nsIUpdateCheckListener"]),
},
/**
@ -427,11 +422,5 @@ appUpdater.prototype =
/**
* See nsISupports.idl
*/
QueryInterface(aIID) {
if (!aIID.equals(Ci.nsIProgressEventSink) &&
!aIID.equals(Ci.nsIRequestObserver) &&
!aIID.equals(Ci.nsISupports))
throw Cr.NS_ERROR_NO_INTERFACE;
return this;
}
QueryInterface: ChromeUtils.generateQI(["nsIProgressEventSink", "nsIRequestObserver"]),
};

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

@ -118,7 +118,7 @@ var gDataNotificationInfoBar = {
}
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
]),

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

@ -412,8 +412,8 @@ var FeedHandler = {
// nsISupports
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
init() {

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

@ -39,10 +39,7 @@ var FullZoom = {
// nsISupports
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIContentPrefObserver,
Ci.nsISupportsWeakReference,
Ci.nsISupports]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsIContentPrefObserver, Ci.nsISupportsWeakReference]),
// Initialization & Destruction

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

@ -907,7 +907,7 @@ var PlacesMenuDNDHandler = {
this._loadTimer.initWithCallback(() => {
this._loadTimer = null;
popup.setAttribute("autoopened", "true");
popup.showPopup(popup);
popup.openPopup();
}, this._springLoadDelayMs, Ci.nsITimer.TYPE_ONE_SHOT);
event.preventDefault();
event.stopPropagation();
@ -1749,7 +1749,7 @@ var BookmarkingUI = {
this._uninitView();
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsINavBookmarkObserver
])
};

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

@ -690,7 +690,7 @@ var gSync = {
}
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference
])

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

@ -4600,15 +4600,10 @@ var XULBrowserWindow = {
isBusy: false,
busyUI: false,
QueryInterface(aIID) {
if (aIID.equals(Ci.nsIWebProgressListener) ||
aIID.equals(Ci.nsIWebProgressListener2) ||
aIID.equals(Ci.nsISupportsWeakReference) ||
aIID.equals(Ci.nsIXULBrowserWindow) ||
aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;
},
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
"nsIWebProgressListener2",
"nsISupportsWeakReference",
"nsIXULBrowserWindow"]),
get stopCommand() {
delete this.stopCommand;
@ -5384,7 +5379,7 @@ var TabsProgressListener = {
function nsBrowserAccess() { }
nsBrowserAccess.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow, Ci.nsISupports]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserDOMWindow]),
_openURIInNewTab(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
aIsExternal, aForceNotRemote = false,
@ -7740,8 +7735,8 @@ var RestoreLastSessionObserver = {
goSetCommandEnabled("Browser:RestoreLastSession", false);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference])
};
function restoreLastSession() {

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

@ -1524,8 +1524,8 @@ let OfflineApps = {
}
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
};
addEventListener("MozApplicationManifest", OfflineApps, false);

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

@ -859,10 +859,7 @@ var RefreshBlocker = {
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener2,
Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference,
Ci.nsISupports]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener2, Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
};
RefreshBlocker.init();

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

@ -4574,16 +4574,11 @@ class TabProgressListener {
return this._callProgressListeners("onRefreshAttempted",
[aWebProgress, aURI, aDelay, aSameURI]);
}
QueryInterface(aIID) {
if (aIID.equals(Ci.nsIWebProgressListener) ||
aIID.equals(Ci.nsIWebProgressListener2) ||
aIID.equals(Ci.nsISupportsWeakReference) ||
aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;
}
}
TabProgressListener.prototype.QueryInterface = ChromeUtils.generateQI(
["nsIWebProgressListener",
"nsIWebProgressListener2",
"nsISupportsWeakReference"]);
var StatusPanel = {
get panel() {

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

@ -119,7 +119,7 @@ function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrows
stopContent(contentStopFromProgressListener, chan.originalURI.spec);
}
},
QueryInterface: XPCOMUtils.generateQI(["nsISupportsWeakReference"])
QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference"])
};
wp.addProgressListener(progressListener, wp.NOTIFY_STATE_WINDOW);

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

@ -32,8 +32,8 @@
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
};
frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)

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

@ -22,7 +22,7 @@ var fakePromptServiceFactory = {
};
var promptService = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService]),
alert() {
didFail = true;
}

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

@ -46,7 +46,7 @@ AboutModule.prototype = {
return null;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule])
QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule])
};
var AboutModuleFactory = {
@ -60,7 +60,7 @@ var AboutModuleFactory = {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
};
add_task(async function init() {

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

@ -342,6 +342,5 @@ WindowListener.prototype = {
domwindow.addEventListener("load", onLoad, true);
},
onCloseWindow(aXULWindow) {},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener,
Ci.nsISupports]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowMediatorListener]),
};

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

@ -29,7 +29,7 @@ add_task(async function() {
let setHomepagePromise = new Promise(function(resolve) {
let observer = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
observe(subject, topic, data) {
is(topic, "nsPref:changed", "observed correct topic");
is(data, HOMEPAGE_PREF, "observed correct data");

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

@ -547,7 +547,7 @@ function promiseOnBookmarkItemAdded(aExpectedURI) {
onItemChanged() {},
onItemVisited() {},
onItemMoved() {},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsINavBookmarkObserver,
])
};

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

@ -16,14 +16,12 @@ let gCUITestUtils = new CustomizableUITestUtils(window);
const EXPECTED_APPMENU_OPEN_REFLOWS = [
{
stack: [
"openPopup@chrome://global/content/bindings/popup.xml",
"openPopup/this._openPopupPromise<@resource:///modules/PanelMultiView.jsm",
],
},
{
stack: [
"get_alignmentPosition@chrome://global/content/bindings/popup.xml",
"adjustArrowPosition@chrome://global/content/bindings/popup.xml",
"onxblpopuppositioned@chrome://global/content/bindings/popup.xml",
],
@ -31,21 +29,13 @@ const EXPECTED_APPMENU_OPEN_REFLOWS = [
maxCount: 3, // This number should only ever go down - never up.
},
{
stack: [
"get_alignmentPosition@chrome://global/content/bindings/popup.xml",
"_calculateMaxHeight@resource:///modules/PanelMultiView.jsm",
"handleEvent@resource:///modules/PanelMultiView.jsm",
],
},
{
stack: [
"_calculateMaxHeight@resource:///modules/PanelMultiView.jsm",
"handleEvent@resource:///modules/PanelMultiView.jsm",
],
maxCount: 6, // This number should only ever go down - never up.
maxCount: 7, // This number should only ever go down - never up.
},
];

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

@ -23,7 +23,6 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
"enableOneOffSearches@chrome://browser/content/urlbarBindings.xml",
"_enableOrDisableOneOffSearches@chrome://browser/content/urlbarBindings.xml",
"urlbar_XBL_Constructor/<@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/popup.xml",
"_openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/autocomplete.xml",
@ -74,7 +73,6 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
// Bug 1359989
{
stack: [
"openPopup@chrome://global/content/bindings/popup.xml",
"_openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/autocomplete.xml",

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

@ -23,7 +23,6 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
"enableOneOffSearches@chrome://browser/content/urlbarBindings.xml",
"_enableOrDisableOneOffSearches@chrome://browser/content/urlbarBindings.xml",
"urlbar_XBL_Constructor/<@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/popup.xml",
"_openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/autocomplete.xml",
@ -74,7 +73,6 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
// Bug 1359989
{
stack: [
"openPopup@chrome://global/content/bindings/popup.xml",
"_openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/autocomplete.xml",
@ -116,7 +114,6 @@ const EXPECTED_REFLOWS_SECOND_OPEN = [
// Bug 1359989
{
stack: [
"openPopup@chrome://global/content/bindings/popup.xml",
"_openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openAutocompletePopup@chrome://browser/content/urlbarBindings.xml",
"openPopup@chrome://global/content/bindings/autocomplete.xml",

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

@ -54,8 +54,8 @@ async function recordReflows(testPromise, win = window) {
// driver ticking. These are fine.
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI([Ci.nsIReflowObserver,
Ci.nsISupportsWeakReference])
};
let docShell = win.QueryInterface(Ci.nsIInterfaceRequestor)

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

@ -15,9 +15,9 @@ SimpleTest.requestFlakyTimeout("Need to simulate blocklist calls actually taking
var BlocklistProxy = {
_uuid: null,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIBlocklistService,
Ci.nsITimerCallback]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsIBlocklistService,
Ci.nsITimerCallback]),
init() {
if (!this._uuid) {

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

@ -40,7 +40,7 @@ function startNewTabTestCase(aTestNumber) {
aContextMenu.hidePopup();
}, {once: true});
menupopup.showPopup();
menupopup.openPopup();
});
}

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

@ -36,7 +36,7 @@ function startNewTabTestCase(aTestNumber) {
aContextMenu.hidePopup();
}, {once: true});
menupopup.showPopup();
menupopup.openPopup();
});
}

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

@ -237,7 +237,7 @@ async function openContentContextMenu(selector, openSubmenuId = null) {
if (openSubmenuId) {
const menuPopup = document.getElementById(openSubmenuId).menupopup;
const menuPopupPromise = BrowserTestUtils.waitForEvent(menuPopup, "popupshown");
menuPopup.showPopup();
menuPopup.openPopup();
await menuPopupPromise;
}
}

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

@ -204,7 +204,7 @@ function checkAutocompleteResults(aExpected, aCallback) {
setSelectedIndex() {},
get searchCount() { return this.searches.length; },
getSearchAt(aIndex) { return this.searches[aIndex]; },
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIAutoCompleteInput,
Ci.nsIAutoCompletePopup,
])

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

@ -32,7 +32,7 @@ const clientAuthDialogs = {
return true;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIClientAuthDialogs]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIClientAuthDialogs]),
};
function startServer(cert) {

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

@ -62,7 +62,7 @@ function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrows
stopContent(contentStopFromProgressListener, chan.originalURI.spec);
}
},
QueryInterface: XPCOMUtils.generateQI(["nsISupportsWeakReference"])
QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference"])
};
wp.addProgressListener(progressListener, wp.NOTIFY_STATE_WINDOW);

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

@ -47,13 +47,7 @@ var panelProgressListener = {
onSecurityChange(aWebProgress, aRequest, aState) {
},
QueryInterface(aIID) {
if (aIID.equals(Ci.nsIWebProgressListener) ||
aIID.equals(Ci.nsISupportsWeakReference) ||
aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;
}
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener", "nsISupportsWeakReference"]),
};
var gLoadFired = false;

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

@ -67,8 +67,7 @@ nsAboutCapabilities.prototype = {
contractID: "@mozilla.org/aboutcapabilities;1",
classID: Components.ID("{4c2b1f46-e637-4a91-8108-8a9fb7aab91d}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
Ci.nsIDOMGlobalPropertyInitializer])
QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer])
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsAboutCapabilities]);

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

@ -854,7 +854,7 @@ var PanelMultiView = class extends AssociatedToNode {
this._viewContainer.style.height = prevPanelView.knownHeight + "px";
this._viewContainer.style.width = prevPanelView.knownWidth + "px";
// Lock the dimensions of the window that hosts the popup panel.
let rect = this._panel.popupBoxObject.getOuterScreenRect();
let rect = this._panel.getOuterScreenRect();
this._panel.setAttribute("width", rect.width);
this._panel.setAttribute("height", rect.height);

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

@ -75,8 +75,8 @@ const kMaxHistoryResultsForLimitedView = 42;
const kPrefBranch = Services.prefs.getBranch("browser.download.");
var PrefObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
getPref(name) {
try {
switch (typeof this.prefs[name]) {

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

@ -69,9 +69,9 @@ function EnterprisePoliciesManager() {
EnterprisePoliciesManager.prototype = {
// for XPCOM
classID: Components.ID("{ea4e1414-779b-458b-9d1f-d18e8efbc145}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference,
Ci.nsIEnterprisePolicies]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference,
Ci.nsIEnterprisePolicies]),
// redefine the default factory for XPCOMUtils
_xpcom_factory: EnterprisePoliciesFactory,

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

@ -51,7 +51,7 @@ function EnterprisePoliciesManagerContent() {
EnterprisePoliciesManagerContent.prototype = {
// for XPCOM
classID: Components.ID("{dc6358f8-d167-4566-bf5b-4350b5e6a7a2}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIEnterprisePolicies]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIEnterprisePolicies]),
// redefine the default factory for XPCOMUtils
_xpcom_factory: EnterprisePoliciesFactory,

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

@ -79,8 +79,8 @@ function WebsiteFilter(blocklist, exceptionlist) {
}
WebsiteFilter.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
observe(subject, topic, data) {
let channel, isDocument = false;

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

@ -160,11 +160,11 @@ add_task(async function test_AddSearchProvider() {
alert() {
this.promptCount++;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt]),
};
let windowWatcher = {
getNewPrompter: () => mockPrompter,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowWatcher]),
};
let origWindowWatcher = Services.ww;
Services.ww = windowWatcher;

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

@ -1169,7 +1169,7 @@ this.tabs = class extends ExtensionAPI {
resolve(retval == 0 ? "not_saved" : "not_replaced");
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener]),
};
activeTab.linkedBrowser.print(activeTab.linkedBrowser.outerWindowID, printSettings, printProgressListener);

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

@ -326,15 +326,10 @@ FeedConverter.prototype = {
/**
* See nsISupports.idl
*/
QueryInterface(iid) {
if (iid.equals(Ci.nsIFeedResultListener) ||
iid.equals(Ci.nsIStreamConverter) ||
iid.equals(Ci.nsIStreamListener) ||
iid.equals(Ci.nsIRequestObserver) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
},
QueryInterface: ChromeUtils.generateQI(["nsIFeedResultListener",
"nsIStreamConverter",
"nsIStreamListener",
"nsIRequestObserver"]),
};
/**
@ -456,13 +451,8 @@ FeedResultService.prototype = {
return this.QueryInterface(iid);
},
QueryInterface(iid) {
if (iid.equals(Ci.nsIFeedResultService) ||
iid.equals(Ci.nsIFactory) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
QueryInterface: ChromeUtils.generateQI(["nsIFeedResultService",
"nsIFactory"]),
};

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

@ -981,8 +981,8 @@ FeedWriter.prototype = {
},
classID: FEEDWRITER_CID,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsIDOMGlobalPropertyInitializer])
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsIDOMGlobalPropertyInitializer])
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FeedWriter]);

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

@ -48,13 +48,8 @@ WebContentConverter.prototype = {
wccr.loadPreferredHandler(request);
},
QueryInterface(iid) {
if (iid.equals(Ci.nsIStreamConverter) ||
iid.equals(Ci.nsIStreamListener) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
}
QueryInterface: ChromeUtils.generateQI(["nsIStreamConverter",
"nsIStreamListener"]),
};
let WebContentConverterFactory = {
@ -64,12 +59,7 @@ let WebContentConverterFactory = {
return new WebContentConverter().QueryInterface(iid);
},
QueryInterface(iid) {
if (iid.equals(Ci.nsIFactory) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
}
QueryInterface: ChromeUtils.generateQI(["nsIFactory"]),
};
function ServiceInfo(contentType, uri, name) {
@ -121,12 +111,7 @@ ServiceInfo.prototype = {
return this._uri.replace(/%s/gi, encodeURIComponent(uri));
},
QueryInterface(iid) {
if (iid.equals(Ci.nsIWebContentHandlerInfo) ||
iid.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
}
QueryInterface: ChromeUtils.generateQI(["nsIWebContentHandlerInfo"]),
};
const Utils = {
@ -865,7 +850,7 @@ WebContentConverterRegistrar.prototype = {
/**
* See nsISupports
*/
QueryInterface: XPCOMUtils.generateQI(
QueryInterface: ChromeUtils.generateQI(
[Ci.nsIWebContentConverterService,
Ci.nsIWebContentHandlerRegistrar,
Ci.nsIObserver,
@ -1044,7 +1029,7 @@ WebContentConverterRegistrarContent.prototype = {
/**
* See nsISupports
*/
QueryInterface: XPCOMUtils.generateQI(
QueryInterface: ChromeUtils.generateQI(
[Ci.nsIWebContentHandlerRegistrar,
Ci.nsIWebContentConverterService,
Ci.nsIFactory])

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

@ -679,7 +679,7 @@ const AutoMigrate = {
chromeWindow.openTrustedLinkIn(url, "tab");
},
QueryInterface: XPCOMUtils.generateQI(
QueryInterface: ChromeUtils.generateQI(
[Ci.nsIObserver, Ci.nsINavBookmarkObserver, Ci.nsISupportsWeakReference]
),

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

@ -85,7 +85,7 @@ function getMigrationBundle() {
* 6. For startup-only migrators, override |startupOnlyMigrator|.
*/
var MigratorPrototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
/**
* OVERRIDE IF AND ONLY IF the source supports multiple profiles.

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

@ -12,7 +12,7 @@ function ProfileMigrator() {
ProfileMigrator.prototype = {
migrate: MigrationUtils.startupMigration.bind(MigrationUtils),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIProfileMigrator]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIProfileMigrator]),
classDescription: "Profile Migrator",
contractID: "@mozilla.org/toolkit/profile-migrator;1",
classID: Components.ID("6F8BB968-C14F-4D6F-9733-6C6737B35DCE"),

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

@ -92,7 +92,7 @@ AboutNewTabService.prototype = {
willNotifyUser: false,
classID: Components.ID("{dfcd2adc-7867-4d3a-ba70-17501f208142}"),
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIAboutNewTabService,
Ci.nsIObserver
]),

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

@ -286,10 +286,10 @@ nsBrowserContentHandler.prototype = {
},
/* nsISupports */
QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler,
Ci.nsIBrowserHandler,
Ci.nsIContentHandler,
Ci.nsICommandLineValidator]),
QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLineHandler,
Ci.nsIBrowserHandler,
Ci.nsIContentHandler,
Ci.nsICommandLineValidator]),
/* nsICommandLineHandler */
handle: function bch_handle(cmdLine) {
@ -697,13 +697,7 @@ nsDefaultCommandLineHandler.prototype = {
classID: Components.ID("{47cd0651-b1be-4a0f-b5c4-10e5a573ef71}"),
/* nsISupports */
QueryInterface: function dch_QI(iid) {
if (!iid.equals(Ci.nsISupports) &&
!iid.equals(Ci.nsICommandLineHandler))
throw Cr.NS_ERROR_NO_INTERFACE;
return this;
},
QueryInterface: ChromeUtils.generateQI(["nsICommandLineHandler"]),
_haveProfile: false,

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

@ -2729,8 +2729,8 @@ BrowserGlue.prototype = {
// for XPCOM
classID: Components.ID("{eab9012e-5f74-4cbc-b2b5-a590235513cc}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
_xpcom_factory: XPCOMUtils.generateSingletonFactory(BrowserGlue),
};
@ -2789,7 +2789,7 @@ function ContentPermissionPrompt() {}
ContentPermissionPrompt.prototype = {
classID: Components.ID("{d8903bf6-68d5-4e97-bcd1-e4d3012f721a}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionPrompt]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionPrompt]),
/**
* This implementation of nsIContentPermissionPrompt.prompt ensures
@ -3042,7 +3042,7 @@ var JawsScreenReaderVersionCheck = {
Services.obs.addObserver(this, "a11y-init-or-shutdown", true);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
observe(subject, topic, data) {
if (topic == "a11y-init-or-shutdown" && data == "1") {

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

@ -40,7 +40,7 @@ var paymentDialogWrapper = {
mm: null,
request: null,
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
]),

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

@ -37,7 +37,7 @@ function PaymentUIService() {
PaymentUIService.prototype = {
classID: Components.ID("{01f8bd55-9017-438b-85ec-7c15d2b35cdc}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
DIALOG_URL: "chrome://payments/content/paymentDialogWrapper.xhtml",
REQUEST_ID_PREFIX: "paymentRequest-",

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

@ -372,12 +372,7 @@ var BookmarkPropertiesPanel = {
},
// nsISupports
QueryInterface: function BPP_QueryInterface(aIID) {
if (aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;
},
QueryInterface: ChromeUtils.generateQI([]),
_element: function BPP__element(aID) {
return document.getElementById("editBMPanel_" + aID);

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

@ -19,6 +19,9 @@ function PlacesViewBase(aPlace, aOptions = {}) {
this._viewElt.controllers.appendController(this._controller);
}
PlacesViewBase.interfaces = [Ci.nsINavHistoryResultObserver,
Ci.nsISupportsWeakReference];
PlacesViewBase.prototype = {
// The xul element that holds the entire view.
_viewElt: null,
@ -41,9 +44,8 @@ PlacesViewBase.prototype = {
// the native mac menu).
_nativeView: false,
QueryInterface: XPCOMUtils.generateQI(
[Ci.nsINavHistoryResultObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI(
PlacesViewBase.interfaces),
_place: "",
get place() {
@ -1008,12 +1010,8 @@ PlacesToolbar.prototype = {
_cbEvents: ["dragstart", "dragover", "dragexit", "dragend", "drop",
"mousemove", "mouseover", "mouseout"],
QueryInterface: function PT_QueryInterface(aIID) {
if (aIID.equals(Ci.nsITimerCallback))
return this;
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
},
QueryInterface: ChromeUtils.generateQI(["nsITimerCallback",
...PlacesViewBase.interfaces]),
uninit: function PT_uninit() {
this._removeEventListeners(this._viewElt, this._cbEvents, false);
@ -1975,10 +1973,6 @@ function PlacesPanelMenuView(aPlace, aViewId, aRootId, aOptions) {
PlacesPanelMenuView.prototype = {
__proto__: PlacesViewBase.prototype,
QueryInterface: function PAMV_QueryInterface(aIID) {
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
},
uninit: function PAMV_uninit() {
PlacesViewBase.prototype.uninit.apply(this, arguments);
},

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

@ -88,7 +88,7 @@ PlacesController.prototype = {
// actually organising the trees.
disableUserActions: false,
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIClipboardOwner
]),

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

@ -465,7 +465,7 @@ var gEditItemOverlay = {
},
QueryInterface:
XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
_element(aID) {
return document.getElementById("editBMPanel_" + aID);

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

@ -216,7 +216,7 @@
if (aTimer == this._folder.openTimer) {
// Timer to open a submenu that's being dragged over.
this._folder.elt.lastChild.setAttribute("autoopened", "true");
this._folder.elt.lastChild.showPopup(this._folder.elt);
this._folder.elt.lastChild.openPopup();
this._folder.openTimer = null;
} else if (aTimer == this._folder.closeTimer) {
// Timer to close a submenu that's been dragged off of.

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

@ -196,12 +196,7 @@ var PlacesOrganizer = {
ContentArea.focus();
},
QueryInterface: function PO_QueryInterface(aIID) {
if (aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_NOINTERFACE;
},
QueryInterface: ChromeUtils.generateQI([]),
handleEvent: function PO_handleEvent(aEvent) {
if (aEvent.type != "AppCommand")

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

@ -16,7 +16,7 @@ add_task(async function() {
PlacesUtils.bookmarks.removeObserver(this);
resolve({ property, value });
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
});
});
}

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

@ -127,7 +127,7 @@ add_task(async function test() {
* nodes positions in the affected views.
*/
var bookmarksObserver = {
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsINavBookmarkObserver,
Ci.nsIAnnotationObserver
]),
@ -275,7 +275,7 @@ function getNodeForToolbarItem(aItemId, aValidator) {
// different position. Search only folders
if (PlacesUtils.nodeIsFolder(child._placesNode)) {
var popup = child.lastChild;
popup.showPopup(popup);
popup.openPopup();
var foundNode = findNode(popup);
popup.hidePopup();
if (foundNode[0] != null)

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

@ -76,7 +76,7 @@ function rebuildSmartBookmarks() {
}
do_throw("Got console message: " + aMsg.message);
},
QueryInterface: XPCOMUtils.generateQI([ Ci.nsIConsoleListener ]),
QueryInterface: ChromeUtils.generateQI([ Ci.nsIConsoleListener ]),
};
Services.console.reset();
Services.console.registerListener(consoleListener);

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

@ -1319,7 +1319,7 @@ var gMainPane = {
// nsISupports
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
// nsIObserver
@ -3022,14 +3022,7 @@ FeedHandlerInfo.prototype = {
_inner: [],
_removed: [],
QueryInterface(aIID) {
if (aIID.equals(Ci.nsIMutableArray) ||
aIID.equals(Ci.nsIArray) ||
aIID.equals(Ci.nsISupports))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
},
QueryInterface: ChromeUtils.generateQI(["nsIMutableArray", "nsIArray"]),
get length() {
return this._inner.length;

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

@ -18,7 +18,7 @@ const mockUpdateManager = {
_originalFactory: null,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateManager]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIUpdateManager]),
createInstance(outer, iiD) {
if (outer) {

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

@ -70,7 +70,7 @@ Tree.prototype = {
getCellProperties(row, column) {
return "";
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView])
QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView])
};
function Lang(aCode, label) {

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

@ -88,7 +88,7 @@ add_task(async function test_toggleTrackingProtection() {
Services.prefs.getBranch("privacy.trackingprotection.pbmode.");
let waitForPrefChanged = () => new Promise(resolve => {
let prefObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
observe() {
prefBranch.removeObserver("enabled", prefObserver);
resolve();

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

@ -93,8 +93,8 @@ let promiseStateChangeFrameScript = "data:," + encodeURIComponent(`(${
const global = this;
const LISTENER = Symbol("listener");
let listener = {
QueryInterface: XPCOMUtils.generateQI(["nsISupportsWeakReference",
"nsIWebProgressListener"]),
QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference",
"nsIWebProgressListener"]),
onStateChange: function onStateChange(webProgress, req, flags, status) {
// Only care about top-level document starts

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

@ -371,7 +371,7 @@ function HistoryListener(docShell, callback) {
this.callback = callback;
}
HistoryListener.prototype = {
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsISHistoryListener,
Ci.nsISupportsWeakReference
]),
@ -451,7 +451,7 @@ function ProgressListener(docShell, callbacks) {
}
ProgressListener.prototype = {
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference
]),

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

@ -438,7 +438,7 @@ var SessionStore = {
Object.freeze(SessionStore);
var SessionStoreInternal = {
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference
]),

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

@ -142,8 +142,8 @@ var StateChangeNotifier = {
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
};
/**
@ -447,7 +447,7 @@ var SessionHistoryListener = {
// Ignore, the method is implemented so that XPConnect doesn't throw!
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsISHistoryListener,
Ci.nsISupportsWeakReference
])
@ -699,8 +699,8 @@ var PrivacyListener = {
MessageQueue.push("isPrivate", () => enabled || null);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrivacyTransitionObserver,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI([Ci.nsIPrivacyTransitionObserver,
Ci.nsISupportsWeakReference])
};
/**

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

@ -356,9 +356,9 @@ SessionStartup.prototype = {
},
/* ........ QueryInterface .............. */
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference,
Ci.nsISessionStartup]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference,
Ci.nsISessionStartup]),
classID: Components.ID("{ec7a6c20-e081-11da-8ad9-0800200c9a66}")
};

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

@ -111,7 +111,7 @@ function checkAutocompleteResults(aExpected, aCallback) {
getSearchAt(aIndex) {
return this.searches[aIndex];
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIAutoCompleteInput,
Ci.nsIAutoCompletePopup,
])

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

@ -48,7 +48,7 @@ function promiseNewLocationAndHistoryEntryReplaced(browser, snippet) {
resolve();
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsISHistoryListener,
Ci.nsISupportsWeakReference
])
@ -78,7 +78,7 @@ function promiseHistoryEntryReplacedNonRemote(browser) {
executeSoon(resolve);
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsISHistoryListener,
Ci.nsISupportsWeakReference
])

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

@ -25,7 +25,7 @@ var idleService = {
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIIdleService]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIIdleService]),
idleTime: 19999,
addIdleObserver(observer, time) {

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

@ -12,7 +12,7 @@ const TESTURL = "about:testpageforsessionrestore#foo";
let TestAboutPage = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
getURIFlags(aURI) {
// No CAN_ or MUST_LOAD_IN_CHILD means this loads in the parent:
return Ci.nsIAboutModule.ALLOW_SCRIPT |

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

@ -46,7 +46,7 @@ var historyListener = {
sendAsyncMessage("ss-test:OnHistoryReplaceEntry");
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsISHistoryListener,
Ci.nsISupportsWeakReference
])

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

@ -39,8 +39,8 @@ function loadContentWindow(webNavigation, uri) {
resolve(contentWindow);
}, { once: true });
},
QueryInterface: XPCOMUtils.generateQI(["nsIWebProgressListener",
"nsISupportsWeakReference"])
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
"nsISupportsWeakReference"])
};
progressListeners.set(progressListener, progressListener);
webProgress.addProgressListener(progressListener,

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

@ -26,7 +26,7 @@ function MockContentPermissionType(type) {
}
MockContentPermissionType.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionType]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionType]),
// We expose the wrappedJSObject so that we can be sure
// in some of our tests that we're passing the right
// nsIContentPermissionType around.
@ -49,7 +49,7 @@ function MockContentPermissionRequest(typesArray) {
}
MockContentPermissionRequest.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionRequest]),
// We expose the wrappedJSObject so that we can be sure
// in some of our tests that we're passing the right
// nsIContentPermissionRequest around.
@ -100,7 +100,7 @@ add_task(async function test_multiple_types() {
*/
add_task(async function test_not_permission_type() {
let mockRequest = new MockContentPermissionRequest([
{ QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]) },
{ QueryInterface: ChromeUtils.generateQI([]) },
]);
Assert.throws(() => { ContentPermissionPrompt.prompt(mockRequest); },

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

@ -57,7 +57,7 @@ function startupRecorder() {
startupRecorder.prototype = {
classID: Components.ID("{11c095b2-e42e-4bdf-9dd0-aed87595f6a4}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
record(name) {
if (!Services.prefs.getBoolPref("browser.startup.record", false))

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

@ -105,8 +105,8 @@ TranslationContentHandler.prototype = {
});
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference]),
receiveMessage(msg) {
switch (msg.name) {

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

@ -243,7 +243,7 @@ var tests = [
let buttons = document.getElementById("UITourTooltipButtons");
popup.addEventListener("popupshown", function() {
is(popup.popupBoxObject.anchorNode, document.getElementById("urlbar"), "Popup should be anchored to the urlbar");
is(popup.anchorNode, document.getElementById("urlbar"), "Popup should be anchored to the urlbar");
is(title.textContent, "test title", "Popup should have correct title");
is(desc.textContent, "test text", "Popup should have correct description text");
is(icon.src, "", "Popup should have no icon");
@ -271,7 +271,7 @@ var tests = [
await showInfoPromise("urlbar", "urlbar title", "urlbar text");
is(popup.popupBoxObject.anchorNode, document.getElementById("urlbar"), "Popup should be anchored to the urlbar");
is(popup.anchorNode, document.getElementById("urlbar"), "Popup should be anchored to the urlbar");
is(title.textContent, "urlbar title", "Popup should have correct title");
is(desc.textContent, "urlbar text", "Popup should have correct description text");
is(icon.src, "", "Popup should have no icon");
@ -284,7 +284,7 @@ var tests = [
await showInfoPromise("search", "search title", "search text");
is(popup.popupBoxObject.anchorNode, document.getElementById("searchbar"), "Popup should be anchored to the searchbar");
is(popup.anchorNode, document.getElementById("searchbar"), "Popup should be anchored to the searchbar");
is(title.textContent, "search title", "Popup should have correct title");
is(desc.textContent, "search text", "Popup should have correct description text");

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

@ -10,7 +10,7 @@ Services.scriptloader
function MockShellService() {}
MockShellService.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIShellService]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIShellService]),
isDefaultBrowser(aStartupCheck, aForAllTypes) { return false; },
setDefaultBrowser(aClaimAllTypes, aForAllUsers) {
setDefaultBrowserCalled = true;

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

@ -36,7 +36,7 @@ var tests = [
await showHighlightPromise("accountStatus");
let highlight = document.getElementById("UITourHighlightContainer");
let expectedTarget = "appMenu-fxa-avatar";
is(highlight.popupBoxObject.anchorNode.id, expectedTarget, "Anchored on avatar");
is(highlight.anchorNode.id, expectedTarget, "Anchored on avatar");
is(highlight.getAttribute("targetName"), "accountStatus", "Correct highlight target");
}),
];

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

@ -72,7 +72,7 @@ async function checkToggleTarget(targetID) {
await showInfoPromise(targetID, "This is " + targetID,
"My arrow should be on the side");
is(popup.popupBoxObject.alignmentPosition, "end_before",
is(popup.alignmentPosition, "end_before",
"Check " + targetID + " position");
let hideMenuPromise =

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

@ -118,7 +118,7 @@ function elementHiddenPromise(element, msg) {
}
function waitForPopupAtAnchor(popup, anchorNode, nextTestFn, msg) {
waitForCondition(() => is_visible(popup) && popup.popupBoxObject.anchorNode == anchorNode,
waitForCondition(() => is_visible(popup) && popup.anchorNode == anchorNode,
() => {
ok(true, msg);
is_element_visible(popup, "Popup should be visible");

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

@ -22,7 +22,7 @@ const PLACES_LINKS_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for p
class Observer {
constructor(dispatch, observerInterface) {
this.dispatch = dispatch;
this.QueryInterface = XPCOMUtils.generateQI([observerInterface, Ci.nsISupportsWeakReference]);
this.QueryInterface = ChromeUtils.generateQI([observerInterface, Ci.nsISupportsWeakReference]);
}
}

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

@ -141,7 +141,7 @@ let searchingGoogle = false;
* a progress listener.
*/
var webProgressListener = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
onLocationChange(aWebProgress, aRequest, aLocation, aFlags)
{
if (aWebProgress.DOMWindow && (aWebProgress.DOMWindow != content)) {

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

@ -81,7 +81,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
classID: Components.ID("4f9f1e4c-7f2c-439e-9c9e-566b68bc187d"),
contractID: "@mozilla.org/autocomplete/search;1?name=autofill-profiles",
classDescription: "AutofillProfileAutoCompleteSearch",
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteSearch]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
// Begin nsIAutoCompleteSearch implementation
@ -209,7 +209,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
};
let ProfileAutocomplete = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
lastProfileAutoCompleteResult: null,
lastProfileAutoCompleteFocusedInput: null,
@ -324,7 +324,7 @@ let ProfileAutocomplete = {
* NOTE: Declares it by "var" to make it accessible in unit tests.
*/
var FormAutofillContent = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver]),
/**
* @type {WeakMap} mapping FormLike root HTML elements to FormAutofillHandler objects.
*/

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

@ -69,7 +69,7 @@ function FormAutofillParent() {
}
FormAutofillParent.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
/**
* Cache of the Form Autofill status (considering preferences and storage).

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

@ -177,7 +177,7 @@ var MasterPassword = {
return new Promise((resolve) => {
log.debug("waitForExistingDialog: Observing the open dialog");
let observer = {
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
]),

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

@ -26,7 +26,7 @@ class ProfileAutoCompleteResult {
log.debug("Constructing new ProfileAutoCompleteResult:", [...arguments]);
// nsISupports
this.QueryInterface = XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult]);
this.QueryInterface = ChromeUtils.generateQI([Ci.nsIAutoCompleteResult]);
// The user's query string
this.searchString = searchString;

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

@ -46,14 +46,14 @@ let gMockPrompter = {
return true;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt]),
};
// Mock nsIWindowWatcher. PSM calls getNewPrompter on this to get an nsIPrompt
// to call promptPassword. We return the mock one, above.
let gWindowWatcher = {
getNewPrompter: () => gMockPrompter,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowWatcher]),
};
// Ensure that the appropriate initialization has happened.

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

@ -127,7 +127,7 @@ Factory.prototype = {
};
var PdfJs = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
_registered: false,
_initialized: false,

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

@ -809,12 +809,7 @@ PdfStreamConverter.prototype = {
classID2: Components.ID("{d0c5195d-e798-49d4-b1d3-9324328b2292}"),
contractID2: "@mozilla.org/streamconv;1?from=application/pdf&to=text/html",
QueryInterface: XPCOMUtils.generateQI([
Ci.nsISupports,
Ci.nsIStreamConverter,
Ci.nsIStreamListener,
Ci.nsIRequestObserver
]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamConverter, Ci.nsIStreamListener, Ci.nsIRequestObserver]),
/*
* This component works as such:

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

@ -31,7 +31,7 @@ function AboutPage(chromeURL, aboutHost, classID, description, uriFlags) {
}
AboutPage.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
getURIFlags(aURI) { // eslint-disable-line no-unused-vars
return this.uriFlags;
},

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

@ -108,7 +108,7 @@ let WebCompatReporter = {
if (tabData && tabData.blob) {
let browser = gBrowser.getBrowserForTab(tab);
let loadedListener = {
QueryInterface: XPCOMUtils.generateQI(["nsIWebProgressListener",
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
"nsISupportsWeakReference"]),
onStateChange(webProgress, request, flags, status) {
let isStopped = flags & Ci.nsIWebProgressListener.STATE_STOP;

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

@ -227,8 +227,8 @@ let URICountListener = {
this._domainSet.clear();
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference]),
};
let urlbarListener = {
@ -312,8 +312,8 @@ let urlbarListener = {
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
};
let BrowserUsageTelemetry = {
@ -341,8 +341,8 @@ let BrowserUsageTelemetry = {
URICountListener.reset();
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
uninit() {
if (!this._inited) {

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

@ -227,5 +227,5 @@ FormSubmitObserver.prototype =
(target.ownerDocument && target.ownerDocument == this._content.document));
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver])
QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver])
};

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

@ -269,7 +269,7 @@ var Sanitizer = {
}
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsiObserver,
Ci.nsISupportsWeakReference
]),

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

@ -111,7 +111,7 @@ var SiteDataManager = {
this._getCacheSizeObserver = null;
},
QueryInterface: XPCOMUtils.generateQI([
QueryInterface: ChromeUtils.generateQI([
Ci.nsICacheStorageConsumptionObserver,
Ci.nsISupportsWeakReference
])

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше