mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 762038 - Get rid of HyperTextAccessible CID. r=tbsaunde
This commit is contained in:
parent
e2c721d1b9
commit
79cf139ded
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -324,9 +324,8 @@ HTMLTextFieldAccessible::
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(HTMLTextFieldAccessible,
|
||||
Accessible,
|
||||
HyperTextAccessible,
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(HTMLTextFieldAccessible,
|
||||
Accessible,
|
||||
nsIAccessibleText,
|
||||
nsIAccessibleEditableText)
|
||||
|
||||
|
@ -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];
|
||||
|
||||
|
@ -119,9 +119,8 @@ nsXFormsInputAccessible::
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible,
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsXFormsInputAccessible,
|
||||
Accessible,
|
||||
HyperTextAccessible,
|
||||
nsIAccessibleText,
|
||||
nsIAccessibleEditableText)
|
||||
|
||||
|
@ -685,9 +685,8 @@ XULTextFieldAccessible::
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(XULTextFieldAccessible,
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(XULTextFieldAccessible,
|
||||
Accessible,
|
||||
HyperTextAccessible,
|
||||
nsIAccessibleText,
|
||||
nsIAccessibleEditableText)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user