mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1186077 - Default favicon (globe) is briefly shown on about:home before updating to favicon. r=mcomella
--HG-- extra : commitid : G4BFIQ4TjMM
This commit is contained in:
parent
1bca3c2ed3
commit
52b391375c
@ -424,6 +424,11 @@ public class Tab {
|
||||
}
|
||||
|
||||
public void loadFavicon() {
|
||||
// Static Favicons never change
|
||||
if (AboutPages.isBuiltinIconPage(mUrl) && mFavicon != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have a Favicon explicitly set, load it.
|
||||
if (!mAvailableFavicons.isEmpty()) {
|
||||
RemoteFavicon newFavicon = mAvailableFavicons.first();
|
||||
@ -667,6 +672,12 @@ public class Tab {
|
||||
// spurious location change, so we're definitely loading a new
|
||||
// page.
|
||||
clearFavicon();
|
||||
|
||||
// Load local static Favicons immediately
|
||||
if (AboutPages.isBuiltinIconPage(uri)) {
|
||||
loadFavicon();
|
||||
}
|
||||
|
||||
updateTitle(null);
|
||||
}
|
||||
}
|
||||
|
@ -924,10 +924,8 @@ public class Tabs implements GeckoEventListener {
|
||||
selectTab(tabToSelect.getId());
|
||||
}
|
||||
|
||||
// TODO: surely we could just fetch *any* cached icon?
|
||||
// Load favicon instantly for about:home page because it's already cached
|
||||
if (AboutPages.isBuiltinIconPage(url)) {
|
||||
Log.d(LOGTAG, "Setting about: tab favicon inline.");
|
||||
tabToSelect.addFavicon(url, Favicons.browserToolbarFaviconSize, "");
|
||||
tabToSelect.loadFavicon();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user