Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest "sizes" fallback logic #409

Closed
laukstein opened this issue Oct 12, 2015 · 4 comments
Closed

Manifest "sizes" fallback logic #409

laukstein opened this issue Oct 12, 2015 · 4 comments
Labels

Comments

@laukstein
Copy link

Reference: https://lists.w3.org/Archives/Public/public-webapps/2015OctDec/0064.html

Does "sizes" has any fallback for device required different icon sizes?

{
    "icons": [
        {
            "src": "32x32.png",
            "sizes": "32x32"
        }, {
            "src": "48x48.png",
            "sizes": "48x48"
        }, {
            "src": "128x128.png",
            "sizes": "128x128"
        }
    ]
}
  1. For example, would device request for 16x16 return scaled down image 32x32.png?
  2. What about request 40x40 - would it scale up 32x32.png or scale down 48x48.png (40x40 is in middle of both those sizes (+8 = 48, -8 = 32))?
  3. Would request 96x96 use 128x128.png?
  4. Would request 192x192 and 512x512 use 128x128.png?
@marcoscaceres
Copy link
Member

In Gecko, I'm just going to try to use HTMLPictureElement to do the selection (not sure if it will work, but going to try). That is, I just convert the JSON into a bunch of <source> elements and let the <picture> element tell me what the right thing is.

So, it might be nice to generalize the image selection algorithm to take a display context, and a bunch of sources, and let the algorithm pick one.

@laukstein
Copy link
Author

Related issue #407 sizes="any".

@kenchris
Copy link
Collaborator

I think it is up to the platform (user agent) to decide how to best choose the icon, ie choosing a bigger one and scaling it down, which scaling algorithm to use etc.

@marcoscaceres
Copy link
Member

I agree with @kenchris. We should do nothing here unless it becomes an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants