зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1450999 - always provide a null argument when opening a window for the -chrome command line parameter, otherwise the opened window is non-resizable, r=mconley.
This commit is contained in:
Родитель
2bf2ff691e
Коммит
1cb0e616bc
|
@ -358,7 +358,12 @@ nsBrowserContentHandler.prototype = {
|
|||
if (isLocal(resolvedURI)) {
|
||||
// If the URI is local, we are sure it won't wrongly inherit chrome privs
|
||||
let features = "chrome,dialog=no,all" + this.getFeatures(cmdLine);
|
||||
Services.ww.openWindow(null, resolvedURI.spec, "_blank", features, null);
|
||||
// Provide 1 null argument, as openWindow has a different behavior
|
||||
// when the arg count is 0.
|
||||
let argArray = Cc["@mozilla.org/array;1"]
|
||||
.createInstance(Ci.nsIMutableArray);
|
||||
argArray.appendElement(null);
|
||||
Services.ww.openWindow(null, resolvedURI.spec, "_blank", features, argArray);
|
||||
cmdLine.preventDefault = true;
|
||||
} else {
|
||||
dump("*** Preventing load of web URI as chrome\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче