Bug 280156: Menuitem description not exposed, patch by Mark Pilgrim <pilgrim@gmail.com>, r=aaronlev, sr=neil

This commit is contained in:
gavin%gavinsharp.com 2006-04-19 15:11:51 +00:00
parent bccc7549d5
commit 34abf69430
2 changed files with 12 additions and 0 deletions

View File

@ -120,6 +120,17 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetName(nsAString& _retval)
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetDescription(nsAString& aDescription)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (!element) {
return NS_ERROR_FAILURE;
}
element->GetAttribute(NS_LITERAL_STRING("description"), aDescription);
return NS_OK;
}
//return menu accesskey: N or Alt+F
NS_IMETHODIMP nsXULMenuitemAccessible::GetKeyboardShortcut(nsAString& _retval)
{

View File

@ -50,6 +50,7 @@ class nsXULMenuitemAccessible : public nsAccessibleWrap
public:
nsXULMenuitemAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetDescription(nsAString& aDescription);
NS_IMETHOD GetKeyboardShortcut(nsAString& _retval);
NS_IMETHOD GetKeyBinding(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);