mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Relanding Bug 403193 - Don't show Save Password notification bar in parent window when child has history. r=gavin, a1.9=schrep
This commit is contained in:
parent
c165b23e57
commit
fbcf415301
@ -566,18 +566,22 @@ LoginManagerPrompter.prototype = {
|
||||
// upon submission of credentials. We want to put the notification
|
||||
// bar in the opener window if this seems to be happening.
|
||||
if (notifyWindow.opener) {
|
||||
var chromeWin = notifyWindow
|
||||
var webnav = notifyWindow
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.getInterface(Ci.nsIWebNavigation);
|
||||
var chromeWin = webnav
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.rootTreeItem
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
var chromeDoc = chromeWin.document.documentElement;
|
||||
|
||||
// Check to see if the current window was opened with
|
||||
// chrome disabled, and if so use the opener window.
|
||||
if (chromeDoc.getAttribute("chromehidden")) {
|
||||
// Check to see if the current window was opened with chrome
|
||||
// disabled, and if so use the opener window. But if the window
|
||||
// has been used to visit other pages (ie, has a history),
|
||||
// assume it'll stick around and *don't* use the opener.
|
||||
if (chromeDoc.getAttribute("chromehidden") &&
|
||||
webnav.sessionHistory.count == 1) {
|
||||
this.log("Using opener window for notification bar.");
|
||||
notifyWindow = notifyWindow.opener;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user