mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 00:17:47 -10:00
Bug 609072 - Default favicon does not appear on about: pages [r=mfinkle]
This commit is contained in:
1 parent
c20706dffa
commit
1127835a29
1 file changed
+16
-15
@@ -99,14 +99,14 @@
|
||||
case "pageshow":
|
||||
self.onPageShow(aMessage);
|
||||
|
||||
if (self.mIconURL == "" && self._documentURI) {
|
||||
// newURI call is throwing for chrome URI
|
||||
try {
|
||||
// Use documentURIObject in the favicon construction so that we
|
||||
if (!self.mIconURL && self._documentURI) {
|
||||
let iconURL = null;
|
||||
if (self.shouldLoadFavicon()) {
|
||||
// Use documentURI in the favicon construction so that we
|
||||
// do the right thing with about:-style error pages. Bug 515188
|
||||
self.loadFavicon(self.documentURI.prePath + "/favicon.ico", null);
|
||||
iconURL = self.documentURI.prePath + "/favicon.ico";
|
||||
}
|
||||
catch(e) {}
|
||||
self.loadFavicon(iconURL, null);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -152,23 +152,24 @@
|
||||
<parameter name="aURL"/>
|
||||
<parameter name="aCharset"/>
|
||||
<body><![CDATA[
|
||||
let iconURI = Services.io.newURI(aURL, aCharset, null);
|
||||
if (this.shouldLoadFavicon(iconURI)) {
|
||||
try { // newURI call is throwing for chrome URI
|
||||
let iconURI = Services.io.newURI(aURL, aCharset, null);
|
||||
if (gFaviconService.isFailedFavicon(iconURI))
|
||||
return;
|
||||
|
||||
gFaviconService.setAndLoadFaviconForPage(this.currentURI, iconURI, true);
|
||||
this.mIconURL = iconURI.spec;
|
||||
}
|
||||
else {
|
||||
this.mIconURL = "";
|
||||
} catch (e) {
|
||||
this.mIconURL = null;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="shouldLoadFavicon">
|
||||
<parameter name="aURI"/>
|
||||
<body><![CDATA[
|
||||
let docURI = this.currentURI;
|
||||
return (!gFaviconService.isFailedFavicon(aURI) && docURI && ("schemeIs" in docURI) &&
|
||||
(docURI.schemeIs("http") || docURI.schemeIs("https") || docURI.schemeIs("about") || docURI.schemeIs("chrome")));
|
||||
let docURI = this.documentURI;
|
||||
return (docURI && ("schemeIs" in docURI) &&
|
||||
(docURI.schemeIs("http") || docURI.schemeIs("https")));
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
||||
Reference in new issue
Block a user