зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
a893aed7c5
Коммит
a9d91ed0f6
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче