Bug 1476659, remove invertSelection from mozilla-central, r=NeilDeakin

Differential Revision: https://phabricator.services.mozilla.com/D50407

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexander J. Vincent 2019-10-28 20:58:38 +00:00
parent c70db2d144
commit 4061cf92e2
6 changed files with 0 additions and 36 deletions

View File

@ -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,

View File

@ -63,11 +63,6 @@ interface nsITreeSelection : nsISupports
*/
void clearSelection();
/**
* Inverts the selection.
*/
void invertSelection();
/**
* Selects all rows.
*/

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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) {