diff --git a/toolkit/content/widgets/tree.xml b/toolkit/content/widgets/tree.xml index 71dcd6dd27d1..6eebffaac173 100644 --- a/toolkit/content/widgets/tree.xml +++ b/toolkit/content/widgets/tree.xml @@ -14,18 +14,7 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl"> - - - - - - - - - - + @@ -416,7 +405,7 @@ if (this.view.rowCount == 0) return; - if (this._isAccelPressed(event) && this.view.selection.single) { + if (event.getModifierState("Accel") && this.view.selection.single) { this.treeBoxObject.scrollByLines(offset); return; } @@ -428,7 +417,7 @@ c = edge; } - if (!this._isAccelPressed(event)) + if (!event.getModifierState("Accel")) this.view.selection.timedSelect(c, this._selectDelay); else // Ctrl+Up/Down moves the anchor without selecting this.currentIndex = c; @@ -469,7 +458,7 @@ // Extend the selection from the existing pivot, if any this.view.selection.rangedSelect(-1, c + offset, - this._isAccelPressed(event)); + event.getModifierState("Accel")); this.treeBoxObject.ensureRowIsVisible(c + offset); ]]> @@ -487,7 +476,7 @@ if (this.view.rowCount == 0) return; - if (this.pageUpOrDownMovesSelection == this._isAccelPressed(event)) { + if (this.pageUpOrDownMovesSelection == event.getModifierState("Accel")) { this.treeBoxObject.scrollByPages(offset); return; } @@ -537,7 +526,7 @@ return; if (this.view.rowCount == 1 && !this.view.selection.isSelected(0) && - !(this.pageUpOrDownMovesSelection == this._isAccelPressed(event))) { + !(this.pageUpOrDownMovesSelection == event.getModifierState("Accel"))) { this.view.selection.timedSelect(0, this._selectDelay); return; } @@ -562,7 +551,7 @@ this.treeBoxObject.ensureRowIsVisible(i > edge ? edge : i); } // Extend the selection from the existing pivot, if any - this.view.selection.rangedSelect(-1, i > edge ? edge : i, this._isAccelPressed(event)); + this.view.selection.rangedSelect(-1, i > edge ? edge : i, event.getModifierState("Accel")); } else { @@ -571,7 +560,7 @@ this.treeBoxObject.ensureRowIsVisible(i); } // Extend the selection from the existing pivot, if any - this.view.selection.rangedSelect(-1, i, this._isAccelPressed(event)); + this.view.selection.rangedSelect(-1, i, event.getModifierState("Accel")); } ]]> @@ -594,7 +583,7 @@ } // Normal behaviour is to select the first/last row - if (!this._isAccelPressed(event)) + if (!event.getModifierState("Accel")) this.view.selection.timedSelect(edge, this._selectDelay); // In a multiselect tree Ctrl+Home/End moves the anchor @@ -627,7 +616,7 @@ // Extend the selection from the existing pivot, if any. // -1 doesn't work here, so using currentIndex instead - this.view.selection.rangedSelect(this.currentIndex, edge, this._isAccelPressed(event)); + this.view.selection.rangedSelect(this.currentIndex, edge, event.getModifierState("Accel")); this.treeBoxObject.ensureRowIsVisible(edge); ]]> @@ -906,12 +895,12 @@ if (event.charCode == " ".charCodeAt(0)) { var c = this.currentIndex; if (!this.view.selection.isSelected(c) || - (!this.view.selection.single && this._isAccelPressed(event))) { + (!this.view.selection.single && event.getModifierState("Accel"))) { this.view.selection.toggleSelect(c); event.preventDefault(); } } else if (!this.disableKeyNavigation && event.charCode > 0 && - !event.altKey && !this._isAccelPressed(event) && + !event.altKey && !event.getModifierState("Accel") && !event.metaKey && !event.ctrlKey) { var l = this._keyNavigate(event); if (l >= 0) { @@ -944,7 +933,7 @@ - + @@ -983,7 +972,7 @@ - + if ("_ensureColumnOrder" in this.parentNode) @@ -1001,7 +990,7 @@ + extends="chrome://global/content/bindings/general.xml#basecontrol"> this.parentNode.parentNode._columnsDirty = true; @@ -1353,7 +1342,7 @@ + extends="chrome://global/content/bindings/general.xml#basecontrol">