From b64476ec817f41cb660830f7eda611b669ec05fe Mon Sep 17 00:00:00 2001 From: "jaggernaut%netscape.com" Date: Thu, 14 Sep 2006 06:02:50 +0000 Subject: [PATCH] Bug 123794: urlbar not properly updated when leaving www.libertarian.org [frames]. r=hewitt, sr=jst --- suite/browser/nsBrowserStatusHandler.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/suite/browser/nsBrowserStatusHandler.js b/suite/browser/nsBrowserStatusHandler.js index 23edcd0984d9..0ce37be63fd3 100644 --- a/suite/browser/nsBrowserStatusHandler.js +++ b/suite/browser/nsBrowserStatusHandler.js @@ -127,6 +127,11 @@ nsBrowserStatusHandler.prototype = this.userTyped = null; }, + getFrom : function(object, property) + { + return object.__proto__.__lookupGetter__(property).call(object); + }, + setJSStatus : function(status) { this.jsStatus = status; @@ -238,7 +243,7 @@ nsBrowserStatusHandler.prototype = if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) { domWindow = aWebProgress.DOMWindow; if (aRequest) { - if (domWindow == domWindow.top) + if (domWindow == this.getFrom(domWindow, "top")) this.endDocumentLoad(aRequest, aStatus); var location = aRequest.QueryInterface(nsIChannel).URI.spec; @@ -301,7 +306,7 @@ nsBrowserStatusHandler.prototype = // Do not update urlbar if there was a subframe navigation var domWindow = aWebProgress.DOMWindow; - if (domWindow == domWindow.top) { + if (domWindow == this.getFrom(domWindow, "top")) { if (!this.userTyped.value) { this.urlBar.value = location; // the above causes userTyped.value to become true, reset it