bug 1241453 - allow constructing xpcAccessibles with proxies r=davidb

This commit is contained in:
Trevor Saunders 2016-01-19 09:47:52 -05:00
Родитель 73bf84da55
Коммит 78f1ab8c9d
6 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -27,6 +27,9 @@ public:
explicit xpcAccessibleDocument(DocAccessible* aIntl) : explicit xpcAccessibleDocument(DocAccessible* aIntl) :
xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength) { } xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength) { }
xpcAccessibleDocument(ProxyAccessible* aProxy, uint32_t aInterfaces) :
xpcAccessibleHyperText(aProxy, aInterfaces), mCache(kDefaultCacheLength) {}
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(xpcAccessibleDocument, NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(xpcAccessibleDocument,
xpcAccessibleGeneric) xpcAccessibleGeneric)

Просмотреть файл

@ -38,6 +38,20 @@ public:
mSupportedIfaces |= eHyperLink; mSupportedIfaces |= eHyperLink;
} }
xpcAccessibleGeneric(ProxyAccessible* aProxy, uint32_t aInterfaces) :
mIntl(aProxy)
{
if (aInterfaces & Interfaces::SELECTION) {
mSupportedIfaces |= eSelectable;
}
if (aInterfaces & Interfaces::VALUE) {
mSupportedIfaces |= eValue;
}
if (aInterfaces & Interfaces::HYPERLINK) {
mSupportedIfaces |= eHyperLink;
}
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(xpcAccessibleGeneric, nsIAccessible) NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(xpcAccessibleGeneric, nsIAccessible)

Просмотреть файл

@ -30,6 +30,9 @@ public:
mSupportedIfaces |= eText; mSupportedIfaces |= eText;
} }
xpcAccessibleHyperText(ProxyAccessible* aProxy, uint32_t aInterfaces) :
xpcAccessibleGeneric(aProxy, aInterfaces) { mSupportedIfaces |= eText; }
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETEXT NS_DECL_NSIACCESSIBLETEXT

Просмотреть файл

@ -21,6 +21,9 @@ public:
explicit xpcAccessibleImage(Accessible* aIntl) : explicit xpcAccessibleImage(Accessible* aIntl) :
xpcAccessibleGeneric(aIntl) { } xpcAccessibleGeneric(aIntl) { }
xpcAccessibleImage(ProxyAccessible* aProxy, uint32_t aInterfaces) :
xpcAccessibleGeneric(aProxy, aInterfaces) {}
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetImagePosition(uint32_t aCoordType, NS_IMETHOD GetImagePosition(uint32_t aCoordType,

Просмотреть файл

@ -23,6 +23,9 @@ public:
explicit xpcAccessibleTable(Accessible* aIntl) : explicit xpcAccessibleTable(Accessible* aIntl) :
xpcAccessibleGeneric(aIntl) { } xpcAccessibleGeneric(aIntl) { }
xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces) :
xpcAccessibleGeneric(aProxy, aInterfaces) {}
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
// nsIAccessibleTable // nsIAccessibleTable

Просмотреть файл

@ -24,6 +24,9 @@ public:
explicit xpcAccessibleTableCell(Accessible* aIntl) : explicit xpcAccessibleTableCell(Accessible* aIntl) :
xpcAccessibleHyperText(aIntl) { } xpcAccessibleHyperText(aIntl) { }
xpcAccessibleTableCell(ProxyAccessible* aProxy, uint32_t aInterfaces) :
xpcAccessibleHyperText(aProxy, aInterfaces) {}
NS_DECL_ISUPPORTS_INHERITED NS_DECL_ISUPPORTS_INHERITED
// nsIAccessibleTableCell // nsIAccessibleTableCell