diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 6b0662afb219..804381e1ecf9 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -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"] diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 9a2146a0ef26..d98605b87818 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -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; } diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 10d440f18b90..5bad463283bd 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -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