Bug 485237 - Use \!toolbar.visible instead of the chromehidden attribute existence to identify popups. r=gavin
This commit is contained in:
@@ -5201,7 +5201,7 @@ nsBrowserAccess.prototype = {
|
||||
let win, needToFocusWin;
|
||||
|
||||
// try the current window. if we're in a popup, fall back on the most recent browser window
|
||||
if (!window.document.documentElement.getAttribute("chromehidden"))
|
||||
if (window.toolbar.visible)
|
||||
win = window;
|
||||
else {
|
||||
win = Cc["@mozilla.org/browser/browserglue;1"]
|
||||
|
||||
@@ -56,7 +56,7 @@ function getTopWin(skipPopups) {
|
||||
// whether it's the frontmost window, since commands can be executed in
|
||||
// background windows (bug 626148).
|
||||
if (top.document.documentElement.getAttribute("windowtype") == "navigator:browser" &&
|
||||
(!skipPopups || !top.document.documentElement.getAttribute("chromehidden")))
|
||||
(!skipPopups || top.toolbar.visible))
|
||||
return top;
|
||||
|
||||
if (skipPopups) {
|
||||
@@ -206,7 +206,7 @@ function openLinkIn(url, where, params) {
|
||||
|
||||
var w = getTopWin();
|
||||
if ((where == "tab" || where == "tabshifted") &&
|
||||
w && w.document.documentElement.getAttribute("chromehidden")) {
|
||||
w && !w.toolbar.visible) {
|
||||
w = getTopWin(true);
|
||||
aRelatedToCurrent = false;
|
||||
}
|
||||
|
||||
@@ -1442,7 +1442,7 @@ BrowserGlue.prototype = {
|
||||
getMostRecentBrowserWindow: function BG_getMostRecentBrowserWindow() {
|
||||
function isFullBrowserWindow(win) {
|
||||
return !win.closed &&
|
||||
!win.document.documentElement.getAttribute("chromehidden");
|
||||
win.toolbar.visible;
|
||||
}
|
||||
|
||||
#ifdef BROKEN_WM_Z_ORDER
|
||||
|
||||
Reference in New Issue
Block a user