зеркало из https://github.com/mozilla/gecko-dev.git
Bug 196563 View > Page Source disabled if document contains unsupported plug in r=timeless sr=rbs
This commit is contained in:
Родитель
e6dc4caea8
Коммит
03b56a8eac
|
@ -75,8 +75,6 @@ nsBrowserStatusHandler.prototype =
|
||||||
|
|
||||||
hideAboutBlank : true,
|
hideAboutBlank : true,
|
||||||
|
|
||||||
locationChanged : false,
|
|
||||||
|
|
||||||
QueryInterface : function(aIID)
|
QueryInterface : function(aIID)
|
||||||
{
|
{
|
||||||
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
|
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
|
||||||
|
@ -216,8 +214,6 @@ nsBrowserStatusHandler.prototype =
|
||||||
this.stopButton.disabled = false;
|
this.stopButton.disabled = false;
|
||||||
this.stopMenu.removeAttribute('disabled');
|
this.stopMenu.removeAttribute('disabled');
|
||||||
this.stopContext.removeAttribute('disabled');
|
this.stopContext.removeAttribute('disabled');
|
||||||
|
|
||||||
this.locationChanged = false;
|
|
||||||
}
|
}
|
||||||
else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
|
else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
|
||||||
if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
|
if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
|
||||||
|
@ -262,21 +258,12 @@ nsBrowserStatusHandler.prototype =
|
||||||
this.status = "";
|
this.status = "";
|
||||||
this.setDefaultStatus(msg);
|
this.setDefaultStatus(msg);
|
||||||
|
|
||||||
//if the location hasn't been changed, the document may be null(eg a full-page plugin),
|
// Disable menu entries for images, enable otherwise
|
||||||
//we may not be able to get the correct content-type.
|
if (content.document && this.mimeTypeIsTextBased(content.document.contentType))
|
||||||
//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))
|
|
||||||
this.isImage.removeAttribute('disabled');
|
this.isImage.removeAttribute('disabled');
|
||||||
else
|
else
|
||||||
this.isImage.setAttribute('disabled', 'true');
|
this.isImage.setAttribute('disabled', 'true');
|
||||||
}
|
}
|
||||||
catch (e) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Turn the progress meter and throbber off.
|
// Turn the progress meter and throbber off.
|
||||||
this.statusMeter.value = 0; // be sure to clear the progress bar
|
this.statusMeter.value = 0; // be sure to clear the progress bar
|
||||||
|
@ -365,8 +352,6 @@ nsBrowserStatusHandler.prototype =
|
||||||
|
|
||||||
var popupIcon = document.getElementById("popupIcon");
|
var popupIcon = document.getElementById("popupIcon");
|
||||||
popupIcon.hidden = !browser.popupDomain;
|
popupIcon.hidden = !browser.popupDomain;
|
||||||
|
|
||||||
this.locationChanged = true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
|
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче