mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927938 - Remove extra refresh of TopSites tile backgrounds. r=rsilveira
--HG-- extra : rebase_source : 29efd6e3c8385d4c3e72d55d4a5b109b474ce1c7
This commit is contained in:
parent
4572d7ffb6
commit
2854eb946b
@ -167,9 +167,12 @@ TopSitesView.prototype = Util.extend(Object.create(View.prototype), {
|
||||
let filepath = PageThumbsStorage.getFilePathForURL(aSite.url);
|
||||
if (yield OS.File.exists(filepath)) {
|
||||
aSite.backgroundImage = 'url("'+PageThumbs.getThumbnailURL(aSite.url)+'")';
|
||||
if ('backgroundImage' in aTileNode) {
|
||||
// use the setter when available to update the backgroundImage value
|
||||
if ('backgroundImage' in aTileNode &&
|
||||
aTileNode.backgroundImage != aSite.backgroundImage) {
|
||||
aTileNode.backgroundImage = aSite.backgroundImage;
|
||||
} else {
|
||||
// just update the attribute for when the node gets the binding applied
|
||||
aTileNode.setAttribute("customImage", aSite.backgroundImage);
|
||||
}
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ View.prototype = {
|
||||
// get the rgb value that represents this color at given opacity over a white matte
|
||||
let tintColor = ColorUtils.addRgbColors(matteColor, ColorUtils.createDecimalColorWord(r,g,b,alpha));
|
||||
aItem.setAttribute("tintColor", ColorUtils.convertDecimalToRgbColor(tintColor));
|
||||
|
||||
if (aItem.refresh) {
|
||||
aItem.refresh();
|
||||
// when bound, use the setter to propogate the color change through the tile
|
||||
if ('color' in aItem) {
|
||||
aItem.color = background;
|
||||
}
|
||||
};
|
||||
let failureAction = function() {};
|
||||
|
Loading…
Reference in New Issue
Block a user