зеркало из https://github.com/mozilla/pjs.git
Bug 372131 - nsLinkableAccessible/nsTextAccessible shouldn't be inherited from nsHyperTextAccessbile, r=davidb
This commit is contained in:
Родитель
aaeca79739
Коммит
b47512d0ee
|
@ -109,14 +109,14 @@ nsLeafAccessible::GetChildAtPoint(PRInt32 aX, PRInt32 aY,
|
|||
|
||||
nsLinkableAccessible::
|
||||
nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aNode, aShell),
|
||||
nsAccessibleWrap(aNode, aShell),
|
||||
mActionContent(nsnull),
|
||||
mIsLink(PR_FALSE),
|
||||
mIsOnclick(PR_FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsLinkableAccessible, nsHyperTextAccessibleWrap)
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsLinkableAccessible, nsAccessibleWrap)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsLinkableAccessible. nsIAccessible
|
||||
|
@ -128,14 +128,13 @@ nsLinkableAccessible::TakeFocus()
|
|||
if (actionAcc)
|
||||
return actionAcc->TakeFocus();
|
||||
|
||||
return nsHyperTextAccessibleWrap::TakeFocus();
|
||||
return nsAccessibleWrap::TakeFocus();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsLinkableAccessible::GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState)
|
||||
{
|
||||
nsresult rv = nsHyperTextAccessibleWrap::GetStateInternal(aState,
|
||||
aExtraState);
|
||||
nsresult rv = nsAccessibleWrap::GetStateInternal(aState, aExtraState);
|
||||
NS_ENSURE_A11Y_SUCCESS(rv, rv);
|
||||
|
||||
if (mIsLink) {
|
||||
|
@ -153,7 +152,7 @@ nsLinkableAccessible::GetValue(nsAString& aValue)
|
|||
{
|
||||
aValue.Truncate();
|
||||
|
||||
nsHyperTextAccessible::GetValue(aValue);
|
||||
nsAccessible::GetValue(aValue);
|
||||
if (!aValue.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
|
@ -206,7 +205,7 @@ nsLinkableAccessible::DoAction(PRUint8 aIndex)
|
|||
if (actionAcc)
|
||||
return actionAcc->DoAction(aIndex);
|
||||
|
||||
return nsHyperTextAccessibleWrap::DoAction(aIndex);
|
||||
return nsAccessibleWrap::DoAction(aIndex);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -250,14 +249,14 @@ nsresult
|
|||
nsLinkableAccessible::Init()
|
||||
{
|
||||
CacheActionContent();
|
||||
return nsHyperTextAccessibleWrap::Init();
|
||||
return nsAccessibleWrap::Init();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsLinkableAccessible::Shutdown()
|
||||
{
|
||||
mActionContent = nsnull;
|
||||
return nsHyperTextAccessibleWrap::Shutdown();
|
||||
return nsAccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -75,11 +75,12 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* A type of accessible for DOM nodes containing an href="" attribute.
|
||||
* It knows how to report the state of the link ( traveled or not )
|
||||
* and can activate ( click ) the link programmatically.
|
||||
*/
|
||||
class nsLinkableAccessible : public nsHyperTextAccessibleWrap
|
||||
* Used for text or image accessible nodes contained by link accessibles or
|
||||
* accessibles for nodes with registered click event handler. It knows how to
|
||||
* report the state of the host link (traveled or not) and can activate (click)
|
||||
* the host accessible programmatically.
|
||||
*/
|
||||
class nsLinkableAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
enum { eAction_Jump = 0 };
|
||||
|
@ -96,7 +97,7 @@ public:
|
|||
NS_IMETHOD TakeFocus();
|
||||
NS_IMETHOD GetKeyboardShortcut(nsAString& _retval);
|
||||
|
||||
// nsIHyperLinkAccessible
|
||||
// nsIAccessibleHyperLink
|
||||
NS_IMETHOD GetURI(PRInt32 i, nsIURI **aURI);
|
||||
|
||||
// nsAccessNode
|
||||
|
|
|
@ -50,12 +50,6 @@ nsLinkableAccessible(aDOMNode, aShell)
|
|||
{
|
||||
}
|
||||
|
||||
// Make sure we don't support text or other irrelevant interfaces.
|
||||
// We have nsLinkableAccessible in our inheritance chain as a convenience in order to
|
||||
// get link actions and states on the text accessibles. Windows screen readers expect that.
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsTextAccessible, nsAccessNode,
|
||||
nsAccessible, nsIAccessible)
|
||||
|
||||
/**
|
||||
* We are text
|
||||
*/
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
class nsTextAccessible : public nsLinkableAccessible
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
|
||||
// nsIAccessible
|
||||
|
|
|
@ -57,6 +57,8 @@ nsTextAccessibleWrap(aDomNode, aShell)
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTextAccessible, nsTextAccessible)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTextAccessible::GetName(nsAString& aName)
|
||||
{
|
||||
|
|
|
@ -51,6 +51,9 @@ class nsHTMLTextAccessible : public nsTextAccessibleWrap
|
|||
public:
|
||||
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
|
||||
|
|
|
@ -44,6 +44,6 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLImageAccessibleWrap,
|
|||
nsHTMLImageAccessible)
|
||||
|
||||
IMPL_IUNKNOWN_INHERITED1(nsHTMLImageAccessibleWrap,
|
||||
nsHyperTextAccessibleWrap,
|
||||
nsAccessibleWrap,
|
||||
CAccessibleImage);
|
||||
|
||||
|
|
|
@ -41,11 +41,8 @@
|
|||
#define _nsXULTextAccessible_H_
|
||||
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
#include "nsTextAccessibleWrap.h"
|
||||
#include "nsHyperTextAccessibleWrap.h"
|
||||
|
||||
class nsIWeakReference;
|
||||
|
||||
class nsXULTextAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче