bug 828508 - use higher-res favicons for tab titles in hidpi mode if available. r=dao

This commit is contained in:
Jonathan Kew 2013-03-26 17:49:37 +00:00
parent f9a7b4ef76
commit 0311af776d

View File

@ -694,9 +694,15 @@
this.mFaviconService.FAVICON_LOAD_NON_PRIVATE);
}
if ((browser.mIconURL || "") != aTab.getAttribute("image")) {
if (browser.mIconURL)
aTab.setAttribute("image", browser.mIconURL);
let sizedIconUrl = browser.mIconURL || "";
if (sizedIconUrl) {
let size = Math.round(16 * window.devicePixelRatio);
sizedIconUrl += (sizedIconUrl.contains("#") ? "&" : "#") +
"-moz-resolution=" + size + "," + size;
}
if (sizedIconUrl != aTab.getAttribute("image")) {
if (sizedIconUrl)
aTab.setAttribute("image", sizedIconUrl);
else
aTab.removeAttribute("image");
this._tabAttrModified(aTab);