Bug 762038 - Get rid of HyperTextAccessible CID. r=tbsaunde

This commit is contained in:
Andrew Quartey 2012-06-19 19:01:10 -04:00
parent e2c721d1b9
commit 79cf139ded
7 changed files with 12 additions and 29 deletions

View File

@ -155,7 +155,11 @@ nsAccessiblePivot::SetTextRange(nsIAccessibleText* aTextAccessible,
(aStartOffset >= 0 || (aStartOffset != -1 && aEndOffset != -1)),
NS_ERROR_INVALID_ARG);
nsRefPtr<HyperTextAccessible> newPosition = do_QueryObject(aTextAccessible);
nsRefPtr<Accessible> acc(do_QueryObject(aTextAccessible));
if (!acc)
return NS_ERROR_INVALID_ARG;
HyperTextAccessible* newPosition = acc->AsHyperText();
if (!newPosition || !IsRootDescendant(newPosition))
return NS_ERROR_INVALID_ARG;
@ -170,7 +174,7 @@ nsAccessiblePivot::SetTextRange(nsIAccessibleText* aTextAccessible,
mEndOffset = aEndOffset;
nsRefPtr<Accessible> oldPosition = mPosition.forget();
mPosition = newPosition.forget();
mPosition = newPosition;
NotifyOfPivotChange(oldPosition, oldStart, oldEnd);

View File

@ -55,12 +55,6 @@ HyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
*aInstancePtr = nsnull;
if (aIID.Equals(NS_GET_IID(HyperTextAccessible))) {
*aInstancePtr = static_cast<HyperTextAccessible*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
// ARIA roles that these interfaces are not appropriate for.
if (!IsTextRole())
return Accessible::QueryInterface(aIID, aInstancePtr);

View File

@ -24,14 +24,6 @@ const PRUnichar kEmbeddedObjectChar = 0xfffc;
const PRUnichar kImaginaryEmbeddedObjectChar = ' ';
const PRUnichar kForcedNewLineChar = '\n';
#define NS_HYPERTEXTACCESSIBLE_IMPL_CID \
{ /* 245f3bc9-224f-4839-a92e-95239705f30b */ \
0x245f3bc9, \
0x224f, \
0x4839, \
{ 0xa9, 0x2e, 0x95, 0x23, 0x97, 0x05, 0xf3, 0x0b } \
}
/**
* Special Accessible that knows how contain both text and embedded objects
*/
@ -48,7 +40,6 @@ public:
NS_DECL_NSIACCESSIBLETEXT
NS_DECL_NSIACCESSIBLEHYPERTEXT
NS_DECL_NSIACCESSIBLEEDITABLETEXT
NS_DECLARE_STATIC_IID_ACCESSOR(NS_HYPERTEXTACCESSIBLE_IMPL_CID)
// Accessible
virtual PRInt32 GetLevelInternal();
@ -410,9 +401,6 @@ private:
nsTArray<PRUint32> mOffsets;
};
NS_DEFINE_STATIC_IID_ACCESSOR(HyperTextAccessible,
NS_HYPERTEXTACCESSIBLE_IMPL_CID)
////////////////////////////////////////////////////////////////////////////////
// Accessible downcasting method

View File

@ -324,9 +324,8 @@ HTMLTextFieldAccessible::
{
}
NS_IMPL_ISUPPORTS_INHERITED3(HTMLTextFieldAccessible,
Accessible,
HyperTextAccessible,
NS_IMPL_ISUPPORTS_INHERITED2(HTMLTextFieldAccessible,
Accessible,
nsIAccessibleText,
nsIAccessibleEditableText)

View File

@ -57,7 +57,7 @@ ToNSString(id aValue)
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
if ((self = [super initWithAccessible:accessible])) {
CallQueryInterface(accessible, &mGeckoTextAccessible);
mGeckoTextAccessible = accessible->AsHyperText();
CallQueryInterface(accessible, &mGeckoEditableTextAccessible);
}
return self;
@ -312,7 +312,7 @@ ToNSString(id aValue)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
NS_IF_RELEASE(mGeckoTextAccessible);
mGeckoTextAccessible = nsnull;
NS_IF_RELEASE(mGeckoEditableTextAccessible);
[super expire];

View File

@ -119,9 +119,8 @@ nsXFormsInputAccessible::
{
}
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible,
NS_IMPL_ISUPPORTS_INHERITED2(nsXFormsInputAccessible,
Accessible,
HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)

View File

@ -685,9 +685,8 @@ XULTextFieldAccessible::
{
}
NS_IMPL_ISUPPORTS_INHERITED3(XULTextFieldAccessible,
NS_IMPL_ISUPPORTS_INHERITED2(XULTextFieldAccessible,
Accessible,
HyperTextAccessible,
nsIAccessibleText,
nsIAccessibleEditableText)