зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1540394 - remove tree._columnsDirty. r=vporof
Remove the tree._columnsDirty property which is causing problems for column reordering in a fresh profile. Differential Revision: https://phabricator.services.mozilla.com/D25507 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
492ceb9eae
Коммит
06dab7c847
|
@ -304,17 +304,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
markTreeDirty() {
|
||||
this.parentNode.parentNode._columnsDirty = true;
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
if (this.delayConnectedCallback()) {
|
||||
return;
|
||||
}
|
||||
if (!this.isRunningDelayedConnectedCallback) {
|
||||
this.markTreeDirty();
|
||||
}
|
||||
|
||||
this.textContent = "";
|
||||
this.appendChild(this.content);
|
||||
|
@ -945,26 +938,24 @@
|
|||
}
|
||||
|
||||
_ensureColumnOrder() {
|
||||
if (!this._columnsDirty)
|
||||
return;
|
||||
|
||||
if (this.columns) {
|
||||
// update the ordinal position of each column to assure that it is
|
||||
// an odd number and 2 positions above its next sibling
|
||||
var cols = [];
|
||||
var i;
|
||||
for (var col = this.columns.getFirstColumn(); col; col = col.getNext())
|
||||
cols.push(col.element);
|
||||
for (i = 0; i < cols.length; ++i)
|
||||
cols[i].setAttribute("ordinal", (i * 2) + 1);
|
||||
|
||||
for (let col = this.columns.getFirstColumn(); col; col = col.getNext()) {
|
||||
cols.push(col.element);
|
||||
}
|
||||
for (let i = 0; i < cols.length; ++i) {
|
||||
cols[i].setAttribute("ordinal", (i * 2) + 1);
|
||||
}
|
||||
// update the ordinal positions of splitters to even numbers, so that
|
||||
// they are in between columns
|
||||
var splitters = this.getElementsByTagName("splitter");
|
||||
for (i = 0; i < splitters.length; ++i)
|
||||
for (let i = 0; i < splitters.length; ++i) {
|
||||
splitters[i].setAttribute("ordinal", (i + 1) * 2);
|
||||
}
|
||||
}
|
||||
this._columnsDirty = false;
|
||||
}
|
||||
|
||||
_reorderColumn(aColMove, aColBefore, aBefore) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче