зеркало из 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;
|
itemNode.querySelector(".item-title").textContent = item.title;
|
||||||
|
|
||||||
let icon = itemNode.querySelector(".item-icon-container");
|
if (item.icon) {
|
||||||
icon.style.backgroundImage = "url(" + item.icon + ")";
|
let icon = itemNode.querySelector(".item-icon-container");
|
||||||
|
icon.style.backgroundImage = "url(" + item.icon + ")";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onClick(event) {
|
onClick(event) {
|
||||||
|
|
|
@ -84,10 +84,21 @@ body {
|
||||||
.client .item.tab > .item-title-container {
|
.client .item.tab > .item-title-container {
|
||||||
padding-inline-start: 35px;
|
padding-inline-start: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item.tab > .item-title-container {
|
.item.tab > .item-title-container {
|
||||||
padding-inline-start: 20px;
|
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 {
|
.item-icon-container {
|
||||||
min-width: 16px;
|
min-width: 16px;
|
||||||
max-width: 16px;
|
max-width: 16px;
|
||||||
|
|
|
@ -73,7 +73,7 @@ let SyncedTabsInternal = {
|
||||||
} catch (ex) { /* no favicon avaiable */ }
|
} catch (ex) { /* no favicon avaiable */ }
|
||||||
}
|
}
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
icon = PlacesUtils.favicons.defaultFavicon.spec;
|
icon = "";
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
type: "tab",
|
type: "tab",
|
||||||
|
|
|
@ -157,8 +157,8 @@ add_task(function* test_clientWithTabsIconsDisabled() {
|
||||||
clients.sort((a, b) => { return a.name.localeCompare(b.name);});
|
clients.sort((a, b) => { return a.name.localeCompare(b.name);});
|
||||||
equal(clients[0].tabs.length, 1);
|
equal(clients[0].tabs.length, 1);
|
||||||
equal(clients[0].tabs[0].url, "http://foo.com/");
|
equal(clients[0].tabs[0].url, "http://foo.com/");
|
||||||
// expect the default favicon due to the pref being false.
|
// expect the default favicon (empty string) due to the pref being false.
|
||||||
equal(clients[0].tabs[0].icon, faviconService.defaultFavicon.spec);
|
equal(clients[0].tabs[0].icon, "");
|
||||||
Services.prefs.clearUserPref("services.sync.syncedTabs.showRemoteIcons");
|
Services.prefs.clearUserPref("services.sync.syncedTabs.showRemoteIcons");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче