Closed Bug 792240 Opened 12 years ago Closed 11 years ago

Handle favicon for about:home in Java

Categories

(Firefox for Android Graveyard :: General, defect)

16 Branch
All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 941868

People

(Reporter: mfinkle, Unassigned)

Details

(Whiteboard: ui-responsiveness)

We currently depend on aboutHome.xhtml and a <link> tag to get the right favicon for the Java-implemented Home page. We have special case code to handle the <title> in Java though. This keeps the urlbar title from flickering between states. Currently, the favicon will change states from the "default" favicon to the real favicon. We could just whitelist the about:home URL and set the favicon right away in Java. We could then remove the <link> tag in aboutHome.xhtml. This would remove the delay in displaying the favicon _and_ reduce a <link> JS->Java message sent during startup.
Hasn't this problem ceased to exist now the new about:home has landed?
(In reply to Chris Kitching [:ckitching] from comment #1) > Hasn't this problem ceased to exist now the new about:home has landed? Sorry for the spam. Apparently it has not - but isn't this a duplicate of Bug 773272 (Or at least doesn't a subsumption relation exist in one way or the other)? Same underlying problem (Wanting to special-case this Favicon so we can load it before Gecko has come to life).
Of particular note is that the Favicon in question is actually in the local database from the very start. Declared: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/strings.xml.in#284 And added to the initial database on first load within this call: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/db/BrowserProvider.java#1180 Ultimately: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/db/BrowserProvider.java#3003 So it would seem that we really don't need Gecko for this - all we need to do is call loadFavicon on the tab in question at an earlier point and the cache should work its magic and make everything okay. How to special-case-ify this in a non-disgusting way is another question, however - but it seems all the ingredients are present for this to be relatively straightforward.
I'm not sure exactly how things work right now, but in the past, we added that favicon primarily so that the bookmarks/history lists in the awesomescreen were filled in at first run. We have an html about:home that (used to?) actually load in the background and would replace this icon with one from a jar :) (yay efficiency!) http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/aboutHome.xhtml That also allows us to readd this icon if for some reason our favicon db was cleared (and not recreated with this already in it).
I'm pretty sure I did this in Bug 941868.
Status: NEW → RESOLVED
Closed: 11 years ago
OS: Linux → Android
Hardware: x86_64 → All
Resolution: --- → DUPLICATE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.