зеркало из https://github.com/mozilla/gecko-dev.git
Bug 545583 - Don't try to append previews to a non-existent row when using the all-tabs panel's search field. r=mstange
This commit is contained in:
Родитель
990cd7deeb
Коммит
454cbf1f10
|
@ -820,15 +820,18 @@ var allTabs = {
|
||||||
this.container.appendChild(document.createElement("hbox"));
|
this.container.appendChild(document.createElement("hbox"));
|
||||||
|
|
||||||
var row = this.container.firstChild;
|
var row = this.container.firstChild;
|
||||||
var i = 0;
|
var colCount = 0;
|
||||||
previews.forEach(function (preview) {
|
previews.forEach(function (preview) {
|
||||||
|
if (!preview.hidden &&
|
||||||
|
++colCount > this._columns) {
|
||||||
|
row = row.nextSibling;
|
||||||
|
colCount = 1;
|
||||||
|
}
|
||||||
preview.setAttribute("minwidth", outerWidth);
|
preview.setAttribute("minwidth", outerWidth);
|
||||||
preview.setAttribute("height", outerHeight);
|
preview.setAttribute("height", outerHeight);
|
||||||
preview.setAttribute("canvasstyle", canvasStyle);
|
preview.setAttribute("canvasstyle", canvasStyle);
|
||||||
preview.removeAttribute("closebuttonhover");
|
preview.removeAttribute("closebuttonhover");
|
||||||
row.appendChild(preview);
|
row.appendChild(preview);
|
||||||
if (!preview.hidden)
|
|
||||||
row = this.container.childNodes[Math.floor(++i / this._columns)];
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this._stack.width = maxWidth;
|
this._stack.width = maxWidth;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче