зеркало из https://github.com/mozilla/pjs.git
Bug 739883 - decomtaminate impl of GetSummary() on accessible tables, r=tbsaunde, f=surkov
This commit is contained in:
Родитель
a95dfe282e
Коммит
eb14d6807c
|
@ -84,18 +84,6 @@ ARIAGridAccessible::Shutdown()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIAccessibleTable
|
||||
|
||||
NS_IMETHODIMP
|
||||
ARIAGridAccessible::GetSummary(nsAString& aSummary)
|
||||
{
|
||||
aSummary.Truncate();
|
||||
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// XXX: should be pointed by aria-describedby on grid?
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ARIAGridAccessible::GetColumnCount(PRInt32* aColumnCount)
|
||||
{
|
||||
|
|
|
@ -554,13 +554,13 @@ nsHTMLTableAccessible::Caption()
|
|||
return child && child->Role() == roles::CAPTION ? child : nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::GetSummary(nsAString &aSummary)
|
||||
void
|
||||
nsHTMLTableAccessible::Summary(nsString& aSummary)
|
||||
{
|
||||
nsCOMPtr<nsIDOMHTMLTableElement> table(do_QueryInterface(mContent));
|
||||
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
|
||||
|
||||
return table->GetSummary(aSummary);
|
||||
|
||||
if (table)
|
||||
table->GetSummary(aSummary);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -129,6 +129,7 @@ public:
|
|||
|
||||
// TableAccessible
|
||||
virtual nsAccessible* Caption();
|
||||
virtual void Summary(nsString& aSummary);
|
||||
virtual bool IsProbablyLayoutTable();
|
||||
|
||||
// nsAccessNode
|
||||
|
|
|
@ -21,6 +21,19 @@ xpcAccessibleTable::GetCaption(nsIAccessible** aCaption)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
xpcAccessibleTable::GetSummary(nsAString& aSummary)
|
||||
{
|
||||
if (!mTable)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString summary;
|
||||
mTable->Summary(summary);
|
||||
aSummary.Assign(summary);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
xpcAccessibleTable::IsProbablyForLayout(bool* aResult)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_
|
||||
#define MOZILLA_A11Y_XPCOM_XPACCESSIBLETABLE_H_
|
||||
|
||||
#include "nsAString.h"
|
||||
#include "nscore.h"
|
||||
|
||||
class nsIAccessible;
|
||||
|
@ -22,6 +23,7 @@ public:
|
|||
xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { }
|
||||
|
||||
nsresult GetCaption(nsIAccessible** aCaption);
|
||||
nsresult GetSummary(nsAString& aSummary);
|
||||
nsresult IsProbablyForLayout(bool* aIsForLayout);
|
||||
|
||||
protected:
|
||||
|
@ -31,7 +33,8 @@ protected:
|
|||
#define NS_DECL_OR_FORWARD_NSIACCESSIBLETABLE_WITH_XPCACCESSIBLETABLE \
|
||||
NS_IMETHOD GetCaption(nsIAccessible** aCaption) \
|
||||
{ return xpcAccessibleTable::GetCaption(aCaption); } \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetSummary(nsAString & aSummary); \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetSummary(nsAString & aSummary) \
|
||||
{ return xpcAccessibleTable::GetSummary(aSummary); } \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetColumnCount(PRInt32 *aColumnCount); \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetRowCount(PRInt32 *aRowCount); \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetCellAt(PRInt32 rowIndex, PRInt32 columnIndex, nsIAccessible * *_retval NS_OUTPARAM); \
|
||||
|
|
|
@ -241,14 +241,6 @@ nsXULListboxAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULListboxAccessible. nsIAccessibleTable
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULListboxAccessible::GetSummary(nsAString &aSummary)
|
||||
{
|
||||
aSummary.Truncate();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULListboxAccessible::GetColumnCount(PRInt32 *aColumnsCout)
|
||||
{
|
||||
|
|
|
@ -72,13 +72,6 @@ NS_IMPL_ISUPPORTS_INHERITED1(nsXULTreeGridAccessible,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeGridAccessible: nsIAccessibleTable implementation
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridAccessible::GetSummary(nsAString &aSummary)
|
||||
{
|
||||
aSummary.Truncate();
|
||||
return IsDefunct() ? NS_ERROR_FAILURE : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridAccessible::GetColumnCount(PRInt32 *aColumnCount)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче