зеркало из https://github.com/mozilla/gecko-dev.git
bug 803330 - fix row count assertion failure in page info dialog r=florian
When calling rowCountChanged on an nsITreeBoxObject, the implementation assumes that the row count has actually changed. pageInfoTreeView violated this assumption in addRows by first calling rowCountChanged and then updating its row count. This patch fixes the issue by using the power of decomposition. That is, there's already a perfectly fine function called 'addRow' that can be called once for each row being added. MozReview-Commit-ID: HP6LkP4ICLf --HG-- extra : rebase_source : 574afa9a8bdaf6eea027144de96c55a2a24ea241
This commit is contained in:
Родитель
e1a20915fc
Коммит
100044aea9
|
@ -58,11 +58,8 @@ pageInfoTreeView.prototype = {
|
|||
|
||||
addRows: function(rows)
|
||||
{
|
||||
this.data = this.data.concat(rows);
|
||||
this.rowCountChanged(this.rows, rows.length);
|
||||
this.rows = this.data.length;
|
||||
if (this.selection.count == 0 && this.rowCount && !gImageElement) {
|
||||
this.selection.select(0);
|
||||
for (let row of rows) {
|
||||
this.addRow(row);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче