forked from mirrors/gecko-dev
Bug 1628415 part 3: Remove XULListboxAccessible::Value. r=MarcoZ
This depends on richlistitem's nsIDOMXULSelectControlItemElement::label implementation, which does the wrong thing in several cases. We could make this use a11y name computation, but I can't find any other list box implementation that exposes accessible value on the list box itself, so I don't see any reason to keep this. Differential Revision: https://phabricator.services.mozilla.com/D74372
This commit is contained in:
parent
b02d77311a
commit
9f69f88101
2 changed files with 0 additions and 22 deletions
|
|
@ -97,27 +97,6 @@ uint64_t XULListboxAccessible::NativeState() const {
|
|||
return states;
|
||||
}
|
||||
|
||||
/**
|
||||
* Our value is the label of our ( first ) selected child.
|
||||
*/
|
||||
void XULListboxAccessible::Value(nsString& aValue) const {
|
||||
aValue.Truncate();
|
||||
|
||||
nsCOMPtr<nsIDOMXULSelectControlElement> select = Elm()->AsXULSelectControl();
|
||||
if (select) {
|
||||
RefPtr<dom::Element> element;
|
||||
select->GetSelectedItem(getter_AddRefs(element));
|
||||
|
||||
if (element) {
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectedItem =
|
||||
element->AsXULSelectControlItem();
|
||||
if (selectedItem) {
|
||||
selectedItem->GetLabel(aValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
role XULListboxAccessible::NativeRole() const {
|
||||
// A richlistbox is used with the new autocomplete URL bar, and has a parent
|
||||
// popup <panel>.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ class XULListboxAccessible : public XULSelectControlAccessible,
|
|||
virtual Accessible* AsAccessible() override { return this; }
|
||||
|
||||
// Accessible
|
||||
virtual void Value(nsString& aValue) const override;
|
||||
virtual TableAccessible* AsTable() override { return this; }
|
||||
virtual a11y::role NativeRole() const override;
|
||||
virtual uint64_t NativeState() const override;
|
||||
|
|
|
|||
Loading…
Reference in a new issue