mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
c70db2d144
commit
4061cf92e2
@ -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,
|
||||
|
@ -63,11 +63,6 @@ interface nsITreeSelection : nsISupports
|
||||
*/
|
||||
void clearSelection();
|
||||
|
||||
/**
|
||||
* Inverts the selection.
|
||||
*/
|
||||
void invertSelection();
|
||||
|
||||
/**
|
||||
* Selects all rows.
|
||||
*/
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user