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
Родитель 4bfbb7d8e4
Коммит 47beeb27b7
4 изменённых файлов: 6 добавлений и 40 удалений

Просмотреть файл

@ -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,

Просмотреть файл

@ -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[];
};

Просмотреть файл

@ -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;
}
}

Просмотреть файл

@ -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
}