Backing out bug 414656 until we sort out problems it caused with exposing ARIA roles.

This commit is contained in:
aaronleventhal@moonset.net 2008-02-06 13:43:30 -08:00
parent 034ef625c9
commit 5356cb06c3
4 changed files with 6 additions and 40 deletions

View File

@ -213,15 +213,6 @@ nsRoleMapEntry nsARIAMap::gLandmarkRoleMap = {
kEndEntry
};
nsRoleMapEntry nsARIAMap::gEmptyRoleMap = {
"",
nsIAccessibleRole::ROLE_NOTHING,
eNameLabelOrTitle,
eNoValue,
kNoReqStates,
kEndEntry
};
/**
* Universal states:
* The following state rules are applied to any accessible element,

View File

@ -125,29 +125,9 @@ struct nsRoleMapEntry
*/
struct nsARIAMap
{
/**
* Array of supported ARIA role map entries and its length.
*/
static nsRoleMapEntry gWAIRoleMap[];
static PRUint32 gWAIRoleMapLength;
/**
* Landmark role map entry. Used when specified ARIA role isn't mapped to
* accessibility API.
*/
static nsRoleMapEntry gLandmarkRoleMap;
/**
* Empty role map entry. Used by accessibility service to create an accessible
* if the accessible can't use role of used accessible class. For example,
* it is used for table cells that aren't contained by table.
*/
static nsRoleMapEntry gEmptyRoleMap;
/**
* State map of ARIA states applied to any accessible not depending on
* the role.
*/
static nsStateMapEntry gWAIUnivStateMap[];
};

View File

@ -1450,8 +1450,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
}
if (tableAccessible && nsAccessible::Role(tableAccessible) != nsIAccessibleRole::ROLE_TABLE) {
NS_ASSERTION(!roleMapEntry, "Should not be changing ARIA role, just overriding impl class role");
// Not in table: override role (roleMap entry was null).
roleMapEntry = &nsARIAMap::gEmptyRoleMap;
roleMapEntry = &nsARIAMap::gLandmarkRoleMap; // Not in table: override role (roleMap entry was null)
}
break;
}
@ -1459,8 +1458,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
// Stop before we are fooled by any additional table ancestors
// This table cell frameis part of a separate ancestor table.
NS_ASSERTION(!roleMapEntry, "Should not be changing ARIA role, just overriding impl class role");
// Not in table: override role (roleMap entry was null).
roleMapEntry = &nsARIAMap::gEmptyRoleMap;
roleMapEntry = &nsARIAMap::gLandmarkRoleMap; // Not in table: override role
break;
}
}

View File

@ -1987,13 +1987,10 @@ NS_IMETHODIMP nsAccessible::GetFinalRole(PRUint32 *aRole)
}
}
if (mRoleMapEntry == &nsARIAMap::gEmptyRoleMap) {
// We can now expose ROLE_NOTHING when there is a role map entry, which
// will cause ATK to use ROLE_UNKNOWN and MSAA to use a BSTR role with
// the ARIA role or element's tag. In either case the AT can also use
// the object attributes tag and xml-roles to find out more.
return NS_OK;
}
// We can now expose ROLE_NOTHING when there is a role map entry, which will
// cause ATK to use ROLE_UNKNOWN and MSAA to use a BSTR role with the ARIA role or element's tag.
// In either case the AT can also use the object attributes tag and xml-roles to find out more.
return NS_OK;
}
return mDOMNode ? GetRole(aRole) : NS_ERROR_FAILURE; // Node already shut down
}