зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1261223 - Synced Tabs now uses HiDPI default favicons. r=markh
This commit is contained in:
Родитель
9e896c0e6a
Коммит
2fc076517e
|
@ -242,8 +242,10 @@ TabListView.prototype = {
|
|||
|
||||
itemNode.querySelector(".item-title").textContent = item.title;
|
||||
|
||||
let icon = itemNode.querySelector(".item-icon-container");
|
||||
icon.style.backgroundImage = "url(" + item.icon + ")";
|
||||
if (item.icon) {
|
||||
let icon = itemNode.querySelector(".item-icon-container");
|
||||
icon.style.backgroundImage = "url(" + item.icon + ")";
|
||||
}
|
||||
},
|
||||
|
||||
onClick(event) {
|
||||
|
|
|
@ -84,10 +84,21 @@ body {
|
|||
.client .item.tab > .item-title-container {
|
||||
padding-inline-start: 35px;
|
||||
}
|
||||
|
||||
.item.tab > .item-title-container {
|
||||
padding-inline-start: 20px;
|
||||
}
|
||||
|
||||
.item.tab > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
}
|
||||
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
.item.tab > .item-title-container > .item-icon-container {
|
||||
background-image: url("chrome://mozapps/skin/places/defaultFavicon@2x.png");
|
||||
}
|
||||
}
|
||||
|
||||
.item-icon-container {
|
||||
min-width: 16px;
|
||||
max-width: 16px;
|
||||
|
|
|
@ -73,7 +73,7 @@ let SyncedTabsInternal = {
|
|||
} catch (ex) { /* no favicon avaiable */ }
|
||||
}
|
||||
if (!icon) {
|
||||
icon = PlacesUtils.favicons.defaultFavicon.spec;
|
||||
icon = "";
|
||||
}
|
||||
return {
|
||||
type: "tab",
|
||||
|
|
|
@ -157,8 +157,8 @@ add_task(function* test_clientWithTabsIconsDisabled() {
|
|||
clients.sort((a, b) => { return a.name.localeCompare(b.name);});
|
||||
equal(clients[0].tabs.length, 1);
|
||||
equal(clients[0].tabs[0].url, "http://foo.com/");
|
||||
// expect the default favicon due to the pref being false.
|
||||
equal(clients[0].tabs[0].icon, faviconService.defaultFavicon.spec);
|
||||
// expect the default favicon (empty string) due to the pref being false.
|
||||
equal(clients[0].tabs[0].icon, "");
|
||||
Services.prefs.clearUserPref("services.sync.syncedTabs.showRemoteIcons");
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче