diff --git a/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl b/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl index 98c7f61fa370..03db9c3bc8f2 100644 --- a/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl +++ b/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl @@ -26,7 +26,6 @@ interface nsIDOMXULMultiSelectControlElement : nsIDOMXULSelectControlElement void selectItemRange(in nsIDOMXULSelectControlItemElement startItem, in nsIDOMXULSelectControlItemElement item); void selectAll(); - void invertSelection(); void clearSelection(); // XXX - temporary, pending implementation of scriptable, diff --git a/layout/xul/tree/nsITreeSelection.idl b/layout/xul/tree/nsITreeSelection.idl index adb79a5131cd..d265b639ee96 100644 --- a/layout/xul/tree/nsITreeSelection.idl +++ b/layout/xul/tree/nsITreeSelection.idl @@ -63,11 +63,6 @@ interface nsITreeSelection : nsISupports */ void clearSelection(); - /** - * Inverts the selection. - */ - void invertSelection(); - /** * Selects all rows. */ diff --git a/layout/xul/tree/nsTreeSelection.cpp b/layout/xul/tree/nsTreeSelection.cpp index 73e848c704c7..5430df7f5f10 100644 --- a/layout/xul/tree/nsTreeSelection.cpp +++ b/layout/xul/tree/nsTreeSelection.cpp @@ -458,10 +458,6 @@ NS_IMETHODIMP nsTreeSelection::ClearSelection() { return NS_OK; } -NS_IMETHODIMP nsTreeSelection::InvertSelection() { - return NS_ERROR_NOT_IMPLEMENTED; -} - NS_IMETHODIMP nsTreeSelection::SelectAll() { if (!mTree) return NS_OK; diff --git a/toolkit/content/tests/chrome/test_hiddenitems.xul b/toolkit/content/tests/chrome/test_hiddenitems.xul index b9a90fea57ab..79f06c8890b6 100644 --- a/toolkit/content/tests/chrome/test_hiddenitems.xul +++ b/toolkit/content/tests/chrome/test_hiddenitems.xul @@ -51,8 +51,6 @@ function testListbox(id) is(listbox.selectedItem.id, id + "_item2", id + ": Up didn't skip hidden item"); listbox.selectAll(); is(listbox.selectedItems.length, 7, id + ": Should have still selected all items"); - listbox.invertSelection(); - is(listbox.selectedItems.length, 0, id + ": Should have unselected all items"); listbox.selectedIndex = 2; ok(listbox.selectedItem == listbox.getItemAtIndex(2), id + ": Should have selected the hidden item"); listbox.selectedIndex = 0; diff --git a/toolkit/content/tests/widgets/tree_shared.js b/toolkit/content/tests/widgets/tree_shared.js index 1ddd622a1fef..474b9d30f15e 100644 --- a/toolkit/content/tests/widgets/tree_shared.js +++ b/toolkit/content/tests/widgets/tree_shared.js @@ -451,9 +451,6 @@ function testtag_tree_TreeSelection(tree, testid, multiple) { [] ); - // XXXndeakin invertSelection isn't implemented - // selection.invertSelection(); - is(selection.shiftSelectPivot, -1, testid + "shiftSelectPivot set to -1"); // rangedSelect and clearRange set the currentIndex to the endIndex. The diff --git a/toolkit/content/widgets/richlistbox.js b/toolkit/content/widgets/richlistbox.js index 994a58521948..ab4debc7d240 100644 --- a/toolkit/content/widgets/richlistbox.js +++ b/toolkit/content/widgets/richlistbox.js @@ -549,27 +549,6 @@ this._fireOnSelect(); } - // nsIDOMXULMultiSelectControlElement - invertSelection() { - this._selectionStart = null; - - var suppress = this._suppressOnSelect; - this._suppressOnSelect = true; - - var item = this.getItemAtIndex(0); - while (item) { - if (item.selected) { - this.removeItemFromSelection(item); - } else { - this.addItemToSelection(item); - } - item = this.getNextItem(item, 1); - } - - this._suppressOnSelect = suppress; - this._fireOnSelect(); - } - // nsIDOMXULMultiSelectControlElement clearSelection() { if (this.selectedItems) {