зеркало из https://github.com/mozilla/gecko-dev.git
Bug 337344: Disable location bar hiding by default, to make chrome spoofing harder. p=Johnathan Nightingale <johnath@mozilla.com>, r=mconnor
This commit is contained in:
Родитель
a23985c0a8
Коммит
e879d0303c
|
@ -305,9 +305,10 @@ pref("javascript.options.showInConsole", false);
|
||||||
pref("dom.disable_window_open_feature.status", true);
|
pref("dom.disable_window_open_feature.status", true);
|
||||||
// This is the pref to control the location bar, change this to true to
|
// This is the pref to control the location bar, change this to true to
|
||||||
// force this instead of or in addition to the status bar - this makes
|
// force this instead of or in addition to the status bar - this makes
|
||||||
// the origin of popup windows more obvious to avoid spoofing but we
|
// the origin of popup windows more obvious to avoid spoofing. We would
|
||||||
// cannot do it by default because it affects UE for web applications.
|
// rather not do it by default because it affects UE for web applications, but
|
||||||
pref("dom.disable_window_open_feature.location", false);
|
// without it there isn't a really good way to prevent chrome spoofing, see bug 337344
|
||||||
|
pref("dom.disable_window_open_feature.location", true);
|
||||||
pref("dom.disable_window_status_change", true);
|
pref("dom.disable_window_status_change", true);
|
||||||
// allow JS to move and resize existing windows
|
// allow JS to move and resize existing windows
|
||||||
pref("dom.disable_window_move_resize", false);
|
pref("dom.disable_window_move_resize", false);
|
||||||
|
|
|
@ -221,12 +221,12 @@ function getMostRecentBrowserWindow() {
|
||||||
var win = wm.getMostRecentWindow("navigator:browser", true);
|
var win = wm.getMostRecentWindow("navigator:browser", true);
|
||||||
|
|
||||||
// if we're lucky, this isn't a popup, and we can just return this
|
// if we're lucky, this isn't a popup, and we can just return this
|
||||||
if (win && !win.toolbar.visible) {
|
if (win && win.document.documentElement.getAttribute("chromehidden")) {
|
||||||
var windowList = wm.getEnumerator("navigator:browser", true);
|
var windowList = wm.getEnumerator("navigator:browser", true);
|
||||||
// this is oldest to newest, so this gets a bit ugly
|
// this is oldest to newest, so this gets a bit ugly
|
||||||
while (windowList.hasMoreElements()) {
|
while (windowList.hasMoreElements()) {
|
||||||
var nextWin = windowList.getNext();
|
var nextWin = windowList.getNext();
|
||||||
if (nextWin.toolbar.visible)
|
if (!nextWin.document.documentElement.getAttribute("chromehidden"))
|
||||||
win = nextWin;
|
win = nextWin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ function getMostRecentBrowserWindow() {
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var win = windowList.getNext();
|
var win = windowList.getNext();
|
||||||
while (!win.toolbar.visible) {
|
while (win.document.documentElement.getAttribute("chromehidden")) {
|
||||||
if (!windowList.hasMoreElements())
|
if (!windowList.hasMoreElements())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче