152651 Main menu items get forver disabled after the invocation of Save File dialog.

r=jag, sr=bz
Check in for Simford.Dong@sun.com's fix
This commit is contained in:
kyle.yuan%sun.com 2006-09-14 06:05:01 +00:00
Родитель a893aed7c5
Коммит a9d91ed0f6
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -82,6 +82,8 @@ nsBrowserStatusHandler.prototype =
hideAboutBlank : true,
locationChanged : false,
QueryInterface : function(aIID)
{
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
@ -225,6 +227,8 @@ nsBrowserStatusHandler.prototype =
this.stopButton.disabled = false;
this.stopMenu.removeAttribute('disabled');
this.stopContext.removeAttribute('disabled');
this.locationChanged = false;
}
}
else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
@ -273,7 +277,12 @@ nsBrowserStatusHandler.prototype =
}
this.status = "";
this.setDefaultStatus(msg);
if (channel) {
//if the location hasn't been changed, the document may be null(eg a full-page plugin),
//we may not be able to get the correct content-type.
//so we need to skip the test and keep the menu status.
//otherwise(this.locationChanged = true), test normally.
if (channel && this.locationChanged) {
try {
ctype = channel.contentType;
if (this.mimeTypeIsTextBased(ctype))
@ -336,6 +345,8 @@ nsBrowserStatusHandler.prototype =
SetPageProxyState("valid", aLocation);
}
UpdateBackForwardButtons();
this.locationChanged = true;
},
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)