зеркало из https://github.com/mozilla/pjs.git
Bug 394115. Hang under accessibility code. r=ginn.chen, a=dsicore
This commit is contained in:
Родитель
f110633aab
Коммит
93f8632057
|
@ -373,6 +373,8 @@ nsHyperTextAccessibleWrap(aNode, aShell)
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsHTMLTextFieldAccessible, nsAccessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText)
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetRole(PRUint32 *aRole)
|
||||
{
|
||||
*aRole = nsIAccessibleRole::ROLE_ENTRY;
|
||||
|
|
|
@ -104,6 +104,8 @@ public:
|
|||
|
||||
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
NS_IMETHOD GetRole(PRUint32 *_retval);
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
NS_IMETHOD GetValue(nsAString& _retval);
|
||||
|
|
|
@ -84,7 +84,7 @@ nsLinkableAccessible(aDOMNode, aShell), mAccessNodeCache(nsnull)
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLImageAccessible, nsLinkableAccessible, nsIAccessibleImage)
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLImageAccessible, nsAccessible, nsIAccessibleImage)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLImageAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
|
||||
|
|
|
@ -91,10 +91,10 @@ nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePt
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRUint32 role = Role(this);
|
||||
if (role == nsIAccessibleRole::ROLE_GRAPHIC ||
|
||||
role == nsIAccessibleRole::ROLE_IMAGE_MAP ||
|
||||
role == nsIAccessibleRole::ROLE_TEXT_LEAF) {
|
||||
if (mRoleMapEntry &&
|
||||
(mRoleMapEntry->role == nsIAccessibleRole::ROLE_GRAPHIC ||
|
||||
mRoleMapEntry->role == nsIAccessibleRole::ROLE_IMAGE_MAP)) {
|
||||
// ARIA roles that these interfaces are not appropriate for
|
||||
return nsAccessible::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
|
@ -105,15 +105,6 @@ nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePt
|
|||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessibleHyperText))) {
|
||||
if (role == nsIAccessibleRole::ROLE_ENTRY ||
|
||||
role == nsIAccessibleRole::ROLE_PASSWORD_TEXT) {
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
GetAssociatedEditor(getter_AddRefs(editor));
|
||||
nsCOMPtr<nsIPlaintextEditor> peditor(do_QueryInterface(editor));
|
||||
if (peditor) {
|
||||
return NS_ERROR_NO_INTERFACE; // No embedded objects ever in plain text
|
||||
}
|
||||
}
|
||||
*aInstancePtr = static_cast<nsIAccessibleHyperText*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
|
|
|
@ -150,6 +150,8 @@ nsXFormsInputAccessible::
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible, nsAccessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXFormsInputAccessible::GetRole(PRUint32 *aRole)
|
||||
{
|
||||
|
|
|
@ -93,6 +93,8 @@ class nsXFormsInputAccessible : public nsXFormsEditableAccessible
|
|||
public:
|
||||
nsXFormsInputAccessible(nsIDOMNode *aNode, nsIWeakReference *aShell);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
NS_IMETHOD GetRole(PRUint32 *aRole);
|
||||
NS_IMETHOD GetNumActions(PRUint8 *aCount);
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
|
|
@ -764,6 +764,8 @@ nsXULTextFieldAccessible::nsXULTextFieldAccessible(nsIDOMNode* aNode, nsIWeakRef
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsXULTextFieldAccessible, nsAccessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText)
|
||||
|
||||
NS_IMETHODIMP nsXULTextFieldAccessible::GetValue(nsAString& aValue)
|
||||
{
|
||||
PRUint32 state;
|
||||
|
|
|
@ -163,6 +163,8 @@ public:
|
|||
|
||||
nsXULTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
|
||||
NS_IMETHOD GetRole(PRUint32 *aRole);
|
||||
|
|
Загрузка…
Ссылка в новой задаче