mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 575109 - don't unnecessarily inherit from nsISupports (vtable bloat), r=surkov, davidb
This commit is contained in:
parent
1b2bbba526
commit
13e6bbb1a4
@ -72,7 +72,7 @@ CAccessibleAction::nActions(long *aNumActions)
|
||||
__try {
|
||||
*aNumActions = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -92,7 +92,7 @@ STDMETHODIMP
|
||||
CAccessibleAction::doAction(long aActionIndex)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -110,7 +110,7 @@ CAccessibleAction::get_description(long aActionIndex, BSTR *aDescription)
|
||||
__try {
|
||||
*aDescription = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -140,7 +140,7 @@ __try {
|
||||
*aKeyBinding = NULL;
|
||||
*aNumBinding = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -197,7 +197,7 @@ CAccessibleAction::get_name(long aActionIndex, BSTR *aName)
|
||||
__try {
|
||||
*aName = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
|
@ -45,8 +45,7 @@
|
||||
|
||||
#include "AccessibleAction.h"
|
||||
|
||||
class CAccessibleAction: public nsISupports,
|
||||
public IAccessibleAction
|
||||
class CAccessibleAction: public IAccessibleAction
|
||||
{
|
||||
public:
|
||||
|
||||
@ -78,6 +77,9 @@ public:
|
||||
/* [in] */ long actionIndex,
|
||||
/* [retval][out] */ BSTR *localizedName);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ __try {
|
||||
*aX = 0;
|
||||
*aY = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -160,7 +160,7 @@ CAccessibleComponent::GetARGBValueFromCSSProperty(const nsAString& aPropName,
|
||||
__try {
|
||||
*aColorValue = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessNode> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessNode> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
|
@ -45,8 +45,7 @@
|
||||
|
||||
#include "AccessibleComponent.h"
|
||||
|
||||
class CAccessibleComponent: public nsISupports,
|
||||
public IAccessibleComponent
|
||||
class CAccessibleComponent: public IAccessibleComponent
|
||||
{
|
||||
public:
|
||||
|
||||
@ -64,6 +63,9 @@ public:
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_background(
|
||||
/* [retval][out] */ IA2Color *background);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "nsString.h"
|
||||
|
||||
#define GET_NSIACCESSIBLEEDITABLETEXT \
|
||||
nsCOMPtr<nsIAccessibleEditableText> textAcc(do_QueryInterface(this));\
|
||||
nsCOMPtr<nsIAccessibleEditableText> textAcc(do_QueryObject(this));\
|
||||
NS_ASSERTION(textAcc,\
|
||||
"Subclass of CAccessibleEditableText doesn't implement nsIAccessibleEditableText");\
|
||||
if (!textAcc)\
|
||||
@ -62,7 +62,7 @@ CAccessibleEditableText::QueryInterface(REFIID iid, void** ppv)
|
||||
*ppv = NULL;
|
||||
|
||||
if (IID_IAccessibleEditableText == iid) {
|
||||
nsCOMPtr<nsIAccessibleEditableText> editTextAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleEditableText> editTextAcc(do_QueryObject(this));
|
||||
if (!editTextAcc)
|
||||
return E_NOINTERFACE;
|
||||
*ppv = static_cast<IAccessibleEditableText*>(this);
|
||||
|
@ -46,8 +46,7 @@
|
||||
|
||||
#include "AccessibleEditableText.h"
|
||||
|
||||
class CAccessibleEditableText: public nsISupports,
|
||||
public IAccessibleEditableText
|
||||
class CAccessibleEditableText: public IAccessibleEditableText
|
||||
{
|
||||
public:
|
||||
|
||||
@ -83,6 +82,9 @@ public:
|
||||
/* [in] */ long startOffset,
|
||||
/* [in] */ long endOffset,
|
||||
/* [in] */ BSTR *attributes);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -62,7 +62,7 @@ CAccessibleHyperlink::QueryInterface(REFIID iid, void** ppv)
|
||||
*ppv = NULL;
|
||||
|
||||
if (IID_IAccessibleHyperlink == iid) {
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
@ -82,7 +82,7 @@ CAccessibleHyperlink::get_anchor(long aIndex, VARIANT *aAnchor)
|
||||
__try {
|
||||
VariantInit(aAnchor);
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -115,7 +115,7 @@ CAccessibleHyperlink::get_anchorTarget(long aIndex, VARIANT *aAnchorTarget)
|
||||
__try {
|
||||
VariantInit(aAnchorTarget);
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -153,7 +153,7 @@ CAccessibleHyperlink::get_startIndex(long *aIndex)
|
||||
__try {
|
||||
*aIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -175,7 +175,7 @@ CAccessibleHyperlink::get_endIndex(long *aIndex)
|
||||
__try {
|
||||
*aIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -197,7 +197,7 @@ CAccessibleHyperlink::get_valid(boolean *aValid)
|
||||
__try {
|
||||
*aValid = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperLink> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
|
@ -74,6 +74,9 @@ public:
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_valid(
|
||||
/* [retval][out] */ boolean *valid);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -51,7 +51,7 @@ CAccessibleHypertext::QueryInterface(REFIID iid, void** ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
if (IID_IAccessibleHypertext == iid) {
|
||||
nsCOMPtr<nsIAccessibleHyperText> hyperAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperText> hyperAcc(do_QueryObject(this));
|
||||
if (!hyperAcc)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
@ -117,7 +117,7 @@ CAccessibleHypertext::get_hyperlinkIndex(long aCharIndex, long *aHyperlinkIndex)
|
||||
__try {
|
||||
*aHyperlinkIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleHyperText> hyperAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleHyperText> hyperAcc(do_QueryObject(this));
|
||||
if (!hyperAcc)
|
||||
return E_FAIL;
|
||||
|
||||
|
@ -58,7 +58,7 @@ CAccessibleImage::QueryInterface(REFIID iid, void** ppv)
|
||||
*ppv = NULL;
|
||||
|
||||
if (IID_IAccessibleImage == iid) {
|
||||
nsCOMPtr<nsIAccessibleImage> imageAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleImage> imageAcc(do_QueryObject(this));
|
||||
if (!imageAcc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -78,7 +78,7 @@ CAccessibleImage::get_description(BSTR *aDescription)
|
||||
__try {
|
||||
*aDescription = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessible> acc(do_QueryObject(this));
|
||||
if (!acc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -110,7 +110,7 @@ __try {
|
||||
nsIAccessibleCoordinateType::COORDTYPE_SCREEN_RELATIVE :
|
||||
nsIAccessibleCoordinateType::COORDTYPE_PARENT_RELATIVE;
|
||||
|
||||
nsCOMPtr<nsIAccessibleImage> imageAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleImage> imageAcc(do_QueryObject(this));
|
||||
if (!imageAcc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -135,7 +135,7 @@ __try {
|
||||
*aHeight = 0;
|
||||
*aWidth = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleImage> imageAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleImage> imageAcc(do_QueryObject(this));
|
||||
if (!imageAcc)
|
||||
return E_FAIL;
|
||||
|
||||
|
@ -45,8 +45,7 @@
|
||||
|
||||
#include "AccessibleImage.h"
|
||||
|
||||
class CAccessibleImage: public nsISupports,
|
||||
public IAccessibleImage
|
||||
class CAccessibleImage: public IAccessibleImage
|
||||
{
|
||||
public:
|
||||
|
||||
@ -66,6 +65,9 @@ public:
|
||||
/* [out] */ long *height,
|
||||
/* [retval][out] */ long *width);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ CAccessibleTable::get_accessibleAt(long aRow, long aColumn,
|
||||
__try {
|
||||
*aAccessible = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -120,7 +120,7 @@ CAccessibleTable::get_caption(IUnknown **aAccessible)
|
||||
__try {
|
||||
*aAccessible = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -156,7 +156,7 @@ CAccessibleTable::get_childIndex(long aRowIndex, long aColumnIndex,
|
||||
__try {
|
||||
*aChildIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -180,7 +180,7 @@ CAccessibleTable::get_columnDescription(long aColumn, BSTR *aDescription)
|
||||
__try {
|
||||
*aDescription = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -207,7 +207,7 @@ CAccessibleTable::get_columnExtentAt(long aRow, long aColumn,
|
||||
__try {
|
||||
*nColumnsSpanned = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -243,7 +243,7 @@ CAccessibleTable::get_columnIndex(long aChildIndex, long *aColumnIndex)
|
||||
__try {
|
||||
*aColumnIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -267,7 +267,7 @@ CAccessibleTable::get_nColumns(long *aColumnCount)
|
||||
__try {
|
||||
*aColumnCount = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -291,7 +291,7 @@ CAccessibleTable::get_nRows(long *aRowCount)
|
||||
__try {
|
||||
*aRowCount = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -315,7 +315,7 @@ CAccessibleTable::get_nSelectedChildren(long *aChildCount)
|
||||
__try {
|
||||
*aChildCount = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -338,7 +338,7 @@ CAccessibleTable::get_nSelectedColumns(long *aColumnCount)
|
||||
__try {
|
||||
*aColumnCount = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -361,7 +361,7 @@ CAccessibleTable::get_nSelectedRows(long *aRowCount)
|
||||
__try {
|
||||
*aRowCount = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -384,7 +384,7 @@ CAccessibleTable::get_rowDescription(long aRow, BSTR *aDescription)
|
||||
__try {
|
||||
*aDescription = NULL;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -410,7 +410,7 @@ CAccessibleTable::get_rowExtentAt(long aRow, long aColumn, long *aNRowsSpanned)
|
||||
__try {
|
||||
*aNRowsSpanned = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -446,7 +446,7 @@ CAccessibleTable::get_rowIndex(long aChildIndex, long *aRowIndex)
|
||||
__try {
|
||||
*aRowIndex = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -520,7 +520,7 @@ CAccessibleTable::get_isColumnSelected(long aColumn, boolean *aIsSelected)
|
||||
__try {
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -543,7 +543,7 @@ CAccessibleTable::get_isRowSelected(long aRow, boolean *aIsSelected)
|
||||
__try {
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -566,7 +566,7 @@ CAccessibleTable::get_isSelected(long aRow, long aColumn, boolean *aIsSelected)
|
||||
__try {
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -587,7 +587,7 @@ STDMETHODIMP
|
||||
CAccessibleTable::selectRow(long aRow)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -603,7 +603,7 @@ STDMETHODIMP
|
||||
CAccessibleTable::selectColumn(long aColumn)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -619,7 +619,7 @@ STDMETHODIMP
|
||||
CAccessibleTable::unselectRow(long aRow)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -635,7 +635,7 @@ STDMETHODIMP
|
||||
CAccessibleTable::unselectColumn(long aColumn)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -661,7 +661,7 @@ __try {
|
||||
*aColumnExtents = 0;
|
||||
*aIsSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -730,7 +730,7 @@ STDMETHODIMP
|
||||
CAccessibleTable::get_selectedCells(IUnknown ***cells, long *nSelectedCells)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
@ -779,7 +779,7 @@ CAccessibleTable::GetSelectedItems(long **aItems, long *aItemsCount,
|
||||
{
|
||||
*aItemsCount = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTable> tableAcc(do_QueryObject(this));
|
||||
NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG);
|
||||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
|
@ -46,8 +46,7 @@
|
||||
#include "AccessibleTable.h"
|
||||
#include "AccessibleTable2.h"
|
||||
|
||||
class CAccessibleTable: public nsISupports,
|
||||
public IAccessibleTable,
|
||||
class CAccessibleTable: public IAccessibleTable,
|
||||
public IAccessibleTable2
|
||||
{
|
||||
public:
|
||||
@ -195,6 +194,9 @@ public:
|
||||
/* [out, size_is(,*nRows)] */ long **selectedRows,
|
||||
/* [out, retval] */ long *nRows);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
private:
|
||||
enum eItemsType {
|
||||
ITEMSTYPE_CELLS,
|
||||
|
@ -79,7 +79,7 @@ STDMETHODIMP
|
||||
CAccessibleTableCell::get_table(IUnknown **table)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -113,7 +113,7 @@ CAccessibleTableCell::get_columnExtent(long *nColumnsSpanned)
|
||||
__try {
|
||||
*nColumnsSpanned = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -138,7 +138,7 @@ CAccessibleTableCell::get_columnHeaderCells(IUnknown ***cellAccessibles,
|
||||
long *nColumnHeaderCells)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -163,7 +163,7 @@ CAccessibleTableCell::get_columnIndex(long *columnIndex)
|
||||
__try {
|
||||
*columnIndex = -1;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -189,7 +189,7 @@ CAccessibleTableCell::get_rowExtent(long *nRowsSpanned)
|
||||
__try {
|
||||
*nRowsSpanned = 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -214,7 +214,7 @@ CAccessibleTableCell::get_rowHeaderCells(IUnknown ***cellAccessibles,
|
||||
long *nRowHeaderCells)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -239,7 +239,7 @@ CAccessibleTableCell::get_rowIndex(long *rowIndex)
|
||||
__try {
|
||||
*rowIndex = -1;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -272,7 +272,7 @@ __try {
|
||||
*columnExtents = 0;
|
||||
*isSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
@ -320,7 +320,7 @@ CAccessibleTableCell::get_isSelected(boolean *isSelected)
|
||||
__try {
|
||||
*isSelected = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCell(do_QueryObject(this));
|
||||
NS_ASSERTION(tableCell, TABLECELL_INTERFACE_UNSUPPORTED_MSG);
|
||||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
|
@ -45,8 +45,7 @@
|
||||
|
||||
#include "AccessibleTableCell.h"
|
||||
|
||||
class CAccessibleTableCell: public nsISupports,
|
||||
public IAccessibleTableCell
|
||||
class CAccessibleTableCell: public IAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
|
||||
@ -87,6 +86,9 @@ public:
|
||||
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_isSelected(
|
||||
/* [out, retval] */ boolean *isSelected);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "nsString.h"
|
||||
|
||||
#define GET_NSIACCESSIBLETEXT \
|
||||
nsCOMPtr<nsIAccessibleText> textAcc(do_QueryInterface(this));\
|
||||
nsCOMPtr<nsIAccessibleText> textAcc(do_QueryObject(this));\
|
||||
NS_ASSERTION(textAcc,\
|
||||
"Subclass of CAccessibleText doesn't implement nsIAccessibleText");\
|
||||
if (!textAcc)\
|
||||
@ -69,7 +69,7 @@ CAccessibleText::QueryInterface(REFIID iid, void** ppv)
|
||||
*ppv = NULL;
|
||||
|
||||
if (IID_IAccessibleText == iid) {
|
||||
nsCOMPtr<nsIAccessibleText> textAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleText> textAcc(do_QueryObject(this));
|
||||
if (!textAcc) {
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
@ -46,8 +46,7 @@
|
||||
|
||||
#include "AccessibleText.h"
|
||||
|
||||
class CAccessibleText: public nsISupports,
|
||||
public IAccessibleText
|
||||
class CAccessibleText: public IAccessibleText
|
||||
{
|
||||
public:
|
||||
|
||||
@ -148,6 +147,9 @@ public:
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_oldText(
|
||||
/* [retval][out] */ IA2TextSegment *oldText);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
protected:
|
||||
virtual nsresult GetModifiedText(PRBool aGetInsertedText, nsAString& aText,
|
||||
PRUint32 *aStartOffset,
|
||||
|
@ -56,7 +56,7 @@ CAccessibleValue::QueryInterface(REFIID iid, void** ppv)
|
||||
*ppv = NULL;
|
||||
|
||||
if (IID_IAccessibleValue == iid) {
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryObject(this));
|
||||
if (!valueAcc)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
@ -76,7 +76,7 @@ CAccessibleValue::get_currentValue(VARIANT *aCurrentValue)
|
||||
__try {
|
||||
VariantInit(aCurrentValue);
|
||||
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryObject(this));
|
||||
if (!valueAcc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -97,7 +97,7 @@ STDMETHODIMP
|
||||
CAccessibleValue::setCurrentValue(VARIANT aValue)
|
||||
{
|
||||
__try {
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryObject(this));
|
||||
if (!valueAcc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -117,7 +117,7 @@ CAccessibleValue::get_maximumValue(VARIANT *aMaximumValue)
|
||||
__try {
|
||||
VariantInit(aMaximumValue);
|
||||
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryObject(this));
|
||||
if (!valueAcc)
|
||||
return E_FAIL;
|
||||
|
||||
@ -140,7 +140,7 @@ CAccessibleValue::get_minimumValue(VARIANT *aMinimumValue)
|
||||
__try {
|
||||
VariantInit(aMinimumValue);
|
||||
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryInterface(this));
|
||||
nsCOMPtr<nsIAccessibleValue> valueAcc(do_QueryObject(this));
|
||||
if (!valueAcc)
|
||||
return E_FAIL;
|
||||
|
||||
|
@ -45,8 +45,7 @@
|
||||
|
||||
#include "AccessibleValue.h"
|
||||
|
||||
class CAccessibleValue: public nsISupports,
|
||||
public IAccessibleValue
|
||||
class CAccessibleValue: public IAccessibleValue
|
||||
{
|
||||
public:
|
||||
|
||||
@ -66,6 +65,9 @@ public:
|
||||
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_minimumValue(
|
||||
/* [retval][out] */ VARIANT *minimumValue);
|
||||
|
||||
// nsISupports
|
||||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user