Code review fixes for 599512 - Partial black thumbnails

--HG--
extra : rebase_source : b10e73ab21a4a1f37009ceeff360d3d644343de5
This commit is contained in:
Benjamin Stover 2010-09-24 19:19:50 -07:00
Родитель a10149170f
Коммит 7ef7c931bd
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2508,7 +2508,7 @@ Tab.prototype = {
// Do not repaint thumbnail if we already painted for this load. Bad things
// happen when we do async canvas draws in quick succession.
if (!browser || this._lastThumbnailWindow == browser.contentWindowId)
if (!browser || this._thumbnailWindowId == browser.contentWindowId)
return;
// Do not try to paint thumbnails if contentWindowWidth/Height have not been
@ -2516,7 +2516,7 @@ Tab.prototype = {
if (!browser.contentWindowWidth || !browser.contentWindowHeight)
return;
this._lastThumbnailWindow = browser.contentWindowId;
this._thumbnailWindowId = browser.contentWindowId;
this._chromeTab.updateThumbnail(browser, browser.contentWindowWidth, browser.contentWindowHeight);
},

Просмотреть файл

@ -53,9 +53,9 @@
let canvas = document.getAnonymousElementByAttribute(this, "anonid", "canvas");
let renderer = rendererFactory(browser, canvas)
renderer.drawContent(function(ctx, callback) {
ctx.save();
ctx.fillStyle = "white";
ctx.fillRect(0, 0, tabWidth, tabHeight);
ctx.save();
ctx.scale(tabWidth / width, tabHeight / height);
callback(browser, 0, 0, width, height, "white");
ctx.restore();