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

Icon matching algorithm: unrecognised purposes can result in "any" #728

Closed
mgiuca opened this issue Oct 25, 2018 · 1 comment · Fixed by #741
Closed

Icon matching algorithm: unrecognised purposes can result in "any" #728

mgiuca opened this issue Oct 25, 2018 · 1 comment · Fixed by #741
Assignees

Comments

@mgiuca
Copy link
Collaborator

mgiuca commented Oct 25, 2018

https://w3c.github.io/manifest/#purpose-member

Currently, if the user agent doesn't recognise any of the purposes in the list, it defaults to "any". Instead, this should be an error (i.e., the icon should be ignored). The default of "any" should only be applied if purpose is the empty string or missing. Otherwise, it is still permitted to have unrecognised purposes in the list, but the UA must only treat the icon as one of the recognised purposes.

@mgiuca mgiuca self-assigned this Nov 15, 2018
@mgiuca
Copy link
Collaborator Author

mgiuca commented Nov 15, 2018

I just hit this in Chrome.

Adding a "purpose": "maskable" icon in Chrome results in a Dev Tools warning: "found icon with invalid purpose. Using default value 'any'.". The icons are interpreted as normal icons.

These "invalid-purpose" icons need to be ignored, not considered to be "any". @dominickng

mgiuca added a commit to mgiuca/manifest that referenced this issue Nov 15, 2018
Previously, if all of an icon's purposes were unrecognised, it could be
used for any purpose. This causes forwards-compatibility issues, since
if we add a new purpose (such as the recently added 'maskable'), old
user agents will interpret icons with that new purpose as 'any', which
is not intended.

Icons with no stated purpose, or whose purpose is the empty string, are
still treated as 'any'.

Closes w3c#728.
mgiuca added a commit that referenced this issue Dec 12, 2018
Previously, if all of an icon's purposes were unrecognised, it could be
used for any purpose. This causes forwards-compatibility issues, since
if we add a new purpose (such as the recently added 'maskable'), old
user agents will interpret icons with that new purpose as 'any', which
is not intended.

Icons with no stated purpose, or whose purpose is the empty string, are
still treated as 'any'.

Closes #728.
christianliebel pushed a commit to christianliebel/manifest that referenced this issue May 27, 2020
Previously, if all of an icon's purposes were unrecognised, it could be
used for any purpose. This causes forwards-compatibility issues, since
if we add a new purpose (such as the recently added 'maskable'), old
user agents will interpret icons with that new purpose as 'any', which
is not intended.

Icons with no stated purpose, or whose purpose is the empty string, are
still treated as 'any'.

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

Successfully merging a pull request may close this issue.

1 participant