Closed Bug 903210 Opened 7 years ago Closed 3 years ago

Use larger icon image for start tiles when one is available in the favicon.ico

Categories

(Firefox for Metro Graveyard :: Firefox Start, defect, P3)

x86_64
Windows 8
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: sfoster, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: polish, Whiteboard: p=0)

Many favicon.ico files contain larger versions of the icon as well as the default 16x16px.  Bug 828508 is a similar (resolved) desktop issue for reference. 

Note that at present (see patch on bug 895519), we need an iconsize="large" set on the richgriditem to kick in the large-icon treatment, so we need to either determine programatically that a large size is available when we assign the iconURI (in View.jsm), or figure out some other CSS mechanism to draw the distinction.
Assignee: nobody → ally
Status: NEW → ASSIGNED
To pull larger icons out of ico files, you just have to add a -moz-resolution media query on the url:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#798

That will return to you whatever icon is closest to the size you requested (but favors downscaling). Note you can't query for what sizes are available. To do something like that you're probably going to have to resort to something like:

var img = new Image();
img.onload = function() {
  if (img.width < 32) {
    // do whatever you need to for small icons
  }
};
img.src = "myfile.ico#-moz-resolution=64,64"
Assignee: ally → nobody
Sam & I have talked this over and it sounds like a v2 feature, and we are not comfortable with any of the current possible solutions. We think the favicon api is a little deficient here. It seems reasonable that ui designs morph and shift if richer, larger icons are available.
Depends on: 907471
Blocks: metrobacklog
Status: ASSIGNED → NEW
Whiteboard: p=0
Keywords: polish
Priority: -- → P3
For reference - 

bug 1014712 - "Use msapplication-TileImage and msapplication-TileColor to create home page tiles"
Mass close of bugs in obsolete product https://bugzilla.mozilla.org/show_bug.cgi?id=1350354
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.