Bug 346146. Text fields inside autocomplete should report the accessible HASPOPUP state. r=surkov

This commit is contained in:
aaronleventhal%moonset.net 2007-02-16 19:46:41 +00:00
parent edab849106
commit e3dc04ed76

View File

@ -352,6 +352,13 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetState(PRUint32 *aState)
nsAccessibilityAtoms::password, eIgnoreCase)) {
*aState |= STATE_PROTECTED;
}
else {
nsCOMPtr<nsIAccessible> parent;
GetParent(getter_AddRefs(parent));
if (parent && Role(parent) == ROLE_AUTOCOMPLETE) {
*aState |= STATE_HASPOPUP;
}
}
if (content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::readonly)) {
*aState |= STATE_READONLY;