зеркало из https://github.com/mozilla/pjs.git
Don't try to load favicon.ico for error pages. b=453442 r=gavin
This commit is contained in:
Родитель
754ae2f1b3
Коммит
6350b50c46
|
@ -2697,8 +2697,10 @@ const BrowserSearch = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append the URI and an appropriate title to the browser data.
|
// Append the URI and an appropriate title to the browser data.
|
||||||
|
// Use documentURIObject in the check for shouldLoadFavIcon so that we
|
||||||
|
// do the right thing with about:-style error pages. Bug 453442
|
||||||
var iconURL = null;
|
var iconURL = null;
|
||||||
if (gBrowser.shouldLoadFavIcon(browser.currentURI))
|
if (gBrowser.shouldLoadFavIcon(browser.contentDocument.documentURIObject))
|
||||||
iconURL = browser.currentURI.prePath + "/favicon.ico";
|
iconURL = browser.currentURI.prePath + "/favicon.ico";
|
||||||
|
|
||||||
var hidden = false;
|
var hidden = false;
|
||||||
|
|
|
@ -602,7 +602,9 @@
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.shouldLoadFavIcon(browser.currentURI)) {
|
// Use documentURIObject in the check for shouldLoadFavIcon so that we
|
||||||
|
// do the right thing with about:-style error pages. Bug 453442
|
||||||
|
else if (this.shouldLoadFavIcon(browser.contentDocument.documentURIObject)) {
|
||||||
var url = browser.currentURI.prePath + "/favicon.ico";
|
var url = browser.currentURI.prePath + "/favicon.ico";
|
||||||
if (!this.isFailedIcon(url))
|
if (!this.isFailedIcon(url))
|
||||||
this.setIcon(aTab, url);
|
this.setIcon(aTab, url);
|
||||||
|
|
|
@ -205,7 +205,11 @@ function (aDescriptionURL)
|
||||||
var win = WINMEDSVC.getMostRecentWindow("navigator:browser");
|
var win = WINMEDSVC.getMostRecentWindow("navigator:browser");
|
||||||
var browser = win.document.getElementById("content");
|
var browser = win.document.getElementById("content");
|
||||||
var iconURL = "";
|
var iconURL = "";
|
||||||
if (browser.shouldLoadFavIcon(browser.selectedBrowser.currentURI))
|
// Use documentURIObject in the check for shouldLoadFavIcon so that we
|
||||||
|
// do the right thing with about:-style error pages. Bug 453442
|
||||||
|
if (browser.shouldLoadFavIcon(browser.selectedBrowser
|
||||||
|
.contentDocument
|
||||||
|
.documentURIObject))
|
||||||
iconURL = win.gProxyFavIcon.getAttribute("src");
|
iconURL = win.gProxyFavIcon.getAttribute("src");
|
||||||
|
|
||||||
if (!this.validateSearchEngine(aDescriptionURL, iconURL))
|
if (!this.validateSearchEngine(aDescriptionURL, iconURL))
|
||||||
|
|
Загрузка…
Ссылка в новой задаче