Bug 1553804: Part 5 - Fix callers which create chrome windows with content openers. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D45656

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kris Maglione 2019-09-20 04:43:55 +00:00
parent b79b2c3aa0
commit cc8f94a921
4 changed files with 7 additions and 3 deletions

View File

@ -100,7 +100,8 @@ SubDialog.prototype = {
this._addDialogEventListeners();
let features =
(aFeatures ? aFeatures + "," : "") + "resizable,dialog=no,centerscreen";
(aFeatures ? aFeatures + "," : "") +
"resizable,dialog=no,centerscreen,chrome=no";
let dialog = window.openDialog(
aURL,
`dialogFrame-${this._id}`,

View File

@ -508,7 +508,7 @@ var SiteDataManager = {
allowed: false,
};
let features = "centerscreen,chrome,modal,resizable=no";
win.openDialog(
win.docShell.rootTreeItem.domWindow.openDialog(
"chrome://browser/content/preferences/siteDataRemoveSelected.xul",
"",
features,

View File

@ -450,7 +450,7 @@ function openModalWindow(domWin, uri, args) {
// will do that. Similarly for enterModalState / leaveModalState.
Services.ww.openWindow(
domWin,
domWin.docShell.rootTreeItem.domWindow,
uri,
"_blank",
"centerscreen,chrome,modal,titlebar",

View File

@ -23,6 +23,9 @@ nsContentDispatchChooser.prototype = {
try {
if (aWindowContext) {
window = aWindowContext.getInterface(Ci.nsIDOMWindow);
if (window) {
window = window.docShell.rootTreeItem.domWindow;
}
}
} catch (e) {
/* it's OK to not have a window */