Bug 571970: Main browser chrome should be hidden when viewing in-content UI. r=gavin, a=blocks-betaN
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user