Bug 1369185 - Don't allow <select> to aria-own, or <option> to be owned. r=surkov
This commit is contained in:
@@ -310,6 +310,13 @@ HTMLSelectOptGroupAccessible::NativeInteractiveState() const
|
||||
return NativelyUnavailable() ? states::UNAVAILABLE : 0;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLSelectOptGroupAccessible::IsAcceptableChild(nsIContent* aEl) const
|
||||
{
|
||||
return aEl->IsNodeOfType(nsINode::eDATA_NODE) ||
|
||||
aEl->IsHTMLElement(nsGkAtoms::option);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
HTMLSelectOptGroupAccessible::ActionCount()
|
||||
{
|
||||
@@ -458,6 +465,12 @@ HTMLComboboxAccessible::ActionNameAt(uint8_t aIndex, nsAString& aName)
|
||||
aName.AssignLiteral("open");
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLComboboxAccessible::IsAcceptableChild(nsIContent* aEl) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLComboboxAccessible: Widgets
|
||||
|
||||
@@ -593,6 +606,12 @@ HTMLComboboxListAccessible::RelativeBounds(nsIFrame** aBoundingFrame) const
|
||||
return (*aBoundingFrame)->GetRect();
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLComboboxListAccessible::IsAcceptableChild(nsIContent* aEl) const
|
||||
{
|
||||
return aEl->IsAnyOfHTMLElements(nsGkAtoms::option, nsGkAtoms::optgroup);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLComboboxListAccessible: Widgets
|
||||
|
||||
@@ -607,4 +626,3 @@ HTMLComboboxListAccessible::AreItemsOperable() const
|
||||
{
|
||||
return mParent && mParent->AreItemsOperable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user