bug 673403 - check return of GetParent() and rename to Parent() r=surkov

This commit is contained in:
Trevor Saunders
2011-07-23 01:38:33 -07:00
parent 39bdd11fe5
commit d6e71fe9f3
25 changed files with 138 additions and 123 deletions

View File

@@ -407,8 +407,9 @@ nsHTMLTextFieldAccessible::GetNameInternal(nsAString& aName)
// This means we're part of another control, so use parent accessible for name.
// This ensures that a textbox inside of a XUL widget gets
// an accessible name.
nsAccessible* parent = GetParent();
parent->GetName(aName);
nsAccessible* parent = Parent();
if (parent)
parent->GetName(aName);
}
if (!aName.IsEmpty())
@@ -452,7 +453,7 @@ nsHTMLTextFieldAccessible::NativeState()
state |= states::PROTECTED;
}
else {
nsAccessible* parent = GetParent();
nsAccessible* parent = Parent();
if (parent && parent->Role() == nsIAccessibleRole::ROLE_AUTOCOMPLETE)
state |= states::HASPOPUP;
}
@@ -650,7 +651,7 @@ nsHTMLLegendAccessible::GetRelationByType(PRUint32 aRelationType,
if (aRelationType == nsIAccessibleRelation::RELATION_LABEL_FOR) {
// Look for groupbox parent
nsAccessible* groupbox = GetParent();
nsAccessible* groupbox = Parent();
if (groupbox && groupbox->Role() == nsIAccessibleRole::ROLE_GROUPING) {
// XXX: if group box exposes more than one relation of the given type