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

RESOLVED FIXED in Firefox 46

Status

()

Firefox for Android
Favicon Handling
P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: ahunt, Assigned: ahunt)

Tracking

Trunk
Firefox 47
Points:
---

Firefox Tracking Flags

(firefox46 fixed, firefox47 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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)

Updated

2 years ago
Assignee: nobody → ahunt
Mentor: ahunt@mozilla.com
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.

Comment 2

2 years ago
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.
(Assignee)

Comment 4

2 years ago
Created attachment 8714412 [details]
MozReview Request: Bug 1242666 - Support apple-touch-icon-precomposed too r=mfinkle

Review commit: https://reviewboard.mozilla.org/r/33069/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33069/
Attachment #8714412 - Flags: review?(mark.finkle)
(Assignee)

Comment 5

2 years ago
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)).
(Assignee)

Comment 6

2 years ago
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.

Comment 8

2 years ago
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.
(Assignee)

Comment 9

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/bbe776eaf22eb536a0f8380003f43e58d53d1a91
Bug 1242666 - Support apple-touch-icon-precomposed too r=mfinkle
(Assignee)

Comment 10

2 years ago
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

Comment 11

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bbe776eaf22e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox47: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
(Assignee)

Comment 12

2 years ago
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+

Comment 14

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/f7aec99f446b
status-firefox46: --- → fixed
You need to log in before you can comment on or make changes to this bug.