Bug 428957. Calculate group position and checkable for options and radio buttons. r=surkov, a=beltzner
authoraaronleventhal@moonset.net
Tue, 15 Apr 2008 01:50:15 -0700
changeset 14335 38f1f4832d5cd6cf884a69c07f2ee380b8f101a7
parent 14334 4ee923f0aa1f46a304a2c3589c7cfd10d979eb26
child 14336 bd2afa077f6ed999915d6af5321df938ac9c00c7
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov, beltzner
bugs428957
milestone1.9pre
Bug 428957. Calculate group position and checkable for options and radio buttons. r=surkov, a=beltzner
accessible/src/base/nsAccessible.cpp
--- a/accessible/src/base/nsAccessible.cpp
+++ b/accessible/src/base/nsAccessible.cpp
@@ -2051,16 +2051,19 @@ nsAccessible::GetAttributes(nsIPersisten
   }
 
 
   PRUint32 role = Role(this);
   if (role == nsIAccessibleRole::ROLE_CHECKBUTTON ||
       role == nsIAccessibleRole::ROLE_PUSHBUTTON ||
       role == nsIAccessibleRole::ROLE_MENUITEM ||
       role == nsIAccessibleRole::ROLE_LISTITEM ||
+      role == nsIAccessibleRole::ROLE_OPTION ||
+      role == nsIAccessibleRole::ROLE_RADIOBUTTON ||
+      role == nsIAccessibleRole::ROLE_RICH_OPTION ||
       role == nsIAccessibleRole::ROLE_OUTLINEITEM ||
       content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_checked)) {
     // Might be checkable -- checking role & ARIA attribute first is faster than getting state
     PRUint32 state = 0;
     GetFinalState(&state, nsnull);
     if (state & nsIAccessibleStates::STATE_CHECKABLE) {
       // No official state for checkable, so use object attribute to expose that
       attributes->SetStringProperty(NS_LITERAL_CSTRING("checkable"), NS_LITERAL_STRING("true"),
@@ -2075,16 +2078,18 @@ nsAccessible::GetAttributes(nsIPersisten
     // these properties to map them into description.
 
     // If accessible is invisible we don't want to calculate group ARIA
     // attributes for it.
     if ((role == nsIAccessibleRole::ROLE_LISTITEM ||
         role == nsIAccessibleRole::ROLE_MENUITEM ||
         role == nsIAccessibleRole::ROLE_RADIOBUTTON ||
         role == nsIAccessibleRole::ROLE_PAGETAB ||
+        role == nsIAccessibleRole::ROLE_OPTION ||
+        role == nsIAccessibleRole::ROLE_RADIOBUTTON ||
         role == nsIAccessibleRole::ROLE_OUTLINEITEM) &&
         0 == (State(this) & nsIAccessibleStates::STATE_INVISIBLE)) {
       nsCOMPtr<nsIAccessible> parent = GetParent();
       NS_ENSURE_TRUE(parent, NS_ERROR_FAILURE);
 
       PRInt32 positionInGroup = 0;
       PRInt32 setSize = 0;