Bug 571970: Main browser chrome should be hidden when viewing in-content UI. r=gavin, a=blocks-betaN

This commit is contained in:
Dave Townsend
2010-12-06 10:05:55 -08:00
parent fa72829d2c
commit d384f67e9d
6 changed files with 170 additions and 2 deletions

View File

@@ -3901,6 +3901,7 @@ var XULBrowserWindow = {
startTime: 0,
statusText: "",
isBusy: false,
inContentWhitelist: ["about:addons"],
QueryInterface: function (aIID) {
if (aIID.equals(Ci.nsIWebProgressListener) ||
@@ -4139,6 +4140,16 @@ var XULBrowserWindow = {
}
}
// Show or hide browser chrome based on the whitelist
var disableChrome = this.inContentWhitelist.some(function(aSpec) {
return aSpec == location;
});
if (disableChrome)
document.documentElement.setAttribute("disablechrome", "true");
else
document.documentElement.removeAttribute("disablechrome");
// This code here does not compare uris exactly when determining
// whether or not the message should be hidden since the message
// may be prematurely hidden when an install is invoked by a click