Closed
Bug 596650
Opened 14 years ago
Closed 13 years ago
Use the "sizes" attribute to select the best web app icon
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 8
People
(Reporter: fabrice, Assigned: fabrice)
References
(Depends on 1 open bug)
Details
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon specifies that icons with different sizes can be added for a page. We should use the most appropriate size for the web app icon.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → fabrice
Assignee | ||
Comment 1•14 years ago
|
||
We consider that an icon without the "sizes" attribute has a size of 16px, and that an apple icon has a size of 57px.
The size of icon is min(w, h), since they could be non-square. We then rescale them to fit a 64x64 area, so maybe we should rather keep the closest size to 64px
Note: without the platform patch applied, the behavior is to just ignore the "sizes" attribute.
Attachment #480601 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 2•14 years ago
|
||
New patch that doesn't depend on the platform patch, but directly uses the DOM attribute.
Attachment #480601 -
Attachment is obsolete: true
Attachment #481788 -
Flags: review?(mark.finkle)
Attachment #480601 -
Flags: review?(mark.finkle)
Comment 3•14 years ago
|
||
Comment on attachment 481788 [details] [diff] [review]
patch v2
>diff --git a/chrome/content/bindings/browser.js b/chrome/content/bindings/browser.js
> };
>+ // rel=icon can also have a sizes attribute
>+ if (target.hasAttribute("sizes"))
>+ json.sizes = target.getAttribute("sizes");
nit: Blank line before comment
>diff --git a/chrome/content/browser-ui.js b/chrome/content/browser-ui.js
>+ else if ((rel.indexOf("apple-touch-icon") != -1) && (browser.appIcon.size < 57)) {
Is the apple-touch icon always 57px? I thought it could be bigger, but apple resized it
>diff --git a/chrome/content/browser.js b/chrome/content/browser.js
>- this.browser.appIcon = null;
>+ this.browser.appIcon = {href: null, size:-1};
nit: I like spaces around the inside of the {} block
Do we use the browser.appIcon.size to resize the icon? I guess the OS is responsible for that, right?
r+ with nits fixed
Attachment #481788 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 4•14 years ago
|
||
> Is the apple-touch icon always 57px? I thought it could be bigger, but apple
> resized it
According to http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html web sites must provide a 57x57 icon and a 114x114 one for high dpi screens. I choose worst case here.
> Do we use the browser.appIcon.size to resize the icon? I guess the OS is
> responsible for that, right?
yes, we let the OS do the work. We don't really check that the declared size is the actual size of the icon.
Attachment #481788 -
Attachment is obsolete: true
Attachment #482621 -
Flags: review?(mark.finkle)
Updated•14 years ago
|
Attachment #482621 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #482621 -
Attachment is obsolete: true
Attachment #488246 -
Flags: review?(mark.finkle)
Updated•14 years ago
|
Attachment #488246 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #488246 -
Attachment is obsolete: true
Updated•13 years ago
|
Attachment #538641 -
Flags: review+
Assignee | ||
Comment 7•13 years ago
|
||
pushed to inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/9f227fa1d0db
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → Firefox 8
You need to log in
before you can comment on or make changes to this bug.
Description
•