Closed Bug 1242666 Opened 8 years ago Closed 8 years ago

Investigate supporting apple-touch-icon-precomposed for homescreen shortcuts

Categories

(Firefox for Android Graveyard :: Favicon Handling, defect, P3)

defect

Tracking

(firefox46 fixed, firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox46 --- fixed
firefox47 --- fixed

People

(Reporter: ahunt, Assigned: ahunt)

Details

Attachments

(1 file)

In Bug 826400 we added support for apple-touch-icon 's. We might want to support apple-touch-icon-precomposed, which sites like facebook support. (Note: you'll need to run facebook on a mobile device to see this - they don't seem to send apple-touch-icon on desktop firefox.)

Apple's touch-icon spec [1] allows for -precomposed for icons that shouldn't be processed (since they can add effects such as rounded corners) - we currently completely ignore those (we also don't process the normal non -precomposed icons, I doubt there's much use in us doing that?).

[1]: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
Assignee: nobody → ahunt
Mentor: ahunt
Priority: -- → P3
It's interesting that Facebooks "precomposed" image is not actually precomposed at all. It has square corners. Chrome for Android will process the icon to give it rounded corners, which it seems to do for all touch icons. I bet we'll end up doing that too.
Does Facebook have an app manifest? Would this issue be fixed by implementing bug 1234558?

I'm all for short-term gains based on what sites are actually serving, but bug 1234558 seems like a better long-term strategy.
(In reply to :Margaret Leibovic from comment #2)
> Does Facebook have an app manifest? Would this issue be fixed by
> implementing bug 1234558?

Facebook, itself, should have a manifest. I don't know that they serve it to Firefox though.

> 
> I'm all for short-term gains based on what sites are actually serving, but
> bug 1234558 seems like a better long-term strategy.

I don't believe most of the Web will be using web app manifests for some time, perhaps years. Adding support for precomposed would give us instant benefits.
I've prepared a quick and dirty fix, which pushes -precomposed touchicons into the same list as the normal touchicons. (That list is used to select the closest sized touchicon, which we then use for homescreen icon.)

We should probably still look into what processing we could do with the icons (and whether it's worth splitting the lists and handling them separately), but this patch would at least allow us to use touch-icons for all sites that provide them. I think it makes sense to uplift this simpler patch to 46 too so we actually support all touchicon sites there.

(I've noticed it's a lot easier to notice when we're using favicons instead of touchicons on High-DPI devices, where the favicon is surrounded by a box (whereas on older devices we just show the favicon scaled up to fill the entire homescreen icon)).
Also worth noting, the icons currently won't look great on some xxdpi devices because of more scaling issues, see https://bugzilla.mozilla.org/show_bug.cgi?id=1238656#c9
Attachment #8714412 - Flags: review?(mark.finkle) → review+
Comment on attachment 8714412 [details]
MozReview Request: Bug 1242666 - Support apple-touch-icon-precomposed too r=mfinkle

https://reviewboard.mozilla.org/r/33069/#review29929

Let's keep an eye open for any odd icon reports.
I wonder if we could write a script to visit the top 100 Alexa sites and add them as homescreen shortcuts, to see what happens. Or just visit all these sites and then use some other method to see what icons are stored in the DB.

I wouldn't want to spend too much time on this, but a visual regression test could at least make manual testing a bit less manual.
I've noticed that apple's docs [1] allow for an apple-touch-icon.png in the "root document folder", without any link tags in the actual page - we should probably have a look at whether anyone uses those (without providing the apple-touch-icon tags) - facebook.com has one at https://www.facebook.com/apple-touch-icon.png , but they do also provide apple-touch-icon in html (on mobile at least).

[1]: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
https://hg.mozilla.org/mozilla-central/rev/bbe776eaf22e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Comment on attachment 8714412 [details]
MozReview Request: Bug 1242666 - Support apple-touch-icon-precomposed too r=mfinkle

Approval Request Comment
[Feature/regressing bug #]: touch-icon support added in Bug 826400, which is in 46 (currently aurora)
[User impact if declined]: Users will receive low quality homescreen icons on sites that only provide apple-touch-icon-precomposed, e.g. m.facebook.com
[Describe test coverage new/current, TreeHerder]: manual testing.
[Risks and why]: low risk, we are processing one additional type of icon for our touch-icon list.
[String/UUID change made/needed]: none.
Attachment #8714412 - Flags: approval-mozilla-aurora?
Comment on attachment 8714412 [details]
MozReview Request: Bug 1242666 - Support apple-touch-icon-precomposed too r=mfinkle

OK to uplift, Adds another icon to support recent changes in 46. Manual testing.
Attachment #8714412 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: