зеркало из https://github.com/mozilla/pjs.git
Bug 681944 - Remove "empty" attribute from the thumbnails of restored tabs (r=mfinkle)
Once tabs are restored and their thumbnails are loaded from session data, the canvas should not be marked as empty anymore.
This commit is contained in:
Родитель
11a7969238
Коммит
27d12e1bac
|
@ -790,8 +790,10 @@ SessionStore.prototype = {
|
||||||
|
|
||||||
let image = new window.Image();
|
let image = new window.Image();
|
||||||
image.onload = function() {
|
image.onload = function() {
|
||||||
if (canvas)
|
if (canvas) {
|
||||||
canvas.getContext("2d").drawImage(image, 0, 0);
|
canvas.getContext("2d").drawImage(image, 0, 0);
|
||||||
|
canvas.removeAttribute("empty");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
image.src = tabData.extData.thumbnail;
|
image.src = tabData.extData.thumbnail;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче