Bug 214447. Shorten names in accessibility APIs. r=kyle, sr=alecf

This commit is contained in:
aaronl%netscape.com 2003-07-31 08:09:39 +00:00
Родитель ad909ba8b1
Коммит 328dc604c2
71 изменённых файлов: 1103 добавлений и 1102 удалений

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

@ -75,32 +75,32 @@ interface nsIAccessNode : nsISupports
* @param childNum Zero-based child index
* @return The nth nsIAccessNode child
*/
nsIAccessNode getChildAt(in long childNum);
nsIAccessNode getChildNodeAt(in long childNum);
/**
* The parent nsIAccessNode
*/
readonly attribute nsIAccessNode parent;
readonly attribute nsIAccessNode parentNode;
/**
* The first nsIAccessNode child
*/
readonly attribute nsIAccessNode firstChild;
readonly attribute nsIAccessNode firstChildNode;
/**
* The last nsIAccessNode child
*/
readonly attribute nsIAccessNode lastChild;
readonly attribute nsIAccessNode lastChildNode;
/**
* The previous nsIAccessNode sibling
*/
readonly attribute nsIAccessNode previousSibling;
readonly attribute nsIAccessNode previousSiblingNode;
/**
* The next nsIAccessNode sibling
*/
readonly attribute nsIAccessNode nextSibling;
readonly attribute nsIAccessNode nextSiblingNode;
/**
* The nsIAccessibleDocument that this nsIAccessNode

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

@ -60,91 +60,92 @@ interface nsIAccessible : nsISupports
/**
* Parent node in accessible tree.
*/
readonly attribute nsIAccessible accParent;
readonly attribute nsIAccessible parent;
/**
* Next sibling in accessible tree
*/
readonly attribute nsIAccessible accNextSibling;
readonly attribute nsIAccessible nextSibling;
/**
* Previous sibling in accessible tree
*/
readonly attribute nsIAccessible accPreviousSibling;
readonly attribute nsIAccessible previousSibling;
/**
* First child in accessible tree
*/
readonly attribute nsIAccessible accFirstChild;
readonly attribute nsIAccessible firstChild;
/**
* Last child in accessible tree
*/
readonly attribute nsIAccessible accLastChild;
readonly attribute nsIAccessible lastChild;
/**
* Number of accessible children
*/
readonly attribute long accChildCount;
readonly attribute long childCount;
/**
* Accessible name -- the main text equivalent for this node
*/
attribute AString accName;
attribute AString name;
/**
* Accessible value -- a number or a secondary text equivalent for this node
*/
readonly attribute AString accValue;
readonly attribute AString value;
/**
* Accessible description -- long text associated with this node
*/
readonly attribute AString accDescription;
readonly attribute AString description;
/**
* Provides localized string of accesskey name, such as Alt+D.
* The modifier may be affected by user and platform preferences.
* Usually alt+letter, or just the letter alone for menu items.
*/
readonly attribute AString accKeyboardShortcut;
readonly attribute AString keyboardShortcut;
/**
* First child in accessible tree
* Provides localized string of global keyboard accelerator, such
* as Ctrl+O for Open file
*/
readonly attribute AString accKeybinding;
readonly attribute AString keyBinding;
/**
* Enumerated accessible role. The values depend on platform because of variations.
* See the ROLE_* constants defined later in this file.
*/
readonly attribute unsigned long accRole;
readonly attribute unsigned long role;
/**
* Accessible states -- bit field which describes boolean properties of node.
* See the STATE_* constants defined later in this file.
*/
readonly attribute unsigned long accState;
readonly attribute unsigned long state;
/**
* Extended accessible states -- second bit field describing node
*/
readonly attribute unsigned long accExtState;
readonly attribute unsigned long extState;
/**
* Help text associated with node
*/
readonly attribute AString accHelp;
readonly attribute AString help;
/**
* Focused accessible child of node
*/
readonly attribute nsIAccessible accFocused;
readonly attribute nsIAccessible focusedChild;
/**
* Accessible child which contains the coordinate at x,y
*/
nsIAccessible accGetAt(in long x, in long y);
nsIAccessible getChildAtPoint(in long x, in long y);
/**
* Nth accessible child using zero-based index
@ -154,24 +155,24 @@ interface nsIAccessible : nsISupports
/**
* Accessible node geometrically to the right of this one
*/
nsIAccessible accGetFromRight();
nsIAccessible getAccessibleToRight();
/**
* Accessible node geometrically to the left of this one
*/
nsIAccessible accGetFromLeft();
nsIAccessible getAccessibleToLeft();
/**
* Accessible node geometrically above this one
*/
nsIAccessible accGetFromAbove();
nsIAccessible getAccessibleAbove();
/**
* Accessible node geometrically below this one
*/
nsIAccessible accGetFromBelow();
nsIAccessible getAccessibleBelow();
void accGetBounds(out long x,
void getBounds(out long x,
out long y,
out long width,
out long height);
@ -179,23 +180,23 @@ interface nsIAccessible : nsISupports
/**
* Add this accessible to the current selection
*/
void accAddSelection();
void addSelection();
/**
* Remove this accessible from the current selection
*/
void accRemoveSelection();
void removeSelection();
/**
* Extend the current selection from its current accessible anchor node
* to this accessible
*/
void accExtendSelection();
void extendSelection();
/**
* Select this accessible node only
*/
void accTakeSelection();
void takeSelection();
/**
* Focus this accessible node,
@ -205,28 +206,28 @@ interface nsIAccessible : nsISupports
* will still set focus on that node, although normally that will not be visually
* indicated in most style sheets.
*/
void accTakeFocus();
void takeFocus();
/**
* The number of accessible actions associated with this accessible
*/
readonly attribute PRUint8 accNumActions;
readonly attribute PRUint8 numActions;
/**
* The name of the accessible action at the given zero-based index
*/
AString getAccActionName(in PRUint8 index);
AString getActionName(in PRUint8 index);
/**
* Perform the accessible action at the given zero-based index
* Action number 0 is the default action
*/
void accDoAction(in PRUint8 index);
void doAction(in PRUint8 index);
/**
* Get the DOM node described by this accessible node
*/
nsIDOMNode accGetDOMNode();
nsIDOMNode getDOMNode();
/**
* Get a pointer to accessibility interface for this node, which is specific

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

@ -73,14 +73,14 @@ interface nsIAccessibleSelectable : nsISupports
* If the specified object is already selected, then it does nothing.
* @throws NS_ERROR_FAILURE if the specified object is not selectable.
*/
void addSelection(in long index);
void addChildToSelection(in long index);
/**
* Removes the specified child of the object from the object's selection.
* If the specified object was not selected, then it does nothing.
* @throws NS_ERROR_FAILURE if the specified object is not selectable.
*/
void removeSelection(in long index);
void removeChildFromSelection(in long index);
/**
* Clears the selection in the object so that no children in the object

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

@ -43,9 +43,9 @@ interface nsIAccessible;
[scriptable, uuid(52F1BE88-84F7-4f7f-B31C-062AFE7DF15D)]
interface nsPIAccessible : nsISupports
{
[noscript] void setAccParent(in nsIAccessible aAccParent);
[noscript] void setAccFirstChild(in nsIAccessible aAccFirstChild);
[noscript] void setAccNextSibling(in nsIAccessible aAccNextSibling);
[noscript] void setParent(in nsIAccessible aAccParent);
[noscript] void setFirstChild(in nsIAccessible aAccFirstChild);
[noscript] void setNextSibling(in nsIAccessible aAccNextSibling);
[noscript] void invalidateChildren();
[noscript] void fireToolkitEvent(in unsigned long aEvent, in nsIAccessible aTarget, in voidPtr aData);
};

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

@ -249,7 +249,7 @@ nsAccessibleWrap::CreateMaiInterfaces(void)
// Add Action interface if the action count is more than zero.
PRUint8 actionCount = 0;
rv = GetAccNumActions(&actionCount);
rv = GetNumActions(&actionCount);
if (NS_SUCCEEDED(rv) && actionCount > 0) {
MaiInterfaceAction *maiInterfaceAction = new MaiInterfaceAction(this);
NS_ENSURE_TRUE(maiInterfaceAction, NS_ERROR_OUT_OF_MEMORY);
@ -441,50 +441,50 @@ Returned AtkStatusSet never contain the following AtkStates.
******************************************************************************/
void
nsAccessibleWrap::TranslateStates(PRUint32 aAccState, void *aAtkStateSet)
nsAccessibleWrap::TranslateStates(PRUint32 aState, void *aAtkStateSet)
{
if (!aAtkStateSet)
return;
AtkStateSet *state_set = NS_STATIC_CAST(AtkStateSet *, aAtkStateSet);
if (aAccState & nsIAccessible::STATE_SELECTED)
if (aState & nsIAccessible::STATE_SELECTED)
atk_state_set_add_state (state_set, ATK_STATE_SELECTED);
if (aAccState & nsIAccessible::STATE_FOCUSED)
if (aState & nsIAccessible::STATE_FOCUSED)
atk_state_set_add_state (state_set, ATK_STATE_FOCUSED);
if (aAccState & nsIAccessible::STATE_PRESSED)
if (aState & nsIAccessible::STATE_PRESSED)
atk_state_set_add_state (state_set, ATK_STATE_PRESSED);
if (aAccState & nsIAccessible::STATE_CHECKED)
if (aState & nsIAccessible::STATE_CHECKED)
atk_state_set_add_state (state_set, ATK_STATE_CHECKED);
if (aAccState & nsIAccessible::STATE_EXPANDED)
if (aState & nsIAccessible::STATE_EXPANDED)
atk_state_set_add_state (state_set, ATK_STATE_EXPANDED);
if (aAccState & nsIAccessible::STATE_COLLAPSED)
if (aState & nsIAccessible::STATE_COLLAPSED)
atk_state_set_add_state (state_set, ATK_STATE_EXPANDABLE);
// The control can't accept input at this time
if (aAccState & nsIAccessible::STATE_BUSY)
if (aState & nsIAccessible::STATE_BUSY)
atk_state_set_add_state (state_set, ATK_STATE_BUSY);
if (aAccState & nsIAccessible::STATE_FOCUSABLE)
if (aState & nsIAccessible::STATE_FOCUSABLE)
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
if (!(aAccState & nsIAccessible::STATE_INVISIBLE))
if (!(aState & nsIAccessible::STATE_INVISIBLE))
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
if (aAccState & nsIAccessible::STATE_SELECTABLE)
if (aState & nsIAccessible::STATE_SELECTABLE)
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
if (aAccState & nsIAccessible::STATE_SIZEABLE)
if (aState & nsIAccessible::STATE_SIZEABLE)
atk_state_set_add_state (state_set, ATK_STATE_RESIZABLE);
if (aAccState & nsIAccessible::STATE_MULTISELECTABLE)
if (aState & nsIAccessible::STATE_MULTISELECTABLE)
atk_state_set_add_state (state_set, ATK_STATE_MULTISELECTABLE);
if (!(aAccState & nsIAccessible::STATE_UNAVAILABLE))
if (!(aState & nsIAccessible::STATE_UNAVAILABLE))
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
// The following state is
@ -492,37 +492,37 @@ nsAccessibleWrap::TranslateStates(PRUint32 aAccState, void *aAtkStateSet)
// This is only the states that there isn't already a mapping for in MSAA
// See www.accessmozilla.org/article.php?sid=11 for information on the
// mappings between accessibility API state
if (aAccState & nsIAccessible::STATE_INVALID)
if (aState & nsIAccessible::STATE_INVALID)
atk_state_set_add_state (state_set, ATK_STATE_INVALID);
if (aAccState & nsIAccessible::STATE_ACTIVE)
if (aState & nsIAccessible::STATE_ACTIVE)
atk_state_set_add_state (state_set, ATK_STATE_ACTIVE);
if (aAccState & nsIAccessible::STATE_EXPANDABLE)
if (aState & nsIAccessible::STATE_EXPANDABLE)
atk_state_set_add_state (state_set, ATK_STATE_EXPANDABLE);
if (aAccState & nsIAccessible::STATE_MODAL)
if (aState & nsIAccessible::STATE_MODAL)
atk_state_set_add_state (state_set, ATK_STATE_MODAL);
if (aAccState & nsIAccessible::STATE_MULTI_LINE)
if (aState & nsIAccessible::STATE_MULTI_LINE)
atk_state_set_add_state (state_set, ATK_STATE_MULTI_LINE);
if (aAccState & nsIAccessible::STATE_SENSITIVE)
if (aState & nsIAccessible::STATE_SENSITIVE)
atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
if (aAccState & nsIAccessible::STATE_RESIZABLE)
if (aState & nsIAccessible::STATE_RESIZABLE)
atk_state_set_add_state (state_set, ATK_STATE_RESIZABLE);
if (aAccState & nsIAccessible::STATE_SHOWING)
if (aState & nsIAccessible::STATE_SHOWING)
atk_state_set_add_state (state_set, ATK_STATE_SHOWING);
if (aAccState & nsIAccessible::STATE_SINGLE_LINE)
if (aState & nsIAccessible::STATE_SINGLE_LINE)
atk_state_set_add_state (state_set, ATK_STATE_SINGLE_LINE);
if (aAccState & nsIAccessible::STATE_TRANSIENT)
if (aState & nsIAccessible::STATE_TRANSIENT)
atk_state_set_add_state (state_set, ATK_STATE_TRANSIENT);
if (aAccState & nsIAccessible::STATE_VERTICAL)
if (aState & nsIAccessible::STATE_VERTICAL)
atk_state_set_add_state (state_set, ATK_STATE_VERTICAL);
}
@ -611,7 +611,7 @@ getNameCB(AtkObject *aAtkObj)
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
/* nsIAccessible is responsible for the non-NULL name */
nsresult rv = accWrap->GetAccName(uniName);
nsresult rv = accWrap->GetName(uniName);
NS_ENSURE_SUCCESS(rv, nsnull);
len = uniName.Length();
if (len > 0) {
@ -639,7 +639,7 @@ getDescriptionCB(AtkObject *aAtkObj)
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
/* nsIAccessible is responsible for the non-NULL description */
nsresult rv = accWrap->GetAccDescription(uniDesc);
nsresult rv = accWrap->GetDescription(uniDesc);
NS_ENSURE_SUCCESS(rv, nsnull);
len = uniDesc.Length();
if (len > 0) {
@ -663,14 +663,14 @@ getRoleCB(AtkObject *aAtkObj)
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
PRUint32 accRole;
nsresult rv = accWrap->GetAccRole(&accRole);
nsresult rv = accWrap->GetRole(&accRole);
NS_ENSURE_SUCCESS(rv, ATK_ROLE_INVALID);
//the cross-platform Accessible object returns the same value for
//both "ATK_ROLE_MENU_ITEM" and "ATK_ROLE_MENU"
if (accRole == ATK_ROLE_MENU_ITEM) {
PRInt32 childCount = 0;
accWrap->GetAccChildCount(&childCount);
accWrap->GetChildCount(&childCount);
if (childCount > 0)
accRole = ATK_ROLE_MENU;
}
@ -687,12 +687,12 @@ getParentCB(AtkObject *aAtkObj)
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
nsCOMPtr<nsIAccessible> accParent;
nsresult rv = accWrap->GetAccParent(getter_AddRefs(accParent));
nsresult rv = accWrap->GetParent(getter_AddRefs(accParent));
if (NS_FAILED(rv) || !accParent)
return nsnull;
nsIAccessible *tmpAccParent = accParent;
nsIAccessible *tmpParent = accParent;
nsAccessibleWrap *accWrapParent = NS_STATIC_CAST(nsAccessibleWrap *,
tmpAccParent);
tmpParent);
AtkObject *parentAtkObj = accWrapParent->GetAtkObject();
if (parentAtkObj && !aAtkObj->accessible_parent) {
@ -709,7 +709,7 @@ getChildCountCB(AtkObject *aAtkObj)
NS_REINTERPRET_CAST(MaiAtkObject*, aAtkObj)->accWrap;
PRInt32 count = 0;
accWrap->GetAccChildCount(&count);
accWrap->GetChildCount(&count);
return count;
}
@ -754,13 +754,13 @@ getIndexInParentCB(AtkObject *aAtkObj)
NS_ENSURE_SUCCESS(accWrap->GetUniqueID(&accId), -1);
nsCOMPtr<nsIAccessible> accParent;
nsresult rv = accWrap->GetAccParent(getter_AddRefs(accParent));
nsresult rv = accWrap->GetParent(getter_AddRefs(accParent));
if (NS_FAILED(rv) || !accParent)
return -1;
nsCOMPtr<nsIAccessible> accChild;
nsCOMPtr<nsIAccessible> accTmpChild;
accWrap->GetAccFirstChild(getter_AddRefs(accChild));
accWrap->GetFirstChild(getter_AddRefs(accChild));
PRInt32 currentIndex = -1;
void *currentAccId = nsnull;
@ -772,7 +772,7 @@ getIndexInParentCB(AtkObject *aAtkObj)
if (currentAccId == accId)
break;
}
accChild->GetAccNextSibling(getter_AddRefs(accTmpChild));
accChild->GetNextSibling(getter_AddRefs(accTmpChild));
accChild = accTmpChild;
}
return currentIndex;
@ -789,11 +789,11 @@ refStateSetCB(AtkObject *aAtkObj)
state_set = ATK_OBJECT_CLASS(parent_class)->ref_state_set(aAtkObj);
PRUint32 accState = 0;
nsresult rv = accWrap->GetAccState(&accState);
nsresult rv = accWrap->GetState(&accState);
NS_ENSURE_SUCCESS(rv, state_set);
if (accState == 0) {
nsresult rv = accWrap->GetAccExtState(&accState);
nsresult rv = accWrap->GetExtState(&accState);
NS_ENSURE_SUCCESS(rv, state_set);
if (accState == 0)
return state_set;

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

@ -80,7 +80,7 @@ public:
AtkObject * GetAtkObject(void);
MaiInterface *GetMaiInterface(PRInt16 aIfaceType);
static void TranslateStates(PRUint32 aAccState,
static void TranslateStates(PRUint32 aState,
void *aAtkStateSet);
protected:
AtkObject *mMaiAtkObject;

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

@ -560,27 +560,27 @@ NS_IMETHODIMP nsAppRootAccessible::Shutdown()
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsAppRootAccessible::GetName(nsAString& _retval)
{
_retval = NS_LITERAL_STRING("Mozilla");
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccDescription(nsAString& aDescription)
NS_IMETHODIMP nsAppRootAccessible::GetDescription(nsAString& aDescription)
{
aDescription = NS_LITERAL_STRING("Mozilla Root Accessible");
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccRole(PRUint32 *aAccRole)
NS_IMETHODIMP nsAppRootAccessible::GetRole(PRUint32 *aRole)
{
*aAccRole = ROLE_APPLICATION;
*aRole = ROLE_APPLICATION;
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccParent(nsIAccessible ** aAccParent)
NS_IMETHODIMP nsAppRootAccessible::GetParent(nsIAccessible ** aParent)
{
*aAccParent = nsnull;
*aParent = nsnull;
return NS_OK;
}
@ -616,7 +616,7 @@ NS_IMETHODIMP nsAppRootAccessible::GetChildAt(PRInt32 aChildNum,
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
NS_IMETHODIMP nsAppRootAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
PRUint32 count = 0;
nsresult rv = NS_OK;
@ -632,27 +632,27 @@ NS_IMETHODIMP nsAppRootAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccFirstChild(nsIAccessible * *aAccFirstChild)
NS_IMETHODIMP nsAppRootAccessible::GetFirstChild(nsIAccessible * *aFirstChild)
{
nsCOMPtr<nsIAccessible> firstChild;
*aAccFirstChild = nsnull;
*aFirstChild = nsnull;
nsresult rv = NS_OK;
rv = mChildren->QueryElementAt(0, NS_GET_IID(nsIAccessible),
getter_AddRefs(firstChild));
if (firstChild)
NS_IF_ADDREF(*aAccFirstChild = firstChild);
NS_IF_ADDREF(*aFirstChild = firstChild);
return rv;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
NS_IMETHODIMP nsAppRootAccessible::GetNextSibling(nsIAccessible * *aNextSibling)
{
*aAccNextSibling = nsnull;
*aNextSibling = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsAppRootAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPreviousSibling)
NS_IMETHODIMP nsAppRootAccessible::GetPreviousSibling(nsIAccessible * *aPreviousSibling)
{
*aAccPreviousSibling = nsnull;
*aPreviousSibling = nsnull;
return NS_OK;
}

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

@ -77,16 +77,16 @@ public:
NS_IMETHOD Shutdown();
/* virtual functions from nsAccessible */
NS_IMETHOD GetAccName(nsAString & aAccName);
NS_IMETHOD GetAccDescription(nsAString & aAccDescription);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccNextSibling(nsIAccessible * *aAccNextSibling);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **aAccPreviousSibling);
NS_IMETHOD GetName(nsAString & aName);
NS_IMETHOD GetDescription(nsAString & aDescription);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetParent(nsIAccessible * *aParent);
NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling);
NS_IMETHOD GetPreviousSibling(nsIAccessible **aPreviousSibling);
NS_IMETHOD GetChildAt(PRInt32 aChildNum, nsIAccessible **aChild);
NS_IMETHOD GetAccFirstChild(nsIAccessible * *aAccFirstChild);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount);
NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild);
NS_IMETHOD GetChildCount(PRInt32 *aAccChildCount);
// return the atk object for app root accessible
NS_IMETHOD GetNativeInterface(void **aOutAccessible);

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

@ -70,7 +70,7 @@ static char * sAtkPropertyNameArray[PROP_LAST] = {
"accessible_table_summary"
};
static AtkStateType TranslateAState(PRUint32 aAccState);
static AtkStateType TranslateAState(PRUint32 aState);
nsDocAccessibleWrap::nsDocAccessibleWrap(nsIDOMNode *aDOMNode,
nsIWeakReference *aShell):
@ -405,9 +405,9 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireToolkitEvent(PRUint32 aEvent,
/* static */
AtkStateType
TranslateAState(PRUint32 aAccState)
TranslateAState(PRUint32 aState)
{
switch (aAccState) {
switch (aState) {
case nsIAccessible::STATE_SELECTED:
return ATK_STATE_SELECTED;
case nsIAccessible::STATE_FOCUSED:

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

@ -46,7 +46,7 @@ nsBlockAccessible(aDomNode, aShell), nsAccessibleHyperText(aDomNode, aShell)
{
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetAccName(nsAString& aName)
NS_IMETHODIMP nsHTMLBlockAccessible::GetName(nsAString& aName)
{
nsAutoString name(NS_LITERAL_STRING("Paragraph "));
name.AppendInt(GetIndex());
@ -54,15 +54,15 @@ NS_IMETHODIMP nsHTMLBlockAccessible::GetAccName(nsAString& aName)
return NS_OK;
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetAccRole(PRUint32 *aRole)
NS_IMETHODIMP nsHTMLBlockAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLBlockAccessible::GetAccState(PRUint32 *aState)
NS_IMETHODIMP nsHTMLBlockAccessible::GetState(PRUint32 *aState)
{
nsAccessible::GetAccState(aState);
nsAccessible::GetState(aState);
*aState &= ~STATE_FOCUSABLE;
return NS_OK;
}

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

@ -49,9 +49,9 @@ class nsHTMLBlockAccessible : public nsBlockAccessible,
public:
nsHTMLBlockAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& aName);
NS_IMETHOD GetAccRole(PRUint32 *aRole);
NS_IMETHOD GetAccState(PRUint32 *aState);
NS_IMETHOD GetName(nsAString& aName);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetState(PRUint32 *aState);
NS_IMETHOD Shutdown();
};

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

@ -135,7 +135,7 @@ nsHTMLImageAccessible(aDomNode, aShell)
/* readonly attribute long anchors; */
NS_IMETHODIMP nsHTMLImageMapAccessible::GetAnchors(PRInt32 *aAnchors)
{
return GetAccChildCount(aAnchors);
return GetChildCount(aAnchors);
}
/* readonly attribute long startIndex; */

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

@ -113,7 +113,7 @@ nsHTMLTableAccessibleWrap::SetCaption(nsIAccessible *aCaption)
NS_ENSURE_TRUE(table, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMNode> domNode;
rv = aCaption->AccGetDOMNode(getter_AddRefs(domNode));
rv = aCaption->GetDOMNode(getter_AddRefs(domNode));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMNode> newDOMNode;
@ -551,7 +551,7 @@ nsHTMLTableAccessibleWrap(aDomNode, aShell)
}
NS_IMETHODIMP
nsHTMLTableHeadAccessible::GetAccRole(PRUint32 *aResult)
nsHTMLTableHeadAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_COLUMNHEADER;
return NS_OK;

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

@ -82,7 +82,7 @@ public:
nsHTMLTableHeadAccessible(nsIDOMNode *aDomNode, nsIWeakReference *aShell);
/* nsIAccessible */
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetRole(PRUint32 *aResult);
/* nsIAccessibleTable */
NS_IMETHOD GetCaption(nsIAccessible **aCaption);

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

@ -51,7 +51,7 @@ static gboolean doActionCB(AtkAction *aAction, gint aActionIndex);
static gint getActionCountCB(AtkAction *aAction);
static const gchar *getDescriptionCB(AtkAction *aAction, gint aActionIndex);
static const gchar *getNameCB(AtkAction *aAction, gint aActionIndex);
static const gchar *getKeybindingCB(AtkAction *aAction, gint aActionIndex);
static const gchar *getKeyBindingCB(AtkAction *aAction, gint aActionIndex);
static gboolean setDescriptionCB(AtkAction *aAction, gint aActionIndex,
const gchar *aDesc);
G_END_DECLS
@ -96,7 +96,7 @@ interfaceInitCB(AtkActionIface *aIface)
aIface->do_action = doActionCB;
aIface->get_n_actions = getActionCountCB;
aIface->get_description = getDescriptionCB;
aIface->get_keybinding = getKeybindingCB;
aIface->get_keybinding = getKeyBindingCB;
aIface->get_name = getNameCB;
aIface->set_description = setDescriptionCB;
}
@ -107,7 +107,7 @@ doActionCB(AtkAction *aAction, gint aActionIndex)
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, FALSE);
nsresult rv = accWrap->AccDoAction(aActionIndex);
nsresult rv = accWrap->DoAction(aActionIndex);
return (NS_FAILED(rv)) ? FALSE : TRUE;
}
@ -118,7 +118,7 @@ getActionCountCB(AtkAction *aAction)
NS_ENSURE_TRUE(accWrap, 0);
PRUint8 num = 0;
nsresult rv = accWrap->GetAccNumActions(&num);
nsresult rv = accWrap->GetNumActions(&num);
return (NS_FAILED(rv)) ? 0 : NS_STATIC_CAST(gint, num);
}
@ -144,7 +144,7 @@ getNameCB(AtkAction *aAction, gint aActionIndex)
const char *name = action->GetName();
if (!name) {
nsAutoString autoStr;
nsresult rv = accWrap->GetAccActionName(aActionIndex, autoStr);
nsresult rv = accWrap->GetActionName(aActionIndex, autoStr);
NS_ENSURE_SUCCESS(rv, nsnull);
action->SetName(autoStr);
@ -154,7 +154,7 @@ getNameCB(AtkAction *aAction, gint aActionIndex)
}
const gchar *
getKeybindingCB(AtkAction *aAction, gint aActionIndex)
getKeyBindingCB(AtkAction *aAction, gint aActionIndex)
{
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aAction));
NS_ENSURE_TRUE(accWrap, nsnull);
@ -167,26 +167,26 @@ getKeybindingCB(AtkAction *aAction, gint aActionIndex)
if (action->GetKeyBinding())
return action->GetKeyBinding();
//return all Keybindings including accesskey and shortcut
//return all KeyBindings including accesskey and shortcut
nsAutoString allKeybinding;
nsAutoString allKeyBinding;
//get accesskey
nsAutoString accessKey;
nsresult rv = accWrap->GetAccKeyboardShortcut(accessKey);
nsresult rv = accWrap->GetKeyboardShortcut(accessKey);
if (NS_SUCCEEDED(rv) && !accessKey.IsEmpty()) {
nsCOMPtr<nsIAccessible> parentAccessible;
accWrap->GetAccParent(getter_AddRefs(parentAccessible));
accWrap->GetParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetAccRole(&role);
parentAccessible->GetRole(&role);
if (role == ATK_ROLE_MENU_BAR) {
//it is topmenu, change from "Alt+f" to "f;<Alt>f"
nsAutoString rightChar;
accessKey.Right(rightChar, 1);
allKeybinding = rightChar + NS_LITERAL_STRING(";<Alt>") +
allKeyBinding = rightChar + NS_LITERAL_STRING(";<Alt>") +
rightChar;
}
else if ((role == ATK_ROLE_MENU) || (role == ATK_ROLE_MENU_ITEM)) {
@ -196,7 +196,7 @@ getKeybindingCB(AtkAction *aAction, gint aActionIndex)
while ((grandParentAcc) && (role != ATK_ROLE_MENU_BAR)) {
nsAutoString grandParentKey;
grandParentAcc->GetAccKeyboardShortcut(grandParentKey);
grandParentAcc->GetKeyboardShortcut(grandParentKey);
if (!grandParentKey.IsEmpty()) {
nsAutoString rightChar;
@ -205,11 +205,11 @@ getKeybindingCB(AtkAction *aAction, gint aActionIndex)
}
nsCOMPtr<nsIAccessible> tempAcc = grandParentAcc;
tempAcc->GetAccParent(getter_AddRefs(grandParentAcc));
tempAcc->GetParent(getter_AddRefs(grandParentAcc));
if (grandParentAcc)
grandParentAcc->GetAccRole(&role);
grandParentAcc->GetRole(&role);
}
allKeybinding = accessKey + NS_LITERAL_STRING(";<Alt>") +
allKeyBinding = accessKey + NS_LITERAL_STRING(";<Alt>") +
allKey;
}
}
@ -217,15 +217,15 @@ getKeybindingCB(AtkAction *aAction, gint aActionIndex)
//default process, rarely happens.
nsAutoString rightChar;
accessKey.Right(rightChar, 1);
allKeybinding = rightChar + NS_LITERAL_STRING(";<Alt>") + rightChar;
allKeyBinding = rightChar + NS_LITERAL_STRING(";<Alt>") + rightChar;
}
}
else //don't have accesskey
allKeybinding = NS_LITERAL_STRING(";");
allKeyBinding = NS_LITERAL_STRING(";");
//get shortcut
nsAutoString keyBinding, subShortcut;
rv = accWrap->GetAccKeybinding(keyBinding);
rv = accWrap->GetKeyBinding(keyBinding);
if (NS_SUCCEEDED(rv) && !keyBinding.IsEmpty()) {
//change the shortcut from "Ctrl+Shift+L" to "<Control><Shift>L"
@ -252,8 +252,8 @@ getKeybindingCB(AtkAction *aAction, gint aActionIndex)
}
}
allKeybinding += NS_LITERAL_STRING(";") + subShortcut;
action->SetKeyBinding(allKeybinding);
allKeyBinding += NS_LITERAL_STRING(";") + subShortcut;
action->SetKeyBinding(allKeyBinding);
return action->GetKeyBinding();
}

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

@ -130,7 +130,7 @@ refAccessibleAtPointCB(AtkComponent *aComponent,
}
nsCOMPtr<nsIAccessible> pointAcc;
nsresult rv = accWrap->AccGetAt(aAccX, aAccY, getter_AddRefs(pointAcc));
nsresult rv = accWrap->GetChildAtPoint(aAccX, aAccY, getter_AddRefs(pointAcc));
if (NS_FAILED(rv))
return nsnull;
@ -157,7 +157,7 @@ getExtentsCB(AtkComponent *aComponent,
return;
PRInt32 nsAccX, nsAccY, nsAccWidth, nsAccHeight;
nsresult rv = accWrap->AccGetBounds(&nsAccX, &nsAccY,
nsresult rv = accWrap->GetBounds(&nsAccX, &nsAccY,
&nsAccWidth, &nsAccHeight);
if (NS_FAILED(rv))
return;
@ -178,6 +178,6 @@ grabFocusCB(AtkComponent *aComponent)
nsAccessibleWrap *accWrap = GetAccessibleWrap(ATK_OBJECT(aComponent));
NS_ENSURE_TRUE(accWrap, FALSE);
nsresult rv = accWrap->AccTakeFocus();
nsresult rv = accWrap->TakeFocus();
return (NS_FAILED(rv)) ? FALSE : TRUE;
}

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

@ -115,7 +115,7 @@ addSelectionCB(AtkSelection *aSelection, gint i)
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
return NS_SUCCEEDED(accSelection->AddSelection(i));
return NS_SUCCEEDED(accSelection->AddChildToSelection(i));
}
gboolean
@ -200,7 +200,7 @@ removeSelectionCB(AtkSelection *aSelection, gint i)
getter_AddRefs(accSelection));
NS_ENSURE_TRUE(accSelection, FALSE);
nsresult rv = accSelection->RemoveSelection(i);
nsresult rv = accSelection->RemoveChildFromSelection(i);
return (NS_FAILED(rv)) ? FALSE : TRUE;
}

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

@ -59,15 +59,15 @@ nsRootAccessibleWrap::~nsRootAccessibleWrap()
root->RemoveRootAccessible(this);
}
NS_IMETHODIMP nsRootAccessibleWrap::GetAccParent(nsIAccessible ** aAccParent)
NS_IMETHODIMP nsRootAccessibleWrap::GetParent(nsIAccessible ** aParent)
{
nsAppRootAccessible *root = nsAppRootAccessible::Create();
nsresult rv = NS_OK;
if (root) {
NS_IF_ADDREF(*aAccParent = root);
NS_IF_ADDREF(*aParent = root);
}
else {
*aAccParent = nsnull;
*aParent = nsnull;
rv = NS_ERROR_FAILURE;
}
return rv;

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

@ -56,7 +56,7 @@ public:
nsRootAccessibleWrap(nsIDOMNode *aDOMNode, nsIWeakReference* aShell);
virtual ~nsRootAccessibleWrap();
NS_IMETHOD GetAccParent(nsIAccessible ** aAccParent);
NS_IMETHOD GetParent(nsIAccessible ** aParent);
};
#endif /* __NS_ROOT_ACCESSIBLE_WRAP_H__ */

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

@ -65,7 +65,7 @@ NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::GetMinimumValue(double *aMinimum
NS_IMETHODIMP nsXULProgressMeterAccessibleWrap::GetCurrentValue(double *aCurrentValue)
{
nsAutoString currentValue;
GetAccValue(currentValue);
GetValue(currentValue);
PRInt32 error;
*aCurrentValue = currentValue.ToFloat(&error) / 100;
return NS_OK;

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

@ -82,10 +82,10 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumns(PRInt32 *aColumns)
nsresult rv = NS_OK;
nsCOMPtr<nsIAccessible> acc;
rv = nsAccessible::GetAccFirstChild(getter_AddRefs(acc));
rv = nsAccessible::GetFirstChild(getter_AddRefs(acc));
NS_ENSURE_TRUE(acc, NS_ERROR_FAILURE);
return acc->GetAccChildCount(aColumns);
return acc->GetChildCount(aColumns);
}
NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnHeader(nsIAccessibleTable **aColumnHeader)
@ -93,7 +93,7 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumnHeader(nsIAccessibleTable **aCol
nsresult rv = NS_OK;
nsCOMPtr<nsIAccessible> acc;
nsAccessible::GetAccFirstChild(getter_AddRefs(acc));
nsAccessible::GetFirstChild(getter_AddRefs(acc));
NS_ENSURE_TRUE(acc, NS_ERROR_FAILURE);
nsCOMPtr<nsIAccessibleTable> accTable(do_QueryInterface(acc, &rv));
@ -206,7 +206,7 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::CellRefAt(PRInt32 aRow, PRInt32 aColumn,
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMNode> columnNode;
rv = column->AccGetDOMNode(getter_AddRefs(columnNode));
rv = column->GetDOMNode(getter_AddRefs(columnNode));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMElement> columnElement(do_QueryInterface(columnNode, &rv));
@ -372,7 +372,7 @@ NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::SetSummary(const nsAString &aSumma
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumns(PRInt32 *aColumns)
{
return GetAccChildCount(aColumns);
return GetChildCount(aColumns);
}
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetColumnHeader(nsIAccessibleTable * *aColumnHeader)
@ -410,11 +410,11 @@ NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::GetSelectedRows(PRUint32 *rowsSize
NS_IMETHODIMP nsXULTreeColumnsAccessibleWrap::CellRefAt(PRInt32 aRow, PRInt32 aColumn, nsIAccessible **_retval)
{
nsCOMPtr<nsIAccessible> next, temp;
GetAccFirstChild(getter_AddRefs(next));
GetFirstChild(getter_AddRefs(next));
NS_ENSURE_TRUE(next, NS_ERROR_FAILURE);
for (PRInt32 col = 0; col < aColumn; col++) {
next->GetAccNextSibling(getter_AddRefs(temp));
next->GetNextSibling(getter_AddRefs(temp));
NS_ENSURE_TRUE(temp, NS_ERROR_FAILURE);
next = temp;

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

@ -332,7 +332,7 @@ nsAccessNode::MakeAccessNode(nsIDOMNode *aNode, nsIAccessNode **aAccessNode)
}
NS_IMETHODIMP
nsAccessNode::GetFirstChild(nsIAccessNode **aAccessNode)
nsAccessNode::GetFirstChildNode(nsIAccessNode **aAccessNode)
{
NS_ENSURE_TRUE(mDOMNode, NS_ERROR_NULL_POINTER);
@ -344,7 +344,7 @@ nsAccessNode::GetFirstChild(nsIAccessNode **aAccessNode)
}
NS_IMETHODIMP
nsAccessNode::GetLastChild(nsIAccessNode **aAccessNode)
nsAccessNode::GetLastChildNode(nsIAccessNode **aAccessNode)
{
NS_ENSURE_TRUE(mDOMNode, NS_ERROR_NULL_POINTER);
@ -356,7 +356,7 @@ nsAccessNode::GetLastChild(nsIAccessNode **aAccessNode)
}
NS_IMETHODIMP
nsAccessNode::GetParent(nsIAccessNode **aAccessNode)
nsAccessNode::GetParentNode(nsIAccessNode **aAccessNode)
{
NS_ENSURE_TRUE(mDOMNode, NS_ERROR_NULL_POINTER);
@ -368,7 +368,7 @@ nsAccessNode::GetParent(nsIAccessNode **aAccessNode)
}
NS_IMETHODIMP
nsAccessNode::GetPreviousSibling(nsIAccessNode **aAccessNode)
nsAccessNode::GetPreviousSiblingNode(nsIAccessNode **aAccessNode)
{
NS_ENSURE_TRUE(mDOMNode, NS_ERROR_NULL_POINTER);
@ -380,7 +380,7 @@ nsAccessNode::GetPreviousSibling(nsIAccessNode **aAccessNode)
}
NS_IMETHODIMP
nsAccessNode::GetNextSibling(nsIAccessNode **aAccessNode)
nsAccessNode::GetNextSiblingNode(nsIAccessNode **aAccessNode)
{
NS_ENSURE_TRUE(mDOMNode, NS_ERROR_NULL_POINTER);
@ -392,7 +392,7 @@ nsAccessNode::GetNextSibling(nsIAccessNode **aAccessNode)
}
NS_IMETHODIMP
nsAccessNode::GetChildAt(PRInt32 aChildNum, nsIAccessNode **aAccessNode)
nsAccessNode::GetChildNodeAt(PRInt32 aChildNum, nsIAccessNode **aAccessNode)
{
nsCOMPtr<nsIContent> child, content(do_QueryInterface(mDOMNode));
NS_ENSURE_TRUE(content, NS_ERROR_NULL_POINTER);

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

@ -348,10 +348,10 @@ nsAccessibilityService::CreateHTML4ButtonAccessible(nsISupports *aFrame, nsIAcce
}
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLAreaAccessible(nsIWeakReference *aShell, nsIDOMNode *aDOMNode, nsIAccessible *aAccParent,
nsAccessibilityService::CreateHTMLAreaAccessible(nsIWeakReference *aShell, nsIDOMNode *aDOMNode, nsIAccessible *aParent,
nsIAccessible **_retval)
{
*_retval = new nsHTMLAreaAccessible(aDOMNode, aAccParent, aShell);
*_retval = new nsHTMLAreaAccessible(aDOMNode, aParent, aShell);
if (! *_retval)
return NS_ERROR_OUT_OF_MEMORY;
@ -561,7 +561,7 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame,
nsCOMPtr<nsIDOMNode> node;
nsCOMPtr<nsIWeakReference> weakShell;
nsIFrame *frame;
nsresult rv = GetInfo(NS_STATIC_CAST(nsIFrame*, aFrame), &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
GetInfo(NS_STATIC_CAST(nsIFrame*, aFrame), &frame, getter_AddRefs(weakShell), getter_AddRefs(node));
// 1) for object elements containing either HTML or TXT documents
nsCOMPtr<nsIDOMDocument> domDoc;
@ -645,9 +645,9 @@ nsAccessibilityService::CreateHTMLRadioButtonAccessibleXBL(nsIDOMNode *aNode, ns
NS_IMETHODIMP
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode,
nsIAccessible *aAccParent,
nsISupports* aPresContext,
nsIAccessible **_retval)
nsIAccessible *aParent,
nsISupports* aPresContext,
nsIAccessible **_retval)
{
nsCOMPtr<nsIPresContext> presContext(do_QueryInterface(aPresContext));
NS_ASSERTION(presContext,"Error non prescontext passed to accessible factory!!!");
@ -1578,10 +1578,10 @@ nsresult nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
if (! newAcc)
return NS_ERROR_FAILURE;
PRUint32 role, state;
newAcc->GetAccRole(&role);
newAcc->GetRole(&role);
// don't create the accessible object for popup widget when it's not visible
if (role == nsIAccessible::ROLE_MENUPOPUP) {
newAcc->GetAccState(&state);
newAcc->GetState(&state);
if (state & (nsIAccessible::STATE_INVISIBLE | nsIAccessible::STATE_OFFSCREEN))
return NS_ERROR_FAILURE;
}

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

@ -127,7 +127,7 @@ nsAccessible::~nsAccessible()
{
}
NS_IMETHODIMP nsAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt)
@ -135,7 +135,7 @@ NS_IMETHODIMP nsAccessible::GetAccName(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsAccessible::GetAccDescription(nsAString& aDescription)
NS_IMETHODIMP nsAccessible::GetDescription(nsAString& aDescription)
{
// There are 3 conditions that make an accessible have no accDescription:
// 1. it's a text node; or
@ -144,7 +144,7 @@ NS_IMETHODIMP nsAccessible::GetAccDescription(nsAString& aDescription)
nsCOMPtr<nsITextContent> textContent(do_QueryInterface(mDOMNode));
if (!textContent) {
nsAutoString name;
GetAccName(name);
GetName(name);
if (!name.IsEmpty()) {
// If there's already a name, we'll expose a description.if it's different than the name
// If there is no name, then we know the title should really be exposed there
@ -159,7 +159,7 @@ NS_IMETHODIMP nsAccessible::GetAccDescription(nsAString& aDescription)
return NS_OK;
}
NS_IMETHODIMP nsAccessible::GetAccKeyboardShortcut(nsAString& _retval)
NS_IMETHODIMP nsAccessible::GetKeyboardShortcut(nsAString& _retval)
{
static PRInt32 gGeneralAccesskeyModifier = -1; // magic value of -1 indicates unitialized state
@ -192,19 +192,19 @@ NS_IMETHODIMP nsAccessible::GetAccKeyboardShortcut(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsAccessible::SetAccParent(nsIAccessible *aParent)
NS_IMETHODIMP nsAccessible::SetParent(nsIAccessible *aParent)
{
mParent = aParent;
return NS_OK;
}
NS_IMETHODIMP nsAccessible::SetAccFirstChild(nsIAccessible *aFirstChild)
NS_IMETHODIMP nsAccessible::SetFirstChild(nsIAccessible *aFirstChild)
{
mFirstChild = aFirstChild;
return NS_OK;
}
NS_IMETHODIMP nsAccessible::SetAccNextSibling(nsIAccessible *aNextSibling)
NS_IMETHODIMP nsAccessible::SetNextSibling(nsIAccessible *aNextSibling)
{
mNextSibling = aNextSibling? aNextSibling: DEAD_END_ACCESSIBLE;
return NS_OK;
@ -218,8 +218,8 @@ NS_IMETHODIMP nsAccessible::Shutdown()
nsCOMPtr<nsIAccessible> current(mFirstChild), next;
while (current) {
nsCOMPtr<nsPIAccessible> privateAcc(do_QueryInterface(current));
privateAcc->SetAccParent(nsnull);
current->GetAccNextSibling(getter_AddRefs(next));
privateAcc->SetParent(nsnull);
current->GetNextSibling(getter_AddRefs(next));
current = next;
}
}
@ -242,34 +242,34 @@ NS_IMETHODIMP nsAccessible::InvalidateChildren()
return NS_OK;
}
NS_IMETHODIMP nsAccessible::GetAccParent(nsIAccessible ** aAccParent)
NS_IMETHODIMP nsAccessible::GetParent(nsIAccessible ** aParent)
{
if (!mWeakShell) {
// This node has been shut down
*aAccParent = nsnull;
*aParent = nsnull;
return NS_ERROR_FAILURE;
}
if (mParent) {
*aAccParent = mParent;
NS_ADDREF(*aAccParent);
*aParent = mParent;
NS_ADDREF(*aParent);
return NS_OK;
}
*aAccParent = nsnull;
*aParent = nsnull;
// Last argument of PR_TRUE indicates to walk anonymous content
nsAccessibleTreeWalker walker(mWeakShell, mDOMNode, PR_TRUE);
if (NS_SUCCEEDED(walker.GetParent())) {
*aAccParent = mParent = walker.mState.accessible;
NS_ADDREF(*aAccParent);
*aParent = mParent = walker.mState.accessible;
NS_ADDREF(*aParent);
}
return NS_OK;
}
/* readonly attribute nsIAccessible accNextSibling; */
NS_IMETHODIMP nsAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
/* readonly attribute nsIAccessible nextSibling; */
NS_IMETHODIMP nsAccessible::GetNextSibling(nsIAccessible * *aNextSibling)
{
*aAccNextSibling = nsnull;
*aNextSibling = nsnull;
if (!mWeakShell) {
// This node has been shut down
return NS_ERROR_FAILURE;
@ -278,7 +278,7 @@ NS_IMETHODIMP nsAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
// If no parent, don't try to calculate a new sibling
// It either means we're at the root or shutting down the parent
if (mNextSibling != DEAD_END_ACCESSIBLE) {
NS_IF_ADDREF(*aAccNextSibling = mNextSibling);
NS_IF_ADDREF(*aNextSibling = mNextSibling);
}
return NS_OK;
}
@ -287,12 +287,12 @@ NS_IMETHODIMP nsAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
nsAccessibleTreeWalker walker(mWeakShell, mDOMNode, PR_TRUE);
if (NS_SUCCEEDED(walker.GetNextSibling())) {
*aAccNextSibling = walker.mState.accessible;
NS_ADDREF(*aAccNextSibling);
nsCOMPtr<nsPIAccessible> privateAcc(do_QueryInterface(*aAccNextSibling));
privateAcc->SetAccParent(mParent);
*aNextSibling = walker.mState.accessible;
NS_ADDREF(*aNextSibling);
nsCOMPtr<nsPIAccessible> privateAcc(do_QueryInterface(*aNextSibling));
privateAcc->SetParent(mParent);
mNextSibling = *aAccNextSibling;
mNextSibling = *aNextSibling;
}
if (!mNextSibling)
@ -301,10 +301,10 @@ NS_IMETHODIMP nsAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
return NS_OK;
}
/* readonly attribute nsIAccessible accPreviousSibling; */
NS_IMETHODIMP nsAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPreviousSibling)
/* readonly attribute nsIAccessible previousSibling; */
NS_IMETHODIMP nsAccessible::GetPreviousSibling(nsIAccessible * *aPreviousSibling)
{
*aAccPreviousSibling = nsnull;
*aPreviousSibling = nsnull;
if (!mWeakShell) {
// This node has been shut down
@ -314,31 +314,31 @@ NS_IMETHODIMP nsAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPreviousS
// Last argument of PR_TRUE indicates to walk anonymous content
nsAccessibleTreeWalker walker(mWeakShell, mDOMNode, PR_TRUE);
if (NS_SUCCEEDED(walker.GetPreviousSibling())) {
*aAccPreviousSibling = walker.mState.accessible;
NS_ADDREF(*aAccPreviousSibling);
*aPreviousSibling = walker.mState.accessible;
NS_ADDREF(*aPreviousSibling);
// Use last walker state to cache data on prev accessible
nsCOMPtr<nsPIAccessible> privateAcc(do_QueryInterface(*aAccPreviousSibling));
privateAcc->SetAccParent(mParent);
nsCOMPtr<nsPIAccessible> privateAcc(do_QueryInterface(*aPreviousSibling));
privateAcc->SetParent(mParent);
}
return NS_OK;
}
/* readonly attribute nsIAccessible accFirstChild; */
NS_IMETHODIMP nsAccessible::GetAccFirstChild(nsIAccessible * *aAccFirstChild)
/* readonly attribute nsIAccessible firstChild; */
NS_IMETHODIMP nsAccessible::GetFirstChild(nsIAccessible * *aFirstChild)
{
PRInt32 numChildren;
GetAccChildCount(&numChildren); // Make sure we cache all of the children
GetChildCount(&numChildren); // Make sure we cache all of the children
NS_IF_ADDREF(*aAccFirstChild = mFirstChild);
NS_IF_ADDREF(*aFirstChild = mFirstChild);
return NS_OK;
}
/* readonly attribute nsIAccessible accFirstChild; */
NS_IMETHODIMP nsAccessible::GetAccLastChild(nsIAccessible * *aAccLastChild)
/* readonly attribute nsIAccessible lastChild; */
NS_IMETHODIMP nsAccessible::GetLastChild(nsIAccessible * *aLastChild)
{
GetChildAt(-1, aAccLastChild);
GetChildAt(-1, aLastChild);
return NS_OK;
}
@ -348,7 +348,7 @@ NS_IMETHODIMP nsAccessible::GetChildAt(PRInt32 aChildNum, nsIAccessible **aChild
// If aChildNum is out of range, last child is returned
PRInt32 numChildren;
GetAccChildCount(&numChildren);
GetChildCount(&numChildren);
if (aChildNum >= numChildren || !mWeakShell) {
*aChild = nsnull;
@ -363,7 +363,7 @@ NS_IMETHODIMP nsAccessible::GetChildAt(PRInt32 aChildNum, nsIAccessible **aChild
if (++index > aChildNum) {
break;
}
nextSibling->GetAccNextSibling(getter_AddRefs(current));
nextSibling->GetNextSibling(getter_AddRefs(current));
}
NS_IF_ADDREF(*aChild = nextSibling);
@ -384,19 +384,19 @@ void nsAccessible::CacheChildren(PRBool aWalkAnonContent)
nsCOMPtr<nsPIAccessible> privatePrevAccessible;
mAccChildCount = 0;
walker.GetFirstChild();
SetAccFirstChild(walker.mState.accessible);
SetFirstChild(walker.mState.accessible);
while (walker.mState.accessible) {
++mAccChildCount;
privatePrevAccessible = do_QueryInterface(walker.mState.accessible);
privatePrevAccessible->SetAccParent(this);
privatePrevAccessible->SetParent(this);
walker.GetNextSibling();
privatePrevAccessible->SetAccNextSibling(walker.mState.accessible);
privatePrevAccessible->SetNextSibling(walker.mState.accessible);
}
}
}
/* readonly attribute long accChildCount; */
NS_IMETHODIMP nsAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
/* readonly attribute long childCount; */
NS_IMETHODIMP nsAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
CacheChildren(PR_TRUE);
*aAccChildCount = mAccChildCount;
@ -470,7 +470,7 @@ PRBool nsAccessible::IsPartiallyVisible(PRBool *aIsOffscreen)
return PR_FALSE;
// Get the bounds of the current frame, relative to the current view.
// We don't use the more accurate AccGetBounds, because that is more expensive
// We don't use the more accurate GetBoundsRect, because that is more expensive
// and the STATE_OFFSCREEN flag that this is used for only needs to be a rough indicator
nsRect relFrameRect;
@ -542,11 +542,11 @@ nsresult nsAccessible::GetFocusedNode(nsIDOMNode *aCurrentNode, nsIDOMNode **aFo
return NS_ERROR_FAILURE;
}
/* readonly attribute wstring accState; */
NS_IMETHODIMP nsAccessible::GetAccState(PRUint32 *aAccState)
/* readonly attribute wstring state; */
NS_IMETHODIMP nsAccessible::GetState(PRUint32 *aState)
{
nsresult rv = NS_OK;
*aAccState = 0;
*aState = 0;
nsCOMPtr<nsIDOMElement> currElement(do_QueryInterface(mDOMNode));
if (currElement) {
@ -557,30 +557,30 @@ NS_IMETHODIMP nsAccessible::GetAccState(PRUint32 *aAccState)
PRBool isDisabled = PR_FALSE;
currElement->HasAttribute(NS_LITERAL_STRING("disabled"), &isDisabled);
if (isDisabled)
*aAccState |= STATE_UNAVAILABLE;
*aState |= STATE_UNAVAILABLE;
else {
*aAccState |= STATE_FOCUSABLE;
*aState |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMNode> focusedNode;
if (NS_SUCCEEDED(GetFocusedNode(mDOMNode, getter_AddRefs(focusedNode))) && focusedNode == mDOMNode)
*aAccState |= STATE_FOCUSED;
*aState |= STATE_FOCUSED;
}
}
// Check if STATE_OFFSCREEN bitflag should be turned on for this object
PRBool isOffscreen;
if (!IsPartiallyVisible(&isOffscreen)) {
*aAccState |= STATE_INVISIBLE;
*aState |= STATE_INVISIBLE;
if (isOffscreen)
*aAccState |= STATE_OFFSCREEN;
*aState |= STATE_OFFSCREEN;
}
return rv;
}
/* readonly attribute boolean accFocused; */
NS_IMETHODIMP nsAccessible::GetAccFocused(nsIAccessible **aAccFocused)
/* readonly attribute boolean focusedChild; */
NS_IMETHODIMP nsAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
{
*aAccFocused = nsnull;
*aFocusedChild = nsnull;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
@ -591,8 +591,8 @@ NS_IMETHODIMP nsAccessible::GetAccFocused(nsIAccessible **aAccFocused)
if (NS_SUCCEEDED(accService->GetAccessibleInWeakShell(focusedNode,
mWeakShell,
getter_AddRefs(accessible)))) {
*aAccFocused = accessible;
NS_ADDREF(*aAccFocused);
*aFocusedChild = accessible;
NS_ADDREF(*aFocusedChild);
return NS_OK;
}
}
@ -600,11 +600,11 @@ NS_IMETHODIMP nsAccessible::GetAccFocused(nsIAccessible **aAccFocused)
return NS_ERROR_FAILURE;
}
/* nsIAccessible accGetChildAt (in long x, in long y); */
NS_IMETHODIMP nsAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
/* nsIAccessible getChildAtPoint (in long x, in long y); */
NS_IMETHODIMP nsAccessible::GetChildAtPoint(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
{
PRInt32 x, y, w, h;
AccGetBounds(&x,&y,&w,&h);
GetBounds(&x,&y,&w,&h);
if (tx >= x && tx < x + w && ty >= y && ty < y + h)
{
@ -612,9 +612,9 @@ NS_IMETHODIMP nsAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_re
nsCOMPtr<nsIAccessible> next;
PRInt32 numChildren; // Make sure all children cached first
GetAccChildCount(&numChildren);
GetChildCount(&numChildren);
GetAccFirstChild(getter_AddRefs(child));
GetFirstChild(getter_AddRefs(child));
PRInt32 cx,cy,cw,ch;
@ -622,18 +622,18 @@ NS_IMETHODIMP nsAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_re
// First test if offscreen bit is set for menus
// We don't want to walk into offscreen menus or menu items
PRUint32 role = ROLE_NOTHING, state = 0;
child->GetAccRole(&role);
child->GetRole(&role);
if (role == ROLE_MENUPOPUP || role == ROLE_MENUITEM || role == ROLE_SEPARATOR) {
child->GetAccState(&state);
child->GetState(&state);
if (role == ROLE_MENUPOPUP && (state&STATE_OFFSCREEN) == 0) {
// Skip menupopup layer and go straight to menuitem's
return child->AccGetAt(tx, ty, _retval);
return child->GetChildAtPoint(tx, ty, _retval);
}
}
if ((state & STATE_OFFSCREEN) == 0) { // Don't walk into offscreen menu items
child->AccGetBounds(&cx,&cy,&cw,&ch);
child->GetBounds(&cx,&cy,&cw,&ch);
if (tx >= cx && tx < cx + cw && ty >= cy && ty < cy + ch)
{
*_retval = child;
@ -641,7 +641,7 @@ NS_IMETHODIMP nsAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_re
return NS_OK;
}
}
child->GetAccNextSibling(getter_AddRefs(next));
child->GetNextSibling(getter_AddRefs(next));
child = next;
}
}
@ -651,7 +651,7 @@ NS_IMETHODIMP nsAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_re
return NS_OK;
}
NS_IMETHODIMP nsAccessible::AccGetDOMNode(nsIDOMNode **_retval)
NS_IMETHODIMP nsAccessible::GetDOMNode(nsIDOMNode **_retval)
{
*_retval = mDOMNode;
NS_IF_ADDREF(*_retval);
@ -724,7 +724,7 @@ void nsAccessible::GetScrollOffset(nsRect *aRect)
}
void nsAccessible::GetBounds(nsRect& aTotalBounds, nsIFrame** aBoundingFrame)
void nsAccessible::GetBoundsRect(nsRect& aTotalBounds, nsIFrame** aBoundingFrame)
{
/*
* This method is used to determine the bounds of a content node.
@ -823,8 +823,8 @@ void nsAccessible::GetBounds(nsRect& aTotalBounds, nsIFrame** aBoundingFrame)
}
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
/* void getBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
// This routine will get the entire rectange for all the frames in this node
// -------------------------------------------------------------------------
@ -844,7 +844,7 @@ NS_IMETHODIMP nsAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width,
nsRect unionRectTwips;
nsIFrame* aBoundingFrame = nsnull;
GetBounds(unionRectTwips, &aBoundingFrame); // Unions up all primary frames for this node and all siblings after it
GetBoundsRect(unionRectTwips, &aBoundingFrame); // Unions up all primary frames for this node and all siblings after it
if (!aBoundingFrame) {
*x = *y = *width = *height = 0;
return NS_ERROR_FAILURE;
@ -860,7 +860,7 @@ NS_IMETHODIMP nsAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width,
nsRect orgRectPixels, pageRectPixels;
GetScreenOrigin(presContext, aBoundingFrame, &orgRectPixels);
PRUint32 role;
GetAccRole(&role);
GetRole(&role);
if (role != ROLE_PANE)
GetScrollOffset(&pageRectPixels); // Add scroll offsets if not the document itself
*x += orgRectPixels.x - pageRectPixels.x;
@ -893,8 +893,8 @@ nsIFrame* nsAccessible::GetBoundsFrame()
return GetFrame();
}
/* void accRemoveSelection (); */
NS_IMETHODIMP nsAccessible::AccRemoveSelection()
/* void removeSelection (); */
NS_IMETHODIMP nsAccessible::RemoveSelection()
{
nsCOMPtr<nsISelectionController> control(do_QueryReferent(mWeakShell));
if (!control) {
@ -918,8 +918,8 @@ NS_IMETHODIMP nsAccessible::AccRemoveSelection()
return NS_OK;
}
/* void accTakeSelection (); */
NS_IMETHODIMP nsAccessible::AccTakeSelection()
/* void takeSelection (); */
NS_IMETHODIMP nsAccessible::TakeSelection()
{
nsCOMPtr<nsISelectionController> control(do_QueryReferent(mWeakShell));
if (!control)
@ -965,8 +965,8 @@ NS_IMETHODIMP nsAccessible::AccTakeSelection()
return NS_ERROR_FAILURE;
}
/* void accTakeFocus (); */
NS_IMETHODIMP nsAccessible::AccTakeFocus()
/* void takeFocus (); */
NS_IMETHODIMP nsAccessible::TakeFocus()
{
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
if (!content) {
@ -1204,7 +1204,7 @@ NS_IMETHODIMP nsAccessible::AppendLabelFor(nsIContent *aLookNode, const nsAStrin
* the DOM tree to the form, concatonating label elements as it goes. Then checks for
* labels with the for="controlID" property.
*/
NS_IMETHODIMP nsAccessible::GetHTMLAccName(nsAString& _retval)
NS_IMETHODIMP nsAccessible::GetHTMLName(nsAString& _retval)
{
if (!mWeakShell || !mDOMNode) {
return NS_ERROR_FAILURE;
@ -1246,7 +1246,7 @@ NS_IMETHODIMP nsAccessible::GetHTMLAccName(nsAString& _retval)
label.CompressWhitespace();
if (label.IsEmpty())
return nsAccessible::GetAccName(_retval);
return nsAccessible::GetName(_retval);
_retval.Assign(label);
@ -1265,8 +1265,7 @@ NS_IMETHODIMP nsAccessible::GetHTMLAccName(nsAString& _retval)
* the control that uses the control="controlID" syntax will use
* the child label for its Name.
*/
/* wstring getAccName (); */
NS_IMETHODIMP nsAccessible::GetXULAccName(nsAString& _retval)
NS_IMETHODIMP nsAccessible::GetXULName(nsAString& _retval)
{
nsresult rv;
nsAutoString label;
@ -1361,92 +1360,92 @@ NS_IMETHODIMP nsAccessible::FireToolkitEvent(PRUint32 aEvent, nsIAccessible *aTa
// Not implemented by this class
/* DOMString getAccValue (); */
NS_IMETHODIMP nsAccessible::GetAccValue(nsAString& _retval)
/* DOMString getValue (); */
NS_IMETHODIMP nsAccessible::GetValue(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setAccName (in DOMString name); */
NS_IMETHODIMP nsAccessible::SetAccName(const nsAString& name)
/* void setName (in DOMString name); */
NS_IMETHODIMP nsAccessible::SetName(const nsAString& name)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getKeybinding (); */
NS_IMETHODIMP nsAccessible::GetAccKeybinding(nsAString& _retval)
/* DOMString getKeyBinding (); */
NS_IMETHODIMP nsAccessible::GetKeyBinding(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsAccessible::GetAccRole(PRUint32 *_retval)
/* unsigned long getRole (); */
NS_IMETHODIMP nsAccessible::GetRole(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsAccessible::GetNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsAccessible::AccDoAction(PRUint8 index)
/* void doAction (in PRUint8 index); */
NS_IMETHODIMP nsAccessible::DoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* DOMString getAccHelp (); */
NS_IMETHODIMP nsAccessible::GetAccHelp(nsAString& _retval)
/* DOMString getHelp (); */
NS_IMETHODIMP nsAccessible::GetHelp(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetFromRight(); */
NS_IMETHODIMP nsAccessible::AccGetFromRight(nsIAccessible **_retval)
/* nsIAccessible getAccessibleToRight(); */
NS_IMETHODIMP nsAccessible::GetAccessibleToRight(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetFromLeft(); */
NS_IMETHODIMP nsAccessible::AccGetFromLeft(nsIAccessible **_retval)
/* nsIAccessible getAccessibleToLeft(); */
NS_IMETHODIMP nsAccessible::GetAccessibleToLeft(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetFromAbove(); */
NS_IMETHODIMP nsAccessible::AccGetFromAbove(nsIAccessible **_retval)
/* nsIAccessible getAccessibleAbove(); */
NS_IMETHODIMP nsAccessible::GetAccessibleAbove(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIAccessible accGetFromBelow(); */
NS_IMETHODIMP nsAccessible::AccGetFromBelow(nsIAccessible **_retval)
/* nsIAccessible getAccessibleBelow(); */
NS_IMETHODIMP nsAccessible::GetAccessibleBelow(nsIAccessible **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accAddSelection (); */
NS_IMETHODIMP nsAccessible::AccAddSelection()
/* void addSelection (); */
NS_IMETHODIMP nsAccessible::AddSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accExtendSelection (); */
NS_IMETHODIMP nsAccessible::AccExtendSelection()
/* void extendSelection (); */
NS_IMETHODIMP nsAccessible::ExtendSelection()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* unsigned long getAccExtState (); */
NS_IMETHODIMP nsAccessible::GetAccExtState(PRUint32 *_retval)
/* unsigned long getExtState (); */
NS_IMETHODIMP nsAccessible::GetExtState(PRUint32 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

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

@ -86,12 +86,12 @@ public:
protected:
virtual nsIFrame* GetBoundsFrame();
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);
PRBool IsPartiallyVisible(PRBool *aIsOffscreen);
NS_IMETHOD AppendLabelText(nsIDOMNode *aLabelNode, nsAString& _retval);
NS_IMETHOD AppendLabelFor(nsIContent *aLookNode, const nsAString *aId, nsAString *aLabel);
NS_IMETHOD GetHTMLAccName(nsAString& _retval);
NS_IMETHOD GetXULAccName(nsAString& _retval);
NS_IMETHOD GetHTMLName(nsAString& _retval);
NS_IMETHOD GetXULName(nsAString& _retval);
NS_IMETHOD AppendFlatStringFromSubtree(nsIContent *aContent, nsAString *aFlatString);
NS_IMETHOD AppendFlatStringFromContentNode(nsIContent *aContent, nsAString *aFlatString);
NS_IMETHOD AppendStringWithSpaces(nsAString *aFlatString, const nsAString& textEquivalent);

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

@ -51,6 +51,7 @@ class nsAccessibleEventData: public nsIAccessibleEvent
nsAccessibleEventData(PRUint32 aEventType, nsIAccessible *aAccessible,
nsIAccessibleDocument *aDocAccessible,
void *aEventData);
virtual ~nsAccessibleEventData() {};
NS_DECL_ISUPPORTS

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

@ -58,11 +58,11 @@ nsBlockAccessible::nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell
NS_IMPL_ISUPPORTS_INHERITED0(nsBlockAccessible, nsAccessible)
/* nsIAccessible accGetAt (in long x, in long y); */
NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
NS_IMETHODIMP nsBlockAccessible::GetChildAtPoint(PRInt32 tx, PRInt32 ty, nsIAccessible **_retval)
{
// We're going to find the child that contains coordinates (tx,ty)
PRInt32 x,y,w,h;
AccGetBounds(&x,&y,&w,&h); // Get bounds for this accessible
GetBounds(&x,&y,&w,&h); // Get bounds for this accessible
if (tx >= x && tx < x + w && ty >= y && ty < y + h)
{
// It's within this nsIAccessible, let's drill down
@ -70,11 +70,11 @@ NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible
nsCOMPtr<nsIAccessible> smallestChild;
PRInt32 smallestArea = -1;
nsCOMPtr<nsIAccessible> next;
GetAccFirstChild(getter_AddRefs(child));
GetFirstChild(getter_AddRefs(child));
PRInt32 cx,cy,cw,ch; // Child bounds
while(child) {
child->AccGetBounds(&cx,&cy,&cw,&ch);
child->GetBounds(&cx,&cy,&cw,&ch);
// ok if there are multiple frames the contain the point
// and they overlap then pick the smallest. We need to do this
@ -92,7 +92,7 @@ NS_IMETHODIMP nsBlockAccessible::AccGetAt(PRInt32 tx, PRInt32 ty, nsIAccessible
smallestChild = child;
}
}
child->GetAccNextSibling(getter_AddRefs(next));
child->GetNextSibling(getter_AddRefs(next));
child = next;
}
@ -124,22 +124,22 @@ nsAccessibleWrap(aNode, aShell)
NS_IMPL_ISUPPORTS_INHERITED0(nsLeafAccessible, nsAccessible)
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccFirstChild(nsIAccessible **_retval)
/* nsIAccessible getFirstChild (); */
NS_IMETHODIMP nsLeafAccessible::GetFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsLeafAccessible::GetAccLastChild(nsIAccessible **_retval)
/* nsIAccessible getLastChild (); */
NS_IMETHODIMP nsLeafAccessible::GetLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsLeafAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsLeafAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
@ -160,7 +160,7 @@ nsLinkableAccessible::nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference*
NS_IMPL_ISUPPORTS_INHERITED0(nsLinkableAccessible, nsAccessible)
NS_IMETHODIMP nsLinkableAccessible::AccTakeFocus()
NS_IMETHODIMP nsLinkableAccessible::TakeFocus()
{
if (IsALink()) {
mLinkContent->SetFocus(nsCOMPtr<nsIPresContext>(GetPresContext()));
@ -169,10 +169,10 @@ NS_IMETHODIMP nsLinkableAccessible::AccTakeFocus()
return NS_OK;
}
/* long GetAccState (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *aState)
/* long GetState (); */
NS_IMETHODIMP nsLinkableAccessible::GetState(PRUint32 *aState)
{
nsAccessible::GetAccState(aState);
nsAccessible::GetState(aState);
if (IsALink()) {
*aState |= STATE_LINKED;
if (mIsLinkVisited)
@ -182,13 +182,13 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *aState)
if (IsALink()) {
// Make sure we also include all the states of the parent link, such as focusable, focused, etc.
PRUint32 role;
GetAccRole(&role);
GetRole(&role);
if (role != ROLE_LINK) {
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
GetParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 orState = 0;
parentAccessible->GetAccState(&orState);
parentAccessible->GetState(&orState);
*aState |= orState;
}
}
@ -206,7 +206,7 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *aState)
}
NS_IMETHODIMP nsLinkableAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsLinkableAccessible::GetValue(nsAString& _retval)
{
if (IsALink()) {
nsCOMPtr<nsIDOMNode> linkNode(do_QueryInterface(mLinkContent));
@ -219,14 +219,14 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccValue(nsAString& _retval)
/* PRUint8 getAccNumActions (); */
NS_IMETHODIMP nsLinkableAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsLinkableAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/* wstring getAccActionName (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsLinkableAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
@ -240,7 +240,7 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccActionName(PRUint8 index, nsAString& _
}
/* void accDoAction (in PRUint8 index); */
NS_IMETHODIMP nsLinkableAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsLinkableAccessible::DoAction(PRUint8 index)
{
// Action 0 (default action): Jump to link
if (index == eAction_Jump) {
@ -270,7 +270,7 @@ NS_IMETHODIMP nsLinkableAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsLinkableAccessible::GetAccKeyboardShortcut(nsAString& _retval)
NS_IMETHODIMP nsLinkableAccessible::GetKeyboardShortcut(nsAString& _retval)
{
if (IsALink()) {
nsresult rv;
@ -282,12 +282,12 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccKeyboardShortcut(nsAString& _retval)
rv = accService->GetAccessibleInWeakShell(linkNode, mWeakShell,
getter_AddRefs(linkAccessible));
if (NS_SUCCEEDED(rv) && linkAccessible)
return linkAccessible->GetAccKeyboardShortcut(_retval);
return linkAccessible->GetKeyboardShortcut(_retval);
else
return rv;
}
}
return nsAccessible::GetAccKeyboardShortcut(_retval);;
return nsAccessible::GetKeyboardShortcut(_retval);;
}
PRBool nsLinkableAccessible::IsALink()

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

@ -59,7 +59,7 @@ class nsBlockAccessible : public nsAccessibleWrap
public:
nsBlockAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD AccGetAt(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
NS_IMETHOD GetChildAtPoint(PRInt32 x, PRInt32 y, nsIAccessible **_retval);
};
/**
@ -70,9 +70,9 @@ class nsLeafAccessible : public nsAccessibleWrap
public:
nsLeafAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
};
/**
@ -85,13 +85,13 @@ class nsLinkableAccessible : public nsAccessibleWrap
public:
nsLinkableAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD AccTakeFocus();
NS_IMETHOD GetAccKeyboardShortcut(nsAString& _retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD TakeFocus();
NS_IMETHOD GetKeyboardShortcut(nsAString& _retval);
NS_IMETHOD Shutdown();
protected:

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

@ -243,7 +243,7 @@ NS_IMETHODIMP nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument *aDoc, ns
}
/** Return the caret's bounds */
NS_IMETHODIMP nsCaretAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
NS_IMETHODIMP nsCaretAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
if (!mVisible)
return NS_ERROR_FAILURE; // When root accessible hasn't yet called SetCaretBounds()
@ -254,30 +254,30 @@ NS_IMETHODIMP nsCaretAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *w
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsCaretAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CARET;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsCaretAccessible::GetState(PRUint32 *_retval)
{
*_retval = mVisible? 0: STATE_INVISIBLE;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccParent(nsIAccessible **_retval)
NS_IMETHODIMP nsCaretAccessible::GetParent(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
NS_IMETHODIMP nsCaretAccessible::GetPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
NS_IMETHODIMP nsCaretAccessible::GetAccNextSibling(nsIAccessible **_retval)
NS_IMETHODIMP nsCaretAccessible::GetNextSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;

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

@ -64,12 +64,12 @@ public:
nsCaretAccessible(nsIDOMNode* aDocumentNode, nsIWeakReference* aShell, nsRootAccessible *aRootAccessible);
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetParent(nsIAccessible **_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetPreviousSibling(nsIAccessible **_retval);
/* ----- nsIAccessibleCaret ------ */
NS_IMETHOD AttachNewSelectionListener(nsIDOMNode *aFocusedNode);

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

@ -133,27 +133,27 @@ NS_INTERFACE_MAP_END_INHERITING(nsBlockAccessible)
NS_IMPL_ADDREF_INHERITED(nsDocAccessible, nsBlockAccessible)
NS_IMPL_RELEASE_INHERITED(nsDocAccessible, nsBlockAccessible)
NS_IMETHODIMP nsDocAccessible::GetAccName(nsAString& aAccName)
NS_IMETHODIMP nsDocAccessible::GetName(nsAString& aName)
{
return GetTitle(aAccName);
return GetTitle(aName);
}
NS_IMETHODIMP nsDocAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsDocAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PANE;
return NS_OK;
}
NS_IMETHODIMP nsDocAccessible::GetAccValue(nsAString& aAccValue)
NS_IMETHODIMP nsDocAccessible::GetValue(nsAString& aValue)
{
return GetURL(aAccValue);
return GetURL(aValue);
}
NS_IMETHODIMP nsDocAccessible::GetAccState(PRUint32 *aAccState)
NS_IMETHODIMP nsDocAccessible::GetState(PRUint32 *aState)
{
*aAccState = STATE_FOCUSABLE;
*aState = STATE_FOCUSABLE;
if (mBusy == eBusyStateLoading)
*aAccState |= STATE_BUSY;
*aState |= STATE_BUSY;
#ifdef DEBUG
PRBool isEditable;
@ -162,7 +162,7 @@ NS_IMETHODIMP nsDocAccessible::GetAccState(PRUint32 *aAccState)
if (isEditable) {
// Just for debugging, to show we're in editor on pane object
// We don't use STATE_MARQUEED for anything else
*aAccState |= STATE_MARQUEED;
*aState |= STATE_MARQUEED;
}
#endif
return NS_OK;
@ -346,10 +346,10 @@ NS_IMETHODIMP nsDocAccessible::Init()
// It should be changed to use GetAccessibleInWeakShell()
nsCOMPtr<nsIAccessible> accParent;
accService->GetAccessibleFor(ownerNode, getter_AddRefs(accParent));
nsCOMPtr<nsPIAccessible> privateAccParent(do_QueryInterface(accParent));
if (privateAccParent) {
SetAccParent(accParent);
privateAccParent->SetAccFirstChild(this);
nsCOMPtr<nsPIAccessible> privateParent(do_QueryInterface(accParent));
if (privateParent) {
SetParent(accParent);
privateParent->SetFirstChild(this);
}
}
}
@ -412,7 +412,7 @@ nsIFrame* nsDocAccessible::GetFrame()
return root;
}
void nsDocAccessible::GetBounds(nsRect& aBounds, nsIFrame** aRelativeFrame)
void nsDocAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aRelativeFrame)
{
*aRelativeFrame = GetFrame();

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

@ -76,10 +76,10 @@ class nsDocAccessible : public nsBlockAccessible,
nsDocAccessible(nsIDOMNode *aNode, nsIWeakReference* aShell);
virtual ~nsDocAccessible();
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccName(nsAString& aAccName);
NS_IMETHOD GetAccValue(nsAString& aAccValue);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetName(nsAString& aName);
NS_IMETHOD GetValue(nsAString& aValue);
NS_IMETHOD GetState(PRUint32 *aState);
// ----- nsIScrollPositionListener ---------------------------
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView *aView, nscoord aX, nscoord aY);
@ -104,7 +104,7 @@ class nsDocAccessible : public nsBlockAccessible,
NS_IMETHOD Init();
protected:
virtual void GetBounds(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);
virtual nsIFrame* GetFrame();
virtual nsresult AddEventListeners();
virtual nsresult RemoveEventListeners();

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

@ -59,10 +59,10 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsFormControlAccessible, nsAccessible)
* XUL states: focused, unavailable(disabled), focusable, ?protected?
* HTML states: focused, unabailable(disabled), focusable, protected
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsFormControlAccessible::GetState(PRUint32 *_retval)
{
// Get the focused state from the nsAccessible
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
PRBool disabled = PR_FALSE;
nsresult rv = NS_ERROR_FAILURE;
@ -94,19 +94,19 @@ NS_IMETHODIMP nsFormControlAccessible::GetAccState(PRUint32 *_retval)
* merely checks who is calling and then calls the appropriate
* protected method for the XUL or HTML element.
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsFormControlAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULElement> xulFormElement(do_QueryInterface(mDOMNode));
if (xulFormElement)
return GetXULAccName(_retval);
return GetXULName(_retval);
else
return GetHTMLAccName(_retval);
return GetHTMLName(_retval);
}
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccFirstChild(nsIAccessible **_retval)
NS_IMETHODIMP nsFormControlAccessible::GetFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
@ -115,7 +115,7 @@ NS_IMETHODIMP nsFormControlAccessible::GetAccFirstChild(nsIAccessible **_retval)
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccLastChild(nsIAccessible **_retval)
NS_IMETHODIMP nsFormControlAccessible::GetLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
@ -124,7 +124,7 @@ NS_IMETHODIMP nsFormControlAccessible::GetAccLastChild(nsIAccessible **_retval)
/**
* No Children
*/
NS_IMETHODIMP nsFormControlAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsFormControlAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
@ -142,7 +142,7 @@ nsFormControlAccessible(aNode, aShell)
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsRadioButtonAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
@ -151,7 +151,7 @@ NS_IMETHODIMP nsRadioButtonAccessible::GetAccNumActions(PRUint8 *_retval)
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsRadioButtonAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
@ -163,7 +163,7 @@ NS_IMETHODIMP nsRadioButtonAccessible::GetAccActionName(PRUint8 index, nsAString
/**
*
*/
NS_IMETHODIMP nsRadioButtonAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsRadioButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_RADIOBUTTON;

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

@ -52,11 +52,11 @@ class nsFormControlAccessible : public nsAccessibleWrap
public:
nsFormControlAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
};
/**
@ -67,9 +67,9 @@ class nsRadioButtonAccessible : public nsFormControlAccessible
public:
nsRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
};

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

@ -54,39 +54,39 @@ nsOuterDocAccessible::nsOuterDocAccessible(nsIDOMNode* aNode,
}
/* attribute wstring accName; */
NS_IMETHODIMP nsOuterDocAccessible::GetAccName(nsAString& aAccName)
NS_IMETHODIMP nsOuterDocAccessible::GetName(nsAString& aName)
{
nsCOMPtr<nsIAccessibleDocument> accDoc(do_QueryInterface(mFirstChild));
if (!accDoc) {
return NS_ERROR_FAILURE;
}
nsresult rv = accDoc->GetTitle(aAccName);
if (NS_FAILED(rv) || aAccName.IsEmpty())
rv = accDoc->GetURL(aAccName);
nsresult rv = accDoc->GetTitle(aName);
if (NS_FAILED(rv) || aName.IsEmpty())
rv = accDoc->GetURL(aName);
return rv;
}
NS_IMETHODIMP nsOuterDocAccessible::GetAccValue(nsAString& aAccValue)
NS_IMETHODIMP nsOuterDocAccessible::GetValue(nsAString& aValue)
{
return NS_OK;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsOuterDocAccessible::GetAccRole(PRUint32 *_retval)
/* unsigned long getRole (); */
NS_IMETHODIMP nsOuterDocAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CLIENT;
return NS_OK;
}
NS_IMETHODIMP nsOuterDocAccessible::GetAccState(PRUint32 *aAccState)
NS_IMETHODIMP nsOuterDocAccessible::GetState(PRUint32 *aState)
{
return nsAccessible::GetAccState(aAccState);
return nsAccessible::GetState(aState);
}
NS_IMETHODIMP nsOuterDocAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y,
NS_IMETHODIMP nsOuterDocAccessible::GetBounds(PRInt32 *x, PRInt32 *y,
PRInt32 *width, PRInt32 *height)
{
return mFirstChild? mFirstChild->AccGetBounds(x, y, width, height): NS_ERROR_FAILURE;
return mFirstChild? mFirstChild->GetBounds(x, y, width, height): NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsOuterDocAccessible::Init()
@ -121,8 +121,8 @@ NS_IMETHODIMP nsOuterDocAccessible::Init()
getter_AddRefs(innerAccessible));
NS_ENSURE_TRUE(innerAccessible, NS_ERROR_FAILURE);
SetAccFirstChild(innerAccessible); // weak ref
SetFirstChild(innerAccessible); // weak ref
nsCOMPtr<nsPIAccessible> privateInnerAccessible =
do_QueryInterface(innerAccessible);
return privateInnerAccessible->SetAccParent(this);
return privateInnerAccessible->SetParent(this);
}

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

@ -52,11 +52,11 @@ class nsOuterDocAccessible : public nsAccessibleWrap
nsOuterDocAccessible(nsIDOMNode* aNode,
nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& aAccName);
NS_IMETHOD GetAccValue(nsAString& AccValue);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *aAccState);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y,
NS_IMETHOD GetName(nsAString& aName);
NS_IMETHOD GetValue(nsAString& Value);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetState(PRUint32 *aState);
NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y,
PRInt32 *width, PRInt32 *height);
NS_IMETHOD Init();

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

@ -109,20 +109,20 @@ nsRootAccessible::~nsRootAccessible()
// helpers
/* readonly attribute nsIAccessible accParent; */
NS_IMETHODIMP nsRootAccessible::GetAccParent(nsIAccessible * *aAccParent)
NS_IMETHODIMP nsRootAccessible::GetParent(nsIAccessible * *aParent)
{
*aAccParent = nsnull;
*aParent = nsnull;
return NS_OK;
}
/* readonly attribute unsigned long accRole; */
NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
NS_IMETHODIMP nsRootAccessible::GetRole(PRUint32 *aRole)
{
if (!mDocument) {
return NS_ERROR_FAILURE;
}
*aAccRole = ROLE_PANE;
*aRole = ROLE_PANE;
// If it's a <dialog>, use ROLE_DIALOG instead
nsCOMPtr<nsIContent> rootContent;
@ -133,7 +133,7 @@ NS_IMETHODIMP nsRootAccessible::GetAccRole(PRUint32 *aAccRole)
nsAutoString name;
rootElement->GetLocalName(name);
if (name.Equals(NS_LITERAL_STRING("dialog")))
*aAccRole = ROLE_DIALOG;
*aRole = ROLE_DIALOG;
}
}
@ -255,7 +255,7 @@ void nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *focusAccessible,
privateFocusAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_FOCUS, focusAccessible, nsnull);
NS_IF_RELEASE(gLastFocusedNode);
PRUint32 role = ROLE_NOTHING;
focusAccessible->GetAccRole(&role);
focusAccessible->GetRole(&role);
if (role != ROLE_MENUITEM && role != ROLE_LISTITEM) {
// It must report all focus events on menu and list items
gLastFocusedNode = focusNode;
@ -414,9 +414,9 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUSTART, accessible, nsnull);
else if (eventType.EqualsIgnoreCase("DOMMenuBarInactive")) {
privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_MENUEND, accessible, nsnull);
GetAccFocused(getter_AddRefs(accessible));
GetFocusedChild(getter_AddRefs(accessible));
if (accessible) {
accessible->AccGetDOMNode(getter_AddRefs(targetNode));
accessible->GetDOMNode(getter_AddRefs(targetNode));
FireAccessibleFocusEvent(accessible, targetNode);
}
}
@ -429,7 +429,7 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
menuEvent = nsIAccessibleEvent::EVENT_MENUPOPUPEND;
if (menuEvent) {
PRUint32 role = ROLE_NOTHING;
accessible->GetAccRole(&role);
accessible->GetRole(&role);
if (role == ROLE_MENUPOPUP)
privAcc->FireToolkitEvent(menuEvent, accessible, nsnull);
}
@ -474,7 +474,7 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent)
}
else if (eventType.EqualsIgnoreCase("CheckboxStateChange") || // it's a XUL <checkbox>
eventType.EqualsIgnoreCase("RadioStateChange")) { // it's a XUL <radio>
accessible->GetAccState(&stateData.state);
accessible->GetState(&stateData.state);
stateData.enable = (stateData.state & STATE_CHECKED) != 0;
stateData.state = STATE_CHECKED;
privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, accessible, &stateData);

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

@ -65,8 +65,8 @@ class nsRootAccessible : public nsDocAccessibleWrap,
virtual ~nsRootAccessible();
/* attribute wstring accName; */
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetParent(nsIAccessible * *aParent);
NS_IMETHOD GetRole(PRUint32 *aRole);
// ----- nsIDOMEventListener --------------------------
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);

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

@ -55,7 +55,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsTextAccessible, nsLinkableAccessible)
/**
* We are text
*/
NS_IMETHODIMP nsTextAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsTextAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
@ -64,7 +64,7 @@ NS_IMETHODIMP nsTextAccessible::GetAccRole(PRUint32 *_retval)
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccFirstChild(nsIAccessible **_retval)
NS_IMETHODIMP nsTextAccessible::GetFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
@ -73,7 +73,7 @@ NS_IMETHODIMP nsTextAccessible::GetAccFirstChild(nsIAccessible **_retval)
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccLastChild(nsIAccessible **_retval)
NS_IMETHODIMP nsTextAccessible::GetLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
@ -82,7 +82,7 @@ NS_IMETHODIMP nsTextAccessible::GetAccLastChild(nsIAccessible **_retval)
/**
* No Children
*/
NS_IMETHODIMP nsTextAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsTextAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;

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

@ -53,10 +53,10 @@ public:
NS_DECL_ISUPPORTS_INHERITED
nsTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
};

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

@ -49,35 +49,35 @@
// --- area -----
nsHTMLAreaAccessible::nsHTMLAreaAccessible(nsIDOMNode *aDomNode, nsIAccessible *aAccParent, nsIWeakReference* aShell):
nsHTMLAreaAccessible::nsHTMLAreaAccessible(nsIDOMNode *aDomNode, nsIAccessible *aParent, nsIWeakReference* aShell):
nsLinkableAccessible(aDomNode, aShell)
{
Init(); // Make sure we're in cache
mParent = aAccParent;
mParent = aParent;
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccName(nsAString & _retval)
/* wstring getName (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetName(nsAString & _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt) {
nsAutoString hrefString;
elt->GetAttribute(NS_LITERAL_STRING("title"), _retval);
if (_retval.IsEmpty())
GetAccValue(_retval);
GetValue(_retval);
}
return NS_OK;
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccRole(PRUint32 *_retval)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}
/* wstring getAccDescription (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccDescription(nsAString& _retval)
/* wstring getDescription (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetDescription(nsAString& _retval)
{
// Still to do - follow IE's standard here
nsCOMPtr<nsIDOMHTMLAreaElement> area(do_QueryInterface(mDOMNode));
@ -87,32 +87,32 @@ NS_IMETHODIMP nsHTMLAreaAccessible::GetAccDescription(nsAString& _retval)
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccFirstChild(nsIAccessible **_retval)
/* nsIAccessible getFirstChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetFirstChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccLastChild(nsIAccessible **_retval)
/* nsIAccessible getLastChild (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetLastChild(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
}
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsHTMLAreaAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 0;
return NS_OK;
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccParent(nsIAccessible * *aAccParent)
NS_IMETHODIMP nsHTMLAreaAccessible::GetParent(nsIAccessible * *aParent)
{
*aAccParent = mParent;
NS_IF_ADDREF(*aAccParent);
*aParent = mParent;
NS_IF_ADDREF(*aParent);
return NS_OK;
}
@ -131,18 +131,18 @@ nsIAccessible *nsHTMLAreaAccessible::GetAreaAccessible(nsIDOMNode *aDOMNode)
}
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccNextSibling(nsIAccessible * *aAccNextSibling)
NS_IMETHODIMP nsHTMLAreaAccessible::GetNextSibling(nsIAccessible * *aNextSibling)
{
*aAccNextSibling = nsnull;
*aNextSibling = nsnull;
nsCOMPtr<nsIDOMNode> nextNode;
mDOMNode->GetNextSibling(getter_AddRefs(nextNode));
if (nextNode)
*aAccNextSibling = GetAreaAccessible(nextNode);
*aNextSibling = GetAreaAccessible(nextNode);
return NS_OK;
}
/* readonly attribute nsIAccessible accPreviousSibling; */
NS_IMETHODIMP nsHTMLAreaAccessible::GetAccPreviousSibling(nsIAccessible * *aAccPrevSibling)
NS_IMETHODIMP nsHTMLAreaAccessible::GetPreviousSibling(nsIAccessible * *aAccPrevSibling)
{
*aAccPrevSibling = nsnull;
nsCOMPtr<nsIDOMNode> prevNode;
@ -154,7 +154,7 @@ NS_IMETHODIMP nsHTMLAreaAccessible::GetAccPreviousSibling(nsIAccessible * *aAccP
/* void accGetBounds (out long x, out long y, out long width, out long height); */
NS_IMETHODIMP nsHTMLAreaAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
NS_IMETHODIMP nsHTMLAreaAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
// Essentially this uses GetRect on mAreas of nsImageMap from nsImageFrame

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

@ -50,16 +50,16 @@ class nsHTMLAreaAccessible : public nsLinkableAccessible
public:
nsHTMLAreaAccessible(nsIDOMNode *domNode, nsIAccessible *accParent, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString & _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccParent(nsIAccessible * *aAccParent);
NS_IMETHOD GetAccNextSibling(nsIAccessible * *aAccNextSibling);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible * *aAccPreviousSibling);
NS_IMETHOD GetAccDescription(nsAString& _retval);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD GetName(nsAString & _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
NS_IMETHOD GetParent(nsIAccessible * *aParent);
NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling);
NS_IMETHOD GetPreviousSibling(nsIAccessible * *aPreviousSibling);
NS_IMETHOD GetDescription(nsAString& _retval);
NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
protected:
nsIAccessible *GetAreaAccessible(nsIDOMNode *aDOMNode);

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

@ -55,24 +55,24 @@ nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) { // 0 is the magic value for default action
// check or uncheck
PRUint32 state;
GetAccState(&state);
GetState(&state);
if (state & STATE_CHECKED)
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("uncheck"), _retval);
@ -84,7 +84,7 @@ NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccActionName(PRUint8 index, nsAStrin
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsHTMLCheckboxAccessible::DoAction(PRUint8 index)
{
if (index == 0) { // 0 is the magic value for default action
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
@ -97,9 +97,9 @@ NS_IMETHODIMP nsHTMLCheckboxAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLCheckboxAccessible::GetState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement(do_QueryInterface(mDOMNode));
@ -119,7 +119,7 @@ nsRadioButtonAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsHTMLRadioButtonAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
@ -131,9 +131,9 @@ NS_IMETHODIMP nsHTMLRadioButtonAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLRadioButtonAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLRadioButtonAccessible::GetState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlRadioElement(do_QueryInterface(mDOMNode));
@ -153,13 +153,13 @@ nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsHTMLButtonAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsHTMLButtonAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("press"), _retval);
@ -168,7 +168,7 @@ NS_IMETHODIMP nsHTMLButtonAccessible::GetAccActionName(PRUint8 index, nsAString&
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsHTMLButtonAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMHTMLInputElement> element(do_QueryInterface(mDOMNode));
@ -180,9 +180,9 @@ NS_IMETHODIMP nsHTMLButtonAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLButtonAccessible::GetState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No nsIDOMElement for button node!");
@ -194,13 +194,13 @@ NS_IMETHODIMP nsHTMLButtonAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTMLButtonAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsHTMLButtonAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMHTMLInputElement> button(do_QueryInterface(mDOMNode));
@ -228,13 +228,13 @@ nsLeafAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsHTML4ButtonAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsHTML4ButtonAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("press"), _retval);
@ -243,7 +243,7 @@ NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccActionName(PRUint8 index, nsAString
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsHTML4ButtonAccessible::DoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMNSHTMLButtonElement> buttonElement(do_QueryInterface(mDOMNode));
@ -257,15 +257,15 @@ NS_IMETHODIMP nsHTML4ButtonAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTML4ButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTML4ButtonAccessible::GetState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
@ -279,7 +279,7 @@ NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsHTML4ButtonAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsHTML4ButtonAccessible::GetName(nsAString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
@ -307,16 +307,16 @@ nsFormControlAccessible(aNode, aShell)
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTextFieldAccessible, nsFormControlAccessible)
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetValue(nsAString& _retval)
{
PRUint32 state;
GetAccState(&state);
GetState(&state);
if (state & STATE_PROTECTED) // Don't return password text!
return NS_ERROR_FAILURE;
@ -340,7 +340,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccValue(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLTextFieldAccessible::GetState(PRUint32 *_retval)
{
// can be
// focusable, focused, protected. readonly, unavailable, selected
@ -356,7 +356,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
// to get the accessible state from. Doesn't add to cache
// because Init() is not called.
nsHTMLTextFieldAccessible tempAccessible(inputField, mWeakShell);
return tempAccessible.GetAccState(_retval);
return tempAccessible.GetState(_retval);
}
#endif
@ -364,7 +364,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
return NS_ERROR_FAILURE; // Node has been Shutdown()
}
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval |= STATE_FOCUSABLE;
nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mDOMNode));
@ -406,7 +406,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAccState(PRUint32 *_retval)
if (inputElement) {
/////// ====== Must be a password field, so it uses nsIDOMHTMLFormControl ==== ///////
PRUint32 moreStates = 0;
nsresult rv = nsFormControlAccessible::GetAccState(&moreStates);
nsresult rv = nsFormControlAccessible::GetState(&moreStates);
*_retval |= moreStates;
return rv;
}
@ -432,13 +432,13 @@ nsAccessibleWrap(aNode, aShell)
{
}
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
return NS_OK;
}
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetState(PRUint32 *_retval)
{
// Groupbox doesn't support any states!
*_retval = 0;
@ -446,7 +446,7 @@ NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsHTMLGroupboxAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (element) {

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

@ -47,11 +47,11 @@ class nsHTMLCheckboxAccessible : public nsFormControlAccessible
public:
nsHTMLCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
@ -59,8 +59,8 @@ class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
public:
nsHTMLRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsHTMLButtonAccessible : public nsFormControlAccessible
@ -68,12 +68,12 @@ class nsHTMLButtonAccessible : public nsFormControlAccessible
public:
nsHTMLButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
};
class nsHTML4ButtonAccessible : public nsLeafAccessible
@ -81,12 +81,12 @@ class nsHTML4ButtonAccessible : public nsLeafAccessible
public:
nsHTML4ButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
};
class nsHTMLTextFieldAccessible : public nsFormControlAccessible
@ -97,18 +97,18 @@ public:
nsHTMLTextFieldAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsHTMLGroupboxAccessible : public nsAccessibleWrap
{
public:
nsHTMLGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
};
#endif

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

@ -73,12 +73,12 @@ nsLinkableAccessible(aDOMNode, aShell)
}
}
NS_IMETHODIMP nsHTMLImageAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLImageAccessible::GetState(PRUint32 *_retval)
{
// The state is a bitfield, get our inherited state, then logically OR it with STATE_ANIMATED if this
// is an animated image.
nsLinkableAccessible::GetAccState(_retval);
nsLinkableAccessible::GetState(_retval);
nsCOMPtr<nsIImageLoadingContent> content(do_QueryInterface(mDOMNode));
nsCOMPtr<imgIRequest> imageRequest;
@ -102,8 +102,8 @@ NS_IMETHODIMP nsHTMLImageAccessible::GetAccState(PRUint32 *_retval)
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccName(nsAString& _retval)
/* wstring getName (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetName(nsAString& _retval)
{
nsresult rv = NS_ERROR_FAILURE;
@ -120,8 +120,8 @@ NS_IMETHODIMP nsHTMLImageAccessible::GetAccName(nsAString& _retval)
return rv;
}
/* wstring getAccRole (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccRole(PRUint32 *_retval)
/* wstring getRole (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GRAPHIC;
return NS_OK;
@ -135,7 +135,7 @@ nsIAccessible *nsHTMLImageAccessible::CreateAreaAccessible(PRInt32 areaNum)
if (areaNum == -1) {
PRInt32 numAreaMaps;
GetAccChildCount(&numAreaMaps);
GetChildCount(&numAreaMaps);
if (numAreaMaps<=0)
return nsnull;
areaNum = NS_STATIC_CAST(PRUint32,numAreaMaps-1);
@ -166,16 +166,16 @@ nsIAccessible *nsHTMLImageAccessible::CreateAreaAccessible(PRInt32 areaNum)
}
/* nsIAccessible getAccFirstChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccFirstChild(nsIAccessible **_retval)
/* nsIAccessible getFirstChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetFirstChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(0);
return NS_OK;
}
/* nsIAccessible getAccLastChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccLastChild(nsIAccessible **_retval)
/* nsIAccessible getLastChild (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetLastChild(nsIAccessible **_retval)
{
*_retval = CreateAreaAccessible(-1);
return NS_OK;
@ -183,7 +183,7 @@ NS_IMETHODIMP nsHTMLImageAccessible::GetAccLastChild(nsIAccessible **_retval)
#ifdef NEVER
/* long getAccChildCount (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsHTMLImageAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 0;
if (mMapElement) {

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

@ -53,11 +53,11 @@ class nsHTMLImageAccessible : public nsLinkableAccessible
public:
nsHTMLImageAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
protected:
nsIAccessible *CreateAreaAccessible(PRInt32 areaNum);

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

@ -46,8 +46,8 @@ nsLinkableAccessible(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccName(nsAString& _retval)
/* wstring getName (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetName(nsAString& _retval)
{
if (!IsALink()) // Also initializes private data members
return NS_ERROR_FAILURE;
@ -55,17 +55,17 @@ NS_IMETHODIMP nsHTMLLinkAccessible::GetAccName(nsAString& _retval)
return AppendFlatStringFromSubtree(mLinkContent,&_retval);
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccRole(PRUint32 *_retval)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLLinkAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LINK;
return NS_OK;
}
NS_IMETHODIMP nsHTMLLinkAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLLinkAccessible::GetState(PRUint32 *_retval)
{
nsLinkableAccessible::GetAccState(_retval);
nsLinkableAccessible::GetState(_retval);
*_retval &= ~(STATE_READONLY|STATE_SELECTABLE);
return NS_OK;

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

@ -48,9 +48,9 @@ class nsHTMLLinkAccessible : public nsLinkableAccessible
public:
nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
#endif

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

@ -262,13 +262,13 @@ NS_IMETHODIMP nsHTMLSelectableAccessible::GetSelectionCount(PRInt32 *aSelectionC
return NS_OK;
}
NS_IMETHODIMP nsHTMLSelectableAccessible::AddSelection(PRInt32 aIndex)
NS_IMETHODIMP nsHTMLSelectableAccessible::AddChildToSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Add, &isSelected);
}
NS_IMETHODIMP nsHTMLSelectableAccessible::RemoveSelection(PRInt32 aIndex)
NS_IMETHODIMP nsHTMLSelectableAccessible::RemoveChildFromSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Remove, &isSelected);
@ -323,9 +323,9 @@ nsHTMLSelectListAccessible::nsHTMLSelectListAccessible(nsIDOMNode* aDOMNode,
* STATE_MULTISELECTABLE
* STATE_EXTSELECTABLE
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLSelectListAccessible::GetState(PRUint32 *_retval)
{
nsHTMLSelectableAccessible::GetAccState(_retval);
nsHTMLSelectableAccessible::GetState(_retval);
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if ( select ) {
PRBool multiple;
@ -337,7 +337,7 @@ NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLSelectListAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
@ -348,14 +348,14 @@ NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccRole(PRUint32 *_retval)
* Gets the first child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **aAccFirstChild)
NS_IMETHODIMP nsHTMLSelectListAccessible::GetFirstChild(nsIAccessible **aFirstChild)
{
nsCOMPtr<nsIDOMNode> first;
mDOMNode->GetFirstChild(getter_AddRefs(first));
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
nsresult rv = accService->GetAccessibleInWeakShell(first, mWeakShell, aAccFirstChild);
mFirstChild = *aAccFirstChild;
nsresult rv = accService->GetAccessibleInWeakShell(first, mWeakShell, aFirstChild);
mFirstChild = *aFirstChild;
return rv;
}
@ -363,13 +363,13 @@ NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccFirstChild(nsIAccessible **aAccF
* Gets the last child of the DOM node and creates and returns
* a nsHTMLSelectOptionAccessible.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **aAccLastChild)
NS_IMETHODIMP nsHTMLSelectListAccessible::GetLastChild(nsIAccessible **aLastChild)
{
nsCOMPtr<nsIDOMNode> last;
mDOMNode->GetLastChild(getter_AddRefs(last));
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
return accService->GetAccessibleInWeakShell(last, mWeakShell, aAccLastChild);
return accService->GetAccessibleInWeakShell(last, mWeakShell, aLastChild);
}
/**
@ -378,7 +378,7 @@ NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccLastChild(nsIAccessible **aAccLa
* flat tree under the Select List.
*/
NS_IMETHODIMP nsHTMLSelectListAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
NS_IMETHODIMP nsHTMLSelectListAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
// Count the number of <Option Group> and <option> elements and return
// this number. This is so the tree can be flattened
@ -425,31 +425,31 @@ nsLeafAccessible(aDOMNode, aShell)
if (parentNode) {
// If the parent node is a Combobox, then the option's accessible parent
// is nsHTMLComboboxListAccessible, not the nsHTMLComboboxAccessible that
// GetAccParent would normally return. This is because the
// GetParent would normally return. This is because the
// nsHTMLComboboxListAccessible is inserted into the accessible hierarchy
// where there is no DOM node for it.
accService->GetAccessibleInWeakShell(parentNode, mWeakShell, getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetAccRole(&role);
parentAccessible->GetRole(&role);
if (role == ROLE_COMBOBOX) {
nsCOMPtr<nsIAccessible> comboAccessible(parentAccessible);
comboAccessible->GetAccLastChild(getter_AddRefs(parentAccessible));
comboAccessible->GetLastChild(getter_AddRefs(parentAccessible));
}
}
}
SetAccParent(parentAccessible);
SetParent(parentAccessible);
}
/** We are a ListItem */
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccRole(PRUint32 *aRole)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_LISTITEM;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccParent(nsIAccessible **aParent)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetParent(nsIAccessible **aParent)
{
NS_IF_ADDREF(*aParent = mParent);
return NS_OK;
@ -459,16 +459,16 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccParent(nsIAccessible **aParent
* Gets the next accessible sibling of the mDOMNode and creates and returns
* a nsHTMLSelectOptionAccessible or nsHTMLSelectOptGroupAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **aAccNextSibling)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetNextSibling(nsIAccessible **aNextSibling)
{
// Get next sibling and if found create and return an accessible for it
// When getting the next sibling of an SelectOption we could be working with
// either an optgroup or an option. We process this tree as flat.
*aAccNextSibling = nsnull;
*aNextSibling = nsnull;
if (mNextSibling) {
if (mNextSibling != DEAD_END_ACCESSIBLE) {
NS_IF_ADDREF(*aAccNextSibling = mNextSibling);
NS_IF_ADDREF(*aNextSibling = mNextSibling);
}
return NS_OK;
}
@ -479,7 +479,7 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **aA
nsCOMPtr<nsIDOMNode> next = mDOMNode, currentNode;
nsCOMPtr<nsIAccessibilityService> accService(do_GetService("@mozilla.org/accessibilityService;1"));
while (!*aAccNextSibling && next) {
while (!*aNextSibling && next) {
currentNode = next;
next = nsnull;
@ -492,7 +492,7 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **aA
currentNode->GetNextSibling(getter_AddRefs(next)); // See if there is another <optgroup>
if (next) {
accService->GetAccessibleInWeakShell(next, mWeakShell, aAccNextSibling);
accService->GetAccessibleInWeakShell(next, mWeakShell, aNextSibling);
continue;
}
// else No child then or child is not a <option> nor an <optgroup>
@ -502,24 +502,24 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNextSibling(nsIAccessible **aA
next = nsnull;
nsCOMPtr<nsIDOMNode> selectNode;
mParent->AccGetDOMNode(getter_AddRefs(selectNode));
mParent->GetDOMNode(getter_AddRefs(selectNode));
if (parent && parent != selectNode) { // End search for options at subtree's start
parent->GetNextSibling(getter_AddRefs(next));
if (next) {
// We have a parent that is an option or option group
// get accessible for either one and return it
accService->GetAccessibleInWeakShell(next, mWeakShell, aAccNextSibling);
accService->GetAccessibleInWeakShell(next, mWeakShell, aNextSibling);
}
}
}
SetAccNextSibling(*aAccNextSibling);
SetNextSibling(*aNextSibling);
return NS_OK;
}
/**
* Get our Name from our Content's subtree
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccName(nsAString& aName)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetName(nsAString& aName)
{
// CASE #1 -- great majority of the cases
// find the label attribute - this is what the W3C says we should use
@ -557,7 +557,7 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccName(nsAString& aName)
* Gets the previous accessible sibling of the mDOMNode and creates and returns
* a nsHTMLSelectOptionAccessible or nsHTMLSelectOptGroupAccessible.
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
@ -568,23 +568,23 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible
// The accessible parent of an <option> or <optgroup>
// is always the SelectListAcc - see GetAccessibleInShell()
thisAcc->GetAccParent(getter_AddRefs(selectListAcc));
thisAcc->GetParent(getter_AddRefs(selectListAcc));
if (!selectListAcc) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIDOMNode> siblingDOMNode;
selectListAcc->GetAccFirstChild(_retval);
selectListAcc->GetFirstChild(_retval);
// Go thru all the siblings until we find ourselves(mDOMNode) then use the
// sibling right before us.
do {
(*_retval)->GetAccNextSibling(getter_AddRefs(nextSiblingAcc));
(*_retval)->GetNextSibling(getter_AddRefs(nextSiblingAcc));
if (!nextSiblingAcc) {
*_retval = nsnull;
return NS_ERROR_FAILURE;
}
nextSiblingAcc->AccGetDOMNode(getter_AddRefs(siblingDOMNode));
nextSiblingAcc->GetDOMNode(getter_AddRefs(siblingDOMNode));
if (siblingDOMNode == mDOMNode) {
break; // we found ourselves!
}
@ -604,7 +604,7 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccPreviousSibling(nsIAccessible
* STATE_FOCUSABLE
* STATE_INVISIBLE -- not implemented yet
*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetState(PRUint32 *_retval)
{
*_retval = 0;
nsCOMPtr<nsIDOMNode> focusedOptionNode, parentNode;
@ -642,7 +642,7 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccState(PRUint32 *_retval)
}
/** select us! close combo box if necessary*/
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Select) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
@ -651,13 +651,13 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccActionName(PRUint8 index, nsAS
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsHTMLSelectOptionAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsHTMLSelectOptionAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Select) { // default action
nsCOMPtr<nsIDOMHTMLOptionElement> newHTMLOption(do_QueryInterface(mDOMNode));
@ -665,7 +665,7 @@ NS_IMETHODIMP nsHTMLSelectOptionAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_FAILURE;
// Clear old selection
nsCOMPtr<nsIDOMNode> oldHTMLOptionNode, selectNode;
mParent->AccGetDOMNode(getter_AddRefs(selectNode));
mParent->GetDOMNode(getter_AddRefs(selectNode));
GetFocusedOptionNode(selectNode, getter_AddRefs(oldHTMLOptionNode));
nsCOMPtr<nsIDOMHTMLOptionElement> oldHTMLOption(do_QueryInterface(oldHTMLOptionNode));
if (oldHTMLOption)
@ -789,25 +789,25 @@ nsHTMLSelectOptionAccessible(aDOMNode, aShell)
* As a nsHTMLSelectOptGroupAccessible we can have the following states:
* STATE_SELECTABLE
*/
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetState(PRUint32 *_retval)
{
nsHTMLSelectOptionAccessible::GetAccState(_retval);
nsHTMLSelectOptionAccessible::GetState(_retval);
*_retval &= ~(STATE_FOCUSABLE|STATE_SELECTABLE);
return NS_OK;
}
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::DoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsHTMLSelectOptGroupAccessible::GetNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -824,7 +824,7 @@ nsHTMLSelectableAccessible(aDOMNode, aShell)
}
/** We are a combobox */
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
return NS_OK;
@ -844,12 +844,12 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::Shutdown()
NS_IMETHODIMP nsHTMLComboboxAccessible::Init()
{
// Hold references
GetAccFirstChild(getter_AddRefs(mComboboxTextFieldAccessible));
GetFirstChild(getter_AddRefs(mComboboxTextFieldAccessible));
if (mComboboxTextFieldAccessible) {
mComboboxTextFieldAccessible->GetAccNextSibling(getter_AddRefs(mComboboxButtonAccessible));
mComboboxTextFieldAccessible->GetNextSibling(getter_AddRefs(mComboboxButtonAccessible));
}
if (mComboboxButtonAccessible) {
mComboboxButtonAccessible->GetAccNextSibling(getter_AddRefs(mComboboxListAccessible));
mComboboxButtonAccessible->GetNextSibling(getter_AddRefs(mComboboxListAccessible));
}
nsHTMLSelectableAccessible::Init();
@ -860,7 +860,7 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::Init()
/**
* We always have 3 children: TextField, Button, Window. In that order
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsHTMLComboboxAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 3;
return NS_OK;
@ -875,10 +875,10 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccChildCount(PRInt32 *_retval)
* STATE_EXPANDED
* STATE_COLLAPSED
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxAccessible::GetState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
// we are open or closed
PRBool isOpen = PR_FALSE;
@ -901,31 +901,31 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccState(PRUint32 *_retval)
/**
* Our last child is an nsHTMLComboboxListAccessible object, is also the third child
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccLastChild(nsIAccessible **aAccLastChild)
NS_IMETHODIMP nsHTMLComboboxAccessible::GetLastChild(nsIAccessible **aLastChild)
{
// It goes: textfield, button, list. We're returning the list.
return GetChildAt(2, aAccLastChild);
return GetChildAt(2, aLastChild);
}
/**
* Our first child is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccFirstChild(nsIAccessible **aAccFirstChild)
NS_IMETHODIMP nsHTMLComboboxAccessible::GetFirstChild(nsIAccessible **aFirstChild)
{
if (mFirstChild) {
*aAccFirstChild = mFirstChild;
*aFirstChild = mFirstChild;
}
else {
nsHTMLComboboxTextFieldAccessible* accessible =
new nsHTMLComboboxTextFieldAccessible(this, mDOMNode, mWeakShell);
*aAccFirstChild = accessible;
if (! *aAccFirstChild)
*aFirstChild = accessible;
if (! *aFirstChild)
return NS_ERROR_FAILURE;
accessible->Init();
SetAccFirstChild(*aAccFirstChild);
SetFirstChild(*aFirstChild);
}
NS_ADDREF(*aAccFirstChild);
NS_ADDREF(*aFirstChild);
return NS_OK;
}
@ -933,7 +933,7 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccFirstChild(nsIAccessible **aAccFir
* Our value is the value of our ( first ) selected child. nsIDOMHTMLSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsHTMLComboboxAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsHTMLComboboxAccessible::GetValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMHTMLSelectElement> select (do_QueryInterface(mDOMNode));
if (select) {
@ -953,26 +953,26 @@ nsLeafAccessible(aDOMNode, aShell)
{
// There is no cache entry for this item.
// It's generated and ref'd by nsHTMLComboboxAccessible
SetAccParent(aParent);
SetParent(aParent);
}
/**
* Our next sibling is an nsHTMLComboboxButtonAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccNextSibling(nsIAccessible **aAccNextSibling)
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetNextSibling(nsIAccessible **aNextSibling)
{
if (mNextSibling) {
*aAccNextSibling = mNextSibling;
*aNextSibling = mNextSibling;
}
else {
nsHTMLComboboxButtonAccessible* accessible =
new nsHTMLComboboxButtonAccessible(mParent, mDOMNode, mWeakShell);
*aAccNextSibling = accessible;
if (!*aAccNextSibling)
*aNextSibling = accessible;
if (!*aNextSibling)
return NS_ERROR_FAILURE;
accessible->Init();
}
NS_ADDREF(*aAccNextSibling);
NS_ADDREF(*aNextSibling);
return NS_OK;
}
@ -981,7 +981,7 @@ NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccNextSibling(nsIAccessible
* and then return that text.
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetValue(nsAString& _retval)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context(GetPresContext());
@ -1013,7 +1013,7 @@ NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetUniqueID(void **aUniqueID)
* Gets the bounds for the BlockFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsHTMLComboboxTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
void nsHTMLComboboxTextFieldAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first child's frame
nsIFrame* frame = nsAccessible::GetBoundsFrame();
@ -1028,7 +1028,7 @@ void nsHTMLComboboxTextFieldAccessible::GetBounds(nsRect& aBounds, nsIFrame** aB
}
/** Return our cached parent */
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccParent(nsIAccessible **_retval)
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetParent(nsIAccessible **_retval)
{
*_retval = mParent;
NS_IF_ADDREF(*_retval);
@ -1038,7 +1038,7 @@ NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccParent(nsIAccessible **_r
/**
* We are the first child of our parent, no previous sibling
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccPreviousSibling(nsIAccessible **_retval)
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetPreviousSibling(nsIAccessible **_retval)
{
*_retval = nsnull;
return NS_OK;
@ -1048,7 +1048,7 @@ NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccPreviousSibling(nsIAccess
* Our role is currently only static text, but we should be able to have
* editable text here and we need to check that case.
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_STATICTEXT;
return NS_OK;
@ -1060,10 +1060,10 @@ NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccRole(PRUint32 *_retval)
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
@ -1081,11 +1081,11 @@ nsLeafAccessible(aDOMNode, aShell)
{
// There is no cache entry for this item.
// It's generated and ref'd by nsHTMLComboboxAccessible
SetAccParent(aParent);
SetParent(aParent);
}
/** Just one action ( click ). */
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccNumActions(PRUint8 *aNumActions)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetNumActions(PRUint8 *aNumActions)
{
*aNumActions = eSingle_Action;
return NS_OK;
@ -1096,7 +1096,7 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccNumActions(PRUint8 *aNumActi
* the hiding of the drop down box ( window ).
* Walks the Frame tree and checks for proper frames.
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::AccDoAction(PRUint8 aIndex)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::DoAction(PRUint8 aIndex)
{
nsIFrame* frame = nsAccessible::GetBoundsFrame();
nsCOMPtr<nsIPresContext> context(GetPresContext());
@ -1128,7 +1128,7 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::AccDoAction(PRUint8 aIndex)
* if we are open -> closed is our name.
* Uses the frame to get the state, updated on every click
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccActionName(PRUint8 aIndex, nsAString& _retval)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetActionName(PRUint8 aIndex, nsAString& _retval)
{
PRBool isOpen = PR_FALSE;
nsIFrame *boundsFrame = GetBoundsFrame();
@ -1156,7 +1156,7 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetUniqueID(void **aUniqueID)
* Gets the bounds for the gfxButtonControlFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsHTMLComboboxButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
void nsHTMLComboboxButtonAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our second child's frame
// bounding frame is the ComboboxControlFrame
@ -1174,25 +1174,25 @@ void nsHTMLComboboxButtonAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoun
}
/** We are a button. */
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccParent(nsIAccessible **aParent)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetParent(nsIAccessible **aParent)
{
NS_IF_ADDREF(*aParent = mParent);
return NS_OK;
}
/**
* Gets the name from GetAccActionName()
* Gets the name from GetActionName()
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetName(nsAString& _retval)
{
return GetAccActionName(eAction_Click, _retval);
return GetActionName(eAction_Click, _retval);
}
/**
@ -1201,10 +1201,10 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccName(nsAString& _retval)
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
// we are open or closed --> pressed or not
PRBool isOpen = PR_FALSE;
@ -1225,29 +1225,29 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccState(PRUint32 *_retval)
/**
* Our next sibling is an nsHTMLComboboxListAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccNextSibling(nsIAccessible **aAccNextSibling)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetNextSibling(nsIAccessible **aNextSibling)
{
if (mNextSibling) {
*aAccNextSibling = mNextSibling;
*aNextSibling = mNextSibling;
}
else {
nsHTMLComboboxListAccessible* accessible =
new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
*aAccNextSibling = accessible;
if (!*aAccNextSibling)
*aNextSibling = accessible;
if (!*aNextSibling)
return NS_ERROR_OUT_OF_MEMORY;
accessible->Init();
}
NS_ADDREF(*aAccNextSibling);
NS_ADDREF(*aNextSibling);
return NS_OK;
}
/**
* Our prev sibling is an nsHTMLComboboxTextFieldAccessible object
*/
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetAccPreviousSibling(nsIAccessible **aAccPrevSibling)
NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetPreviousSibling(nsIAccessible **aAccPrevSibling)
{
return mParent->GetAccFirstChild(aAccPrevSibling);
return mParent->GetFirstChild(aAccPrevSibling);
}
@ -1260,7 +1260,7 @@ nsHTMLSelectListAccessible(aDOMNode, aShell)
{
// There is no cache entry for this item.
// It's generated and ref'd by nsHTMLComboboxAccessible
SetAccParent(aParent);
SetParent(aParent);
}
/**
@ -1270,10 +1270,10 @@ nsHTMLSelectListAccessible(aDOMNode, aShell)
* STATE_INVISIBLE
* STATE_FLOATING
*/
NS_IMETHODIMP nsHTMLComboboxListAccessible::GetAccState(PRUint32 *aAccState)
NS_IMETHODIMP nsHTMLComboboxListAccessible::GetState(PRUint32 *aState)
{
// Get focus status from base class
nsAccessible::GetAccState(aAccState);
nsAccessible::GetState(aState);
// we are open or closed
PRBool isOpen = PR_FALSE;
@ -1284,21 +1284,21 @@ NS_IMETHODIMP nsHTMLComboboxListAccessible::GetAccState(PRUint32 *aAccState)
return NS_ERROR_FAILURE;
comboFrame->IsDroppedDown(&isOpen);
if (isOpen)
*aAccState |= STATE_FLOATING | STATE_FOCUSABLE;
*aState |= STATE_FLOATING | STATE_FOCUSABLE;
else
*aAccState |= STATE_INVISIBLE | STATE_FOCUSABLE;
*aState |= STATE_INVISIBLE | STATE_FOCUSABLE;
return NS_OK;
}
/** Return our cached parent */
NS_IMETHODIMP nsHTMLComboboxListAccessible::GetAccParent(nsIAccessible **aParent)
NS_IMETHODIMP nsHTMLComboboxListAccessible::GetParent(nsIAccessible **aParent)
{
NS_IF_ADDREF(*aParent = mParent);
return NS_OK;
}
NS_IMETHODIMP nsHTMLComboboxListAccessible::GetAccPreviousSibling(nsIAccessible **aAccPrevSibling)
NS_IMETHODIMP nsHTMLComboboxListAccessible::GetPreviousSibling(nsIAccessible **aAccPrevSibling)
{
return mParent->GetChildAt(1, aAccPrevSibling);
}
@ -1314,7 +1314,7 @@ NS_IMETHODIMP nsHTMLComboboxListAccessible::GetUniqueID(void **aUniqueID)
* Gets the bounds for the areaFrame.
* Walks the Frame tree and checks for proper frames.
*/
void nsHTMLComboboxListAccessible::GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame)
void nsHTMLComboboxListAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame)
{
// get our first option
nsCOMPtr<nsIDOMNode> child;

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

@ -126,11 +126,11 @@ public:
virtual ~nsHTMLSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **aAccFirstChild);
NS_IMETHOD GetAccLastChild(nsIAccessible **aAccFirstChild);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount) ;
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **aFirstChild);
NS_IMETHOD GetLastChild(nsIAccessible **aFirstChild);
NS_IMETHOD GetChildCount(PRInt32 *aAccChildCount) ;
};
/*
@ -144,15 +144,15 @@ public:
virtual ~nsHTMLSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *aAccRole);
NS_IMETHOD GetAccParent(nsIAccessible **aParent);
NS_IMETHOD GetAccName(nsAString& aName);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetParent(nsIAccessible **aParent);
NS_IMETHOD GetName(nsAString& aName);
static nsresult GetFocusedOptionNode(nsIDOMNode *aListNode, nsIDOMNode **aFocusedOptionNode);
};
@ -167,10 +167,10 @@ public:
virtual ~nsHTMLSelectOptGroupAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
};
/** ------------------------------------------------------ */
@ -188,13 +188,13 @@ public:
virtual ~nsHTMLComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD Shutdown();
NS_IMETHOD Init();
@ -218,15 +218,15 @@ public:
virtual ~nsHTMLComboboxTextFieldAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetParent(nsIAccessible **_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetUniqueID(void **aUniqueID);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);
};
/**
@ -241,18 +241,18 @@ public:
virtual ~nsHTMLComboboxButtonAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetParent(nsIAccessible **_retval);
NS_IMETHOD GetNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetUniqueID(void **aUniqueID);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);
};
/*
@ -270,12 +270,12 @@ public:
virtual ~nsHTMLComboboxListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccState(PRUint32 *aAccState);
NS_IMETHOD GetAccParent(nsIAccessible **aParent);
NS_IMETHOD GetState(PRUint32 *aState);
NS_IMETHOD GetParent(nsIAccessible **aParent);
NS_IMETHOD GetUniqueID(void **aUniqueID);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **aAccPrevSibling);
NS_IMETHOD GetPreviousSibling(nsIAccessible **aAccPrevSibling);
virtual void GetBounds(nsRect& aBounds, nsIFrame** aBoundingFrame);
virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);
};
#endif

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

@ -47,8 +47,8 @@ nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccRole(PRUint32 *aResult)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLTableCellAccessible::GetRole(PRUint32 *aResult)
{
#ifndef MOZ_ACCESSIBILITY_ATK
*aResult = ROLE_CELL;
@ -58,9 +58,9 @@ NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccRole(PRUint32 *aResult)
return NS_OK;
}
NS_IMETHODIMP nsHTMLTableCellAccessible::GetAccState(PRUint32 *aResult)
NS_IMETHODIMP nsHTMLTableCellAccessible::GetState(PRUint32 *aResult)
{
nsAccessible::GetAccState(aResult);
nsAccessible::GetState(aResult);
*aResult &= ~STATE_FOCUSABLE; // Inherit all states except focusable state since table cells cannot be focused
return NS_OK;
}
@ -73,15 +73,15 @@ nsAccessibleWrap(aDomNode, aShell)
}
NS_IMETHODIMP
nsHTMLTableCaptionAccessible::GetAccState(PRUint32 *aResult)
nsHTMLTableCaptionAccessible::GetState(PRUint32 *aResult)
{
nsAccessible::GetAccState(aResult);
nsAccessible::GetState(aResult);
*aResult &= ~STATE_FOCUSABLE;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLTableCaptionAccessible::GetAccValue(nsAString& aResult)
nsHTMLTableCaptionAccessible::GetValue(nsAString& aResult)
{
aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank
@ -98,21 +98,21 @@ nsBlockAccessible(aDomNode, aShell)
{
}
/* unsigned long getAccRole (); */
NS_IMETHODIMP nsHTMLTableAccessible::GetAccRole(PRUint32 *aResult)
/* unsigned long getRole (); */
NS_IMETHODIMP nsHTMLTableAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_TABLE;
return NS_OK;
}
NS_IMETHODIMP nsHTMLTableAccessible::GetAccState(PRUint32 *aResult)
NS_IMETHODIMP nsHTMLTableAccessible::GetState(PRUint32 *aResult)
{
nsAccessible::GetAccState(aResult);
nsAccessible::GetState(aResult);
*aResult &= ~STATE_FOCUSABLE; // Inherit all states except focusable state since tables cannot be focused
return NS_OK;
}
NS_IMETHODIMP nsHTMLTableAccessible::GetAccName(nsAString& aResult)
NS_IMETHODIMP nsHTMLTableAccessible::GetName(nsAString& aResult)
{
aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank

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

@ -48,16 +48,16 @@ public:
NS_DECL_ISUPPORTS_INHERITED
nsHTMLTableCellAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetAccState(PRUint32 *aResult);
NS_IMETHOD GetRole(PRUint32 *aResult);
NS_IMETHOD GetState(PRUint32 *aResult);
};
class nsHTMLTableCaptionAccessible : public nsAccessibleWrap
{
public:
nsHTMLTableCaptionAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccState(PRUint32 *aResult);
NS_IMETHOD GetAccValue(nsAString& aResult);
NS_IMETHOD GetState(PRUint32 *aResult);
NS_IMETHOD GetValue(nsAString& aResult);
};
class nsHTMLTableAccessible : public nsBlockAccessible
@ -66,9 +66,9 @@ public:
NS_DECL_ISUPPORTS_INHERITED
nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *aResult);
NS_IMETHOD GetAccState(PRUint32 *aResult);
NS_IMETHOD GetAccName(nsAString& aResult);
NS_IMETHOD GetRole(PRUint32 *aResult);
NS_IMETHOD GetState(PRUint32 *aResult);
NS_IMETHOD GetName(nsAString& aResult);
};
#endif

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

@ -51,7 +51,7 @@ nsTextAccessibleWrap(aDomNode, aShell)
{
}
NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAString& aName)
NS_IMETHODIMP nsHTMLTextAccessible::GetName(nsAString& aName)
{
nsAutoString accName;
if (NS_FAILED(mDOMNode->GetNodeValue(accName)))
@ -61,9 +61,9 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAString& aName)
return NS_OK;
}
NS_IMETHODIMP nsHTMLTextAccessible::GetAccState(PRUint32 *aState)
NS_IMETHODIMP nsHTMLTextAccessible::GetState(PRUint32 *aState)
{
nsTextAccessible::GetAccState(aState);
nsTextAccessible::GetState(aState);
// Get current selection and find out if current node is in it
nsCOMPtr<nsIPresShell> shell(GetPresShell());
if (!shell) {
@ -108,15 +108,15 @@ nsLeafAccessible(aDomNode, aShell)
{
}
NS_IMETHODIMP nsHTMLHRAccessible::GetAccRole(PRUint32 *aRole)
NS_IMETHODIMP nsHTMLHRAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_SEPARATOR;
return NS_OK;
}
NS_IMETHODIMP nsHTMLHRAccessible::GetAccState(PRUint32 *aState)
NS_IMETHODIMP nsHTMLHRAccessible::GetState(PRUint32 *aState)
{
nsLeafAccessible::GetAccState(aState);
nsLeafAccessible::GetState(aState);
*aState &= ~STATE_FOCUSABLE;
return NS_OK;
}
@ -126,7 +126,7 @@ nsTextAccessible(aDomNode, aShell)
{
}
NS_IMETHODIMP nsHTMLLabelAccessible::GetAccName(nsAString& aReturn)
NS_IMETHODIMP nsHTMLLabelAccessible::GetName(nsAString& aReturn)
{
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
@ -144,35 +144,35 @@ NS_IMETHODIMP nsHTMLLabelAccessible::GetAccName(nsAString& aReturn)
return rv;
}
NS_IMETHODIMP nsHTMLLabelAccessible::GetAccRole(PRUint32 *aRole)
NS_IMETHODIMP nsHTMLLabelAccessible::GetRole(PRUint32 *aRole)
{
*aRole = ROLE_STATICTEXT;
return NS_OK;
}
NS_IMETHODIMP nsHTMLLabelAccessible::GetAccState(PRUint32 *aState)
NS_IMETHODIMP nsHTMLLabelAccessible::GetState(PRUint32 *aState)
{
nsTextAccessible::GetAccState(aState);
nsTextAccessible::GetState(aState);
*aState &= (STATE_LINKED|STATE_TRAVERSED); // Only use link states
return NS_OK;
}
NS_IMETHODIMP nsHTMLLabelAccessible::GetAccFirstChild(nsIAccessible **aAccFirstChild)
NS_IMETHODIMP nsHTMLLabelAccessible::GetFirstChild(nsIAccessible **aFirstChild)
{
// A <label> is not necessarily a leaf!
return nsAccessible::GetAccFirstChild(aAccFirstChild);
return nsAccessible::GetFirstChild(aFirstChild);
}
/* readonly attribute nsIAccessible accFirstChild; */
NS_IMETHODIMP nsHTMLLabelAccessible::GetAccLastChild(nsIAccessible **aAccLastChild)
NS_IMETHODIMP nsHTMLLabelAccessible::GetLastChild(nsIAccessible **aLastChild)
{
// A <label> is not necessarily a leaf!
return nsAccessible::GetAccLastChild(aAccLastChild);
return nsAccessible::GetLastChild(aLastChild);
}
/* readonly attribute long accChildCount; */
NS_IMETHODIMP nsHTMLLabelAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
NS_IMETHODIMP nsHTMLLabelAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
// A <label> is not necessarily a leaf!
return nsAccessible::GetAccChildCount(aAccChildCount);
return nsAccessible::GetChildCount(aAccChildCount);
}

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

@ -49,8 +49,8 @@ class nsHTMLTextAccessible : public nsTextAccessibleWrap
public:
nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *aState);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *aState);
};
class nsHTMLHRAccessible : public nsLeafAccessible
@ -58,8 +58,8 @@ class nsHTMLHRAccessible : public nsLeafAccessible
public:
nsHTMLHRAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *aRole);
NS_IMETHOD GetAccState(PRUint32 *aState);
NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetState(PRUint32 *aState);
};
class nsHTMLLabelAccessible : public nsTextAccessible
@ -67,12 +67,12 @@ class nsHTMLLabelAccessible : public nsTextAccessible
public:
nsHTMLLabelAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **aAccFirstChild);
NS_IMETHOD GetAccLastChild(nsIAccessible **aAccLastChild);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **aFirstChild);
NS_IMETHOD GetLastChild(nsIAccessible **aLastChild);
NS_IMETHOD GetChildCount(PRInt32 *aAccChildCount);
};
#endif

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

@ -104,7 +104,7 @@ STDMETHODIMP nsAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
*ppv = NS_STATIC_CAST(IAccessible*, this);
else if (IID_IEnumVARIANT == iid && !gIsEnumVariantSupportDisabled) {
PRInt32 numChildren;
GetAccChildCount(&numChildren);
GetChildCount(&numChildren);
if (numChildren > 0) // Don't support this interface for leaf elements
*ppv = NS_STATIC_CAST(IEnumVARIANT*, this);
}
@ -162,7 +162,7 @@ STDMETHODIMP nsAccessibleWrap::get_accParent( IDispatch __RPC_FAR *__RPC_FAR *pp
return E_FAIL; // We've been shut down
nsCOMPtr<nsIAccessible> xpParentAccessible;
GetAccParent(getter_AddRefs(xpParentAccessible));
GetParent(getter_AddRefs(xpParentAccessible));
if (xpParentAccessible) {
*ppdispParent = NativeAccessible(xpParentAccessible);
@ -196,7 +196,7 @@ STDMETHODIMP nsAccessibleWrap::get_accParent( IDispatch __RPC_FAR *__RPC_FAR *pp
STDMETHODIMP nsAccessibleWrap::get_accChildCount( long __RPC_FAR *pcountChildren)
{
PRInt32 numChildren;
GetAccChildCount(&numChildren);
GetChildCount(&numChildren);
*pcountChildren = numChildren;
return S_OK;
@ -233,7 +233,7 @@ STDMETHODIMP nsAccessibleWrap::get_accName(
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (xpAccessible) {
nsAutoString name;
if (NS_FAILED(xpAccessible->GetAccName(name)))
if (NS_FAILED(xpAccessible->GetName(name)))
return S_FALSE;
*pszName = ::SysAllocString(name.get());
@ -253,7 +253,7 @@ STDMETHODIMP nsAccessibleWrap::get_accValue(
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (xpAccessible) {
nsAutoString value;
if (NS_FAILED(xpAccessible->GetAccValue(value)))
if (NS_FAILED(xpAccessible->GetValue(value)))
return S_FALSE;
*pszValue = ::SysAllocString(value.get());
@ -272,7 +272,7 @@ STDMETHODIMP nsAccessibleWrap::get_accDescription(
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (xpAccessible) {
nsAutoString description;
if (NS_FAILED(xpAccessible->GetAccDescription(description)))
if (NS_FAILED(xpAccessible->GetDescription(description)))
return S_FALSE;
*pszDescription = ::SysAllocString(description.get());
@ -295,7 +295,7 @@ STDMETHODIMP nsAccessibleWrap::get_accRole(
return E_FAIL;
PRUint32 role = 0;
if (NS_FAILED(xpAccessible->GetAccRole(&role)))
if (NS_FAILED(xpAccessible->GetRole(&role)))
return E_FAIL;
pvarRole->lVal = role;
@ -316,7 +316,7 @@ STDMETHODIMP nsAccessibleWrap::get_accState(
return E_FAIL;
PRUint32 state;
if (NS_FAILED(xpAccessible->GetAccState(&state)))
if (NS_FAILED(xpAccessible->GetState(&state)))
return E_FAIL;
pvarState->lVal = state;
@ -352,7 +352,7 @@ STDMETHODIMP nsAccessibleWrap::get_accKeyboardShortcut(
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (xpAccessible) {
nsAutoString shortcut;
nsresult rv = xpAccessible->GetAccKeyboardShortcut(shortcut);
nsresult rv = xpAccessible->GetKeyboardShortcut(shortcut);
if (NS_FAILED(rv))
return S_FALSE;
@ -369,7 +369,7 @@ STDMETHODIMP nsAccessibleWrap::get_accFocus(
VariantInit(pvarChild);
nsCOMPtr<nsIAccessible> focusedAccessible;
if (NS_SUCCEEDED(GetAccFocused(getter_AddRefs(focusedAccessible)))) {
if (NS_SUCCEEDED(GetFocusedChild(getter_AddRefs(focusedAccessible)))) {
pvarChild->vt = VT_DISPATCH;
pvarChild->pdispVal = NativeAccessible(focusedAccessible);
return S_OK;
@ -467,7 +467,7 @@ STDMETHODIMP nsAccessibleWrap::get_accDefaultAction(
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (xpAccessible) {
nsAutoString defaultAction;
if (NS_FAILED(xpAccessible->GetAccActionName(0, defaultAction)))
if (NS_FAILED(xpAccessible->GetActionName(0, defaultAction)))
return S_FALSE;
*pszDefaultAction = ::SysAllocString(defaultAction.get());
@ -487,13 +487,13 @@ STDMETHODIMP nsAccessibleWrap::accSelect(
if (flagsSelect & (SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION|SELFLAG_REMOVESELECTION))
{
if (flagsSelect & SELFLAG_TAKEFOCUS)
xpAccessible->AccTakeFocus();
xpAccessible->TakeFocus();
if (flagsSelect & SELFLAG_TAKESELECTION)
xpAccessible->AccTakeSelection();
xpAccessible->TakeSelection();
if (flagsSelect & SELFLAG_REMOVESELECTION)
xpAccessible->AccRemoveSelection();
xpAccessible->RemoveSelection();
return S_OK;
}
@ -513,7 +513,7 @@ STDMETHODIMP nsAccessibleWrap::accLocation(
if (xpAccessible) {
PRInt32 x, y, width, height;
if (NS_FAILED(xpAccessible->AccGetBounds(&x, &y, &width, &height)))
if (NS_FAILED(xpAccessible->GetBounds(&x, &y, &width, &height)))
return E_FAIL;
*pxLeft = x;
@ -540,28 +540,28 @@ STDMETHODIMP nsAccessibleWrap::accNavigate(
switch(navDir) {
case NAVDIR_DOWN:
xpAccessibleStart->AccGetFromBelow(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetAccessibleBelow(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_FIRSTCHILD:
xpAccessibleStart->GetAccFirstChild(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetFirstChild(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_LASTCHILD:
xpAccessibleStart->GetAccLastChild(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetLastChild(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_LEFT:
xpAccessibleStart->AccGetFromLeft(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetAccessibleToLeft(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_NEXT:
xpAccessibleStart->GetAccNextSibling(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetNextSibling(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_PREVIOUS:
xpAccessibleStart->GetAccPreviousSibling(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetPreviousSibling(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_RIGHT:
xpAccessibleStart->AccGetFromRight(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetAccessibleToRight(getter_AddRefs(xpAccessibleResult));
break;
case NAVDIR_UP:
xpAccessibleStart->AccGetFromAbove(getter_AddRefs(xpAccessibleResult));
xpAccessibleStart->GetAccessibleAbove(getter_AddRefs(xpAccessibleResult));
break;
}
@ -587,7 +587,7 @@ STDMETHODIMP nsAccessibleWrap::accHitTest(
xLeft = xLeft;
yTop = yTop;
AccGetAt(xLeft, yTop, getter_AddRefs(xpAccessible));
GetChildAtPoint(xLeft, yTop, getter_AddRefs(xpAccessible));
// if we got a child
if (xpAccessible) {
@ -599,7 +599,7 @@ STDMETHODIMP nsAccessibleWrap::accHitTest(
pvarChild->vt = VT_DISPATCH;
pvarChild->pdispVal = NativeAccessible(xpAccessible);
nsCOMPtr<nsIDOMNode> domNode;
xpAccessible->AccGetDOMNode(getter_AddRefs(domNode));
xpAccessible->GetDOMNode(getter_AddRefs(domNode));
if (!domNode) {
// Has already been shut down
pvarChild->vt = VT_EMPTY;
@ -621,7 +621,7 @@ STDMETHODIMP nsAccessibleWrap::accDoDefaultAction(
nsCOMPtr<nsIAccessible> xpAccessible;
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (!xpAccessible || FAILED(xpAccessible->AccDoAction(0))) {
if (!xpAccessible || FAILED(xpAccessible->DoAction(0))) {
return E_FAIL;
}
return S_OK;
@ -667,7 +667,7 @@ nsAccessibleWrap::Next(ULONG aNumElementsRequested, VARIANT FAR* pvar, ULONG FAR
*aNumElementsFetched = 0;
PRInt32 numChildren;
GetAccChildCount(&numChildren);
GetChildCount(&numChildren);
if (aNumElementsRequested <= 0 || !pvar ||
mEnumVARIANTPosition >= numChildren) {
@ -705,7 +705,7 @@ nsAccessibleWrap::Skip(ULONG aNumElements)
mEnumVARIANTPosition += aNumElements;
PRInt32 numChildren;
GetAccChildCount(&numChildren);
GetChildCount(&numChildren);
if (mEnumVARIANTPosition > numChildren)
{
@ -825,7 +825,7 @@ void nsAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild, nsIAccessibl
// We can come back it do it later, if there are perf problems
// with a specific assistive technology
nsCOMPtr<nsIAccessible> xpAccessible, nextAccessible;
GetAccFirstChild(getter_AddRefs(xpAccessible));
GetFirstChild(getter_AddRefs(xpAccessible));
for (PRInt32 index = 0; xpAccessible; index ++) {
if (!xpAccessible)
break; // Failed
@ -834,7 +834,7 @@ void nsAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild, nsIAccessibl
break;
}
nextAccessible = xpAccessible;
nextAccessible->GetAccNextSibling(getter_AddRefs(xpAccessible));
nextAccessible->GetNextSibling(getter_AddRefs(xpAccessible));
}
}
NS_IF_ADDREF(*aXPAccessible);

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

@ -178,7 +178,7 @@ NS_IMETHODIMP nsDocAccessibleWrap::FireToolkitEvent(PRUint32 aEvent, nsIAccessib
PRInt32 childID, worldID = OBJID_CLIENT;
PRUint32 role = ROLE_SYSTEM_TEXT; // Default value
if (NS_SUCCEEDED(aAccessible->GetAccRole(&role)) && role == ROLE_SYSTEM_CARET) {
if (NS_SUCCEEDED(aAccessible->GetRole(&role)) && role == ROLE_SYSTEM_CARET) {
childID = CHILDID_SELF;
worldID = OBJID_CARET;
}

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

@ -119,7 +119,7 @@ STDMETHODIMP nsTextAccessibleWrap::get_clippedSubstringBounds(
nsCOMPtr<nsIAccessible> accessible(do_QueryInterface(docAccessible));
NS_ASSERTION(accessible, "There must always be a doc accessible, but there isn't");
accessible->AccGetBounds(&docX, &docY, &docWidth, &docHeight);
accessible->GetBounds(&docX, &docY, &docWidth, &docHeight);
nsRect unclippedRect(x, y, width, height);
nsRect docRect(docX, docY, docWidth, docHeight);
@ -153,7 +153,7 @@ STDMETHODIMP nsTextAccessibleWrap::get_unclippedSubstringBounds(
// Add offsets for entire accessible
PRInt32 nodeX, nodeY, nodeWidth, nodeHeight;
AccGetBounds(&nodeX, &nodeY, &nodeWidth, &nodeHeight);
GetBounds(&nodeX, &nodeY, &nodeWidth, &nodeHeight);
*aX += nodeX;
*aY += nodeY;

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

@ -57,7 +57,7 @@ nsFormControlAccessible(aNode, aShell)
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
@ -66,10 +66,10 @@ NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccRole(PRUint32 *_retval)
/**
* Possible states: focused, focusable, selected
*/
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
*_retval |= STATE_FOCUSABLE;
// Focused?
@ -88,12 +88,12 @@ NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetName(nsAString& _retval)
{
return GetXULAccName(_retval);
return GetXULName(_retval);
}
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULColorPickerTileAccessible::GetValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No XUL Element for colorpicker");
@ -115,16 +115,16 @@ nsXULColorPickerTileAccessible(aNode, aShell)
/**
* Possible states: focused, focusable, unavailable(disabled)
*/
NS_IMETHODIMP nsXULColorPickerAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULColorPickerAccessible::GetState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
*_retval |= STATE_FOCUSABLE | STATE_HASPOPUP;
return NS_OK;
}
NS_IMETHODIMP nsXULColorPickerAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULColorPickerAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_BUTTONDROPDOWNGRID;
return NS_OK;

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

@ -47,18 +47,18 @@ class nsXULColorPickerTileAccessible : public nsFormControlAccessible
{
public:
nsXULColorPickerTileAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetValue(nsAString& _retval);
};
class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
{
public:
nsXULColorPickerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
};
#endif

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

@ -60,15 +60,15 @@ nsAccessibleWrap(aNode, aShell)
{
}
NS_IMETHODIMP nsXULButtonAccessible::GetAccName(nsAString& aResult)
NS_IMETHODIMP nsXULButtonAccessible::GetName(nsAString& aResult)
{
return GetXULAccName(aResult);
return GetXULName(aResult);
}
/**
* Only one actions available
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULButtonAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;;
@ -77,7 +77,7 @@ NS_IMETHODIMP nsXULButtonAccessible::GetAccNumActions(PRUint8 *_retval)
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULButtonAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("press"), _retval);
@ -89,7 +89,7 @@ NS_IMETHODIMP nsXULButtonAccessible::GetAccActionName(PRUint8 index, nsAString&
/**
* Tell the button to do it's action
*/
NS_IMETHODIMP nsXULButtonAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULButtonAccessible::DoAction(PRUint8 index)
{
if (index == 0) {
nsCOMPtr<nsIDOMXULButtonElement> buttonElement(do_QueryInterface(mDOMNode));
@ -106,7 +106,7 @@ NS_IMETHODIMP nsXULButtonAccessible::AccDoAction(PRUint8 index)
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULButtonAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PUSHBUTTON;
return NS_OK;
@ -115,10 +115,10 @@ NS_IMETHODIMP nsXULButtonAccessible::GetAccRole(PRUint32 *_retval)
/**
* Possible states: focused, focusable, unavailable(disabled)
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULButtonAccessible::GetState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
PRBool disabled = PR_FALSE;
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mDOMNode));
@ -157,7 +157,7 @@ NS_IMETHODIMP nsXULButtonAccessible::GetAccState(PRUint32 *_retval)
/**
* Perhaps 1 child - if there's a <dropmarker>
*/
NS_IMETHODIMP nsXULButtonAccessible::GetAccFirstChild(nsIAccessible **aResult)
NS_IMETHODIMP nsXULButtonAccessible::GetFirstChild(nsIAccessible **aResult)
{
if (!mFirstChild) {
nsAccessibleTreeWalker walker(mWeakShell, mDOMNode, PR_TRUE);
@ -169,10 +169,10 @@ NS_IMETHODIMP nsXULButtonAccessible::GetAccFirstChild(nsIAccessible **aResult)
if (walker.mState.accessible) {
PRUint32 role;
if (NS_SUCCEEDED(walker.mState.accessible->GetAccRole(&role)) && role == ROLE_PUSHBUTTON) {
if (NS_SUCCEEDED(walker.mState.accessible->GetRole(&role)) && role == ROLE_PUSHBUTTON) {
mFirstChild = walker.mState.accessible;
nsCOMPtr<nsPIAccessible> privChildAcc = do_QueryInterface(mFirstChild);
privChildAcc->SetAccNextSibling(nsnull);
privChildAcc->SetNextSibling(nsnull);
}
}
}
@ -182,15 +182,15 @@ NS_IMETHODIMP nsXULButtonAccessible::GetAccFirstChild(nsIAccessible **aResult)
return NS_OK;
}
NS_IMETHODIMP nsXULButtonAccessible::GetAccLastChild(nsIAccessible **aResult)
NS_IMETHODIMP nsXULButtonAccessible::GetLastChild(nsIAccessible **aResult)
{
return GetAccFirstChild(aResult);
return GetFirstChild(aResult);
}
NS_IMETHODIMP nsXULButtonAccessible::GetAccChildCount(PRInt32 *aResult)
NS_IMETHODIMP nsXULButtonAccessible::GetChildCount(PRInt32 *aResult)
{
nsCOMPtr<nsIAccessible> accessible;
GetAccFirstChild(getter_AddRefs(accessible));
GetFirstChild(getter_AddRefs(accessible));
*aResult = mAccChildCount;
return NS_OK;
@ -211,7 +211,7 @@ nsFormControlAccessible(aNode, aShell)
/**
* Only one actions available
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccNumActions(PRUint8 *aResult)
NS_IMETHODIMP nsXULDropmarkerAccessible::GetNumActions(PRUint8 *aResult)
{
*aResult = eSingle_Action;
return NS_OK;;
@ -245,7 +245,7 @@ PRBool nsXULDropmarkerAccessible::DropmarkerOpen(PRBool aToggleOpen)
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccActionName(PRUint8 index, nsAString& aResult)
NS_IMETHODIMP nsXULDropmarkerAccessible::GetActionName(PRUint8 index, nsAString& aResult)
{
if (index == eAction_Click) {
if (DropmarkerOpen(PR_FALSE))
@ -261,7 +261,7 @@ NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccActionName(PRUint8 index, nsAStri
/**
* Tell the Dropmarker to do it's action
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULDropmarkerAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click) {
DropmarkerOpen(PR_TRUE); // Reverse the open attribute
@ -273,13 +273,13 @@ NS_IMETHODIMP nsXULDropmarkerAccessible::AccDoAction(PRUint8 index)
/**
* We are a pushbutton
*/
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccRole(PRUint32 *aResult)
NS_IMETHODIMP nsXULDropmarkerAccessible::GetRole(PRUint32 *aResult)
{
*aResult = ROLE_PUSHBUTTON;
return NS_OK;
}
NS_IMETHODIMP nsXULDropmarkerAccessible::GetAccState(PRUint32 *aResult)
NS_IMETHODIMP nsXULDropmarkerAccessible::GetState(PRUint32 *aResult)
{
*aResult = 0;
@ -304,7 +304,7 @@ nsFormControlAccessible(aNode, aShell)
/**
* We are a CheckButton
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULCheckboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_CHECKBUTTON;
return NS_OK;
@ -313,7 +313,7 @@ NS_IMETHODIMP nsXULCheckboxAccessible::GetAccRole(PRUint32 *_retval)
/**
* Only one action available
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULCheckboxAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
@ -322,12 +322,12 @@ NS_IMETHODIMP nsXULCheckboxAccessible::GetAccNumActions(PRUint8 *_retval)
/**
* Return the name of our only action
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULCheckboxAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
// check or uncheck
PRUint32 state;
GetAccState(&state);
GetState(&state);
if (state & STATE_CHECKED)
_retval = NS_LITERAL_STRING("uncheck");
@ -342,7 +342,7 @@ NS_IMETHODIMP nsXULCheckboxAccessible::GetAccActionName(PRUint8 index, nsAString
/**
* Tell the checkbox to do its only action -- check( or uncheck) itself
*/
NS_IMETHODIMP nsXULCheckboxAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULCheckboxAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
@ -358,10 +358,10 @@ NS_IMETHODIMP nsXULCheckboxAccessible::AccDoAction(PRUint8 index)
/**
* Possible states: focused, focusable, unavailable(disabled), checked
*/
NS_IMETHODIMP nsXULCheckboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULCheckboxAccessible::GetState(PRUint32 *_retval)
{
// Get focus and disable status from base class
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
// Determine Checked state
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement(do_QueryInterface(mDOMNode));
@ -389,13 +389,13 @@ nsAccessibleWrap(aNode, aShell)
{
}
NS_IMETHODIMP nsXULGroupboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULGroupboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
return NS_OK;
}
NS_IMETHODIMP nsXULGroupboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULGroupboxAccessible::GetState(PRUint32 *_retval)
{
// Groupbox doesn't support any states!
*_retval = 0;
@ -403,7 +403,7 @@ NS_IMETHODIMP nsXULGroupboxAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsXULGroupboxAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULGroupboxAccessible::GetName(nsAString& _retval)
{
_retval.Assign(NS_LITERAL_STRING("")); // Default name is blank
@ -434,7 +434,7 @@ nsFormControlAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULProgressMeterAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PROGRESSBAR;
return NS_OK;
@ -443,13 +443,13 @@ NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccRole(PRUint32 *_retval)
/**
* No states supported for progressmeter
*/
NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULProgressMeterAccessible::GetState(PRUint32 *_retval)
{
*_retval =0;
return NS_OK;
}
NS_IMETHODIMP nsXULProgressMeterAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULProgressMeterAccessible::GetValue(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No element for DOM node!");
@ -470,7 +470,7 @@ nsRadioButtonAccessible(aNode, aShell)
}
/** Our only action is to click */
NS_IMETHODIMP nsXULRadioButtonAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULRadioButtonAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton(do_QueryInterface(mDOMNode));
@ -483,9 +483,9 @@ NS_IMETHODIMP nsXULRadioButtonAccessible::AccDoAction(PRUint8 index)
}
/** We are Focusable and can be Checked and focused */
NS_IMETHODIMP nsXULRadioButtonAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULRadioButtonAccessible::GetState(PRUint32 *_retval)
{
nsFormControlAccessible::GetAccState(_retval);
nsFormControlAccessible::GetState(_retval);
PRBool selected = PR_FALSE; // Radio buttons can be selected
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton(do_QueryInterface(mDOMNode));
@ -512,17 +512,17 @@ NS_IMETHODIMP nsXULRadioButtonAccessible::GetAccState(PRUint32 *_retval)
* This gets the parent of the RadioGroup (our grandparent) and sets it
* as our parent, for future calls.
*/
NS_IMETHODIMP nsXULRadioButtonAccessible::GetAccParent(nsIAccessible ** aAccParent)
NS_IMETHODIMP nsXULRadioButtonAccessible::GetParent(nsIAccessible ** aParent)
{
if (! mParent) {
nsCOMPtr<nsIAccessible> tempParent;
nsAccessible::GetAccParent(getter_AddRefs(tempParent));
nsAccessible::GetParent(getter_AddRefs(tempParent));
if (tempParent)
tempParent->GetAccParent(getter_AddRefs(mParent));
tempParent->GetParent(getter_AddRefs(mParent));
}
NS_ASSERTION(mParent,"Whoa! This RadioButtonAcc doesn't have a parent! Better find out why.");
*aAccParent = mParent;
NS_ADDREF(*aAccParent);
*aParent = mParent;
NS_ADDREF(*aParent);
return NS_OK;
}
@ -541,18 +541,18 @@ nsAccessibleWrap(aNode, aShell)
{
}
NS_IMETHODIMP nsXULRadioGroupAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULRadioGroupAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_GROUPING;
return NS_OK;
}
NS_IMETHODIMP nsXULRadioGroupAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULRadioGroupAccessible::GetState(PRUint32 *_retval)
{
// The radio group is not focusable.
// Sometimes the focus controller will report that it is focused.
// That means that the actual selected radio button should be considered focused
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval &= ~(STATE_FOCUSABLE | STATE_FOCUSED);
return NS_OK;
}
@ -571,13 +571,13 @@ nsAccessibleWrap(aNode, aShell)
/**
* We are a statusbar
*/
NS_IMETHODIMP nsXULStatusBarAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULStatusBarAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_STATUSBAR;
return NS_OK;
}
NS_IMETHODIMP nsXULStatusBarAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULStatusBarAccessible::GetState(PRUint32 *_retval)
{
*_retval = 0; // no special state flags for status bar
return NS_OK;
@ -592,15 +592,15 @@ nsAccessibleWrap(aNode, aShell)
{
}
NS_IMETHODIMP nsXULToolbarAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULToolbarAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TOOLBAR;
return NS_OK;
}
NS_IMETHODIMP nsXULToolbarAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULToolbarAccessible::GetState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval &= ~STATE_FOCUSABLE; // toolbar is not focusable
return NS_OK;
}
@ -614,13 +614,13 @@ nsLeafAccessible(aNode, aShell)
{
}
NS_IMETHODIMP nsXULToolbarSeparatorAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULToolbarSeparatorAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_SEPARATOR;
return NS_OK;
}
NS_IMETHODIMP nsXULToolbarSeparatorAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULToolbarSeparatorAccessible::GetState(PRUint32 *_retval)
{
*_retval = 0; // no special state flags for toolbar separator
return NS_OK;

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

@ -49,37 +49,37 @@ class nsXULButtonAccessible : public nsAccessibleWrap
{
public:
nsXULButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& aResult);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetName(nsAString& aResult);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
};
class nsXULCheckboxAccessible : public nsFormControlAccessible
{
public:
nsXULCheckboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsXULDropmarkerAccessible : public nsFormControlAccessible
{
public:
nsXULDropmarkerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
private:
PRBool DropmarkerOpen(PRBool aToggleOpen);
@ -89,9 +89,9 @@ class nsXULGroupboxAccessible : public nsAccessibleWrap
{
public:
nsXULGroupboxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
};
class nsXULProgressMeterAccessible : public nsFormControlAccessible
@ -100,9 +100,9 @@ class nsXULProgressMeterAccessible : public nsFormControlAccessible
public:
nsXULProgressMeterAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString &_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString &_retval);
};
class nsXULRadioButtonAccessible : public nsRadioButtonAccessible
@ -110,41 +110,41 @@ class nsXULRadioButtonAccessible : public nsRadioButtonAccessible
public:
nsXULRadioButtonAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetParent(nsIAccessible **_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsXULRadioGroupAccessible : public nsAccessibleWrap
{
public:
nsXULRadioGroupAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsXULStatusBarAccessible : public nsAccessibleWrap
{
public:
nsXULStatusBarAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsXULToolbarAccessible : public nsAccessibleWrap
{
public:
nsXULToolbarAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsXULToolbarSeparatorAccessible : public nsLeafAccessible
{
public:
nsXULToolbarSeparatorAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
#endif

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

@ -53,9 +53,9 @@ nsAccessibleWrap(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetState(PRUint32 *_retval)
{
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
// Focused?
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
@ -94,15 +94,15 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccState(PRUint32 *_retval)
// We get it by replacing the current offscreen bit with the parent's
PRUint32 parentState = 0;
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
parentAccessible->GetAccState(&parentState);
GetParent(getter_AddRefs(parentAccessible));
parentAccessible->GetState(&parentState);
*_retval &= ~STATE_OFFSCREEN; // clear the old OFFSCREEN bit
*_retval |= (parentState & STATE_OFFSCREEN); // or it with the parent's offscreen bit
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No DOM element for menu node!");
@ -112,7 +112,7 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccName(nsAString& _retval)
}
//return menu accesskey: N or Alt+F
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeyboardShortcut(nsAString& _retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetKeyboardShortcut(nsAString& _retval)
{
static PRInt32 gMenuAccesskeyModifier = -1; // magic value of -1 indicates unitialized state
@ -124,10 +124,10 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeyboardShortcut(nsAString& _retval
return NS_OK;
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
GetParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetAccRole(&role);
parentAccessible->GetRole(&role);
if (role == ROLE_MENUBAR) {
// If top level menu item, add Alt+ or whatever modifier text to string
// No need to cache pref service, this happens rarely
@ -156,7 +156,7 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeyboardShortcut(nsAString& _retval
}
//return menu shortcut: Ctrl+F or Ctrl+Shift+L
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeybinding(nsAString& _retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetKeyBinding(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(mDOMNode));
if (elt) {
@ -171,13 +171,13 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccKeybinding(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUITEM;
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
NS_IMETHODIMP nsXULMenuitemAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
// Argument of PR_FALSE indicates we don't walk anonymous children for menuitems
CacheChildren(PR_FALSE);
@ -185,7 +185,7 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
return NS_OK;
}
NS_IMETHODIMP nsXULMenuitemAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULMenuitemAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Select) { // default action
nsCOMPtr<nsIDOMXULSelectControlItemElement> selectItem(do_QueryInterface(mDOMNode));
@ -199,17 +199,17 @@ NS_IMETHODIMP nsXULMenuitemAccessible::AccDoAction(PRUint8 index)
}
nsCOMPtr<nsIAccessible> parentAccessible;
GetAccParent(getter_AddRefs(parentAccessible));
GetParent(getter_AddRefs(parentAccessible));
if (parentAccessible) {
PRUint32 role;
parentAccessible->GetAccRole(&role);
parentAccessible->GetRole(&role);
if (role == ROLE_LIST) {
nsCOMPtr<nsIAccessible> buttonAccessible;
parentAccessible->GetAccPreviousSibling(getter_AddRefs(buttonAccessible));
parentAccessible->GetPreviousSibling(getter_AddRefs(buttonAccessible));
PRUint32 state;
buttonAccessible->GetAccState(&state);
buttonAccessible->GetState(&state);
if (state & STATE_PRESSED)
buttonAccessible->AccDoAction(eAction_Click);
buttonAccessible->DoAction(eAction_Click);
}
}
return NS_OK;
@ -219,7 +219,7 @@ NS_IMETHODIMP nsXULMenuitemAccessible::AccDoAction(PRUint8 index)
}
/** select us! close combo box if necessary*/
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Select) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("select"), _retval);
@ -228,7 +228,7 @@ NS_IMETHODIMP nsXULMenuitemAccessible::GetAccActionName(PRUint8 index, nsAString
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsXULMenuitemAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULMenuitemAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
@ -242,38 +242,38 @@ nsXULMenuitemAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetState(PRUint32 *_retval)
{
// Isn't focusable, but can be offscreen
nsXULMenuitemAccessible::GetAccState(_retval);
nsXULMenuitemAccessible::GetState(_retval);
*_retval &= STATE_OFFSCREEN;
return NS_OK;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetName(nsAString& _retval)
{
_retval.Assign(NS_LITERAL_STRING(""));
return NS_OK;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_SEPARATOR;
return NS_OK;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::DoAction(PRUint8 index)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetNumActions(PRUint8 *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -284,7 +284,7 @@ nsXULMenupopupAccessible::nsXULMenupopupAccessible(nsIDOMNode* aDOMNode, nsIWeak
{
}
NS_IMETHODIMP nsXULMenupopupAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenupopupAccessible::GetState(PRUint32 *_retval)
{
// We are onscreen if our parent is active
*_retval = 0;
@ -295,9 +295,9 @@ NS_IMETHODIMP nsXULMenupopupAccessible::GetAccState(PRUint32 *_retval)
if (!isActive) {
nsCOMPtr<nsIAccessible> parentAccessible;
nsCOMPtr<nsIDOMNode> parentNode;
GetAccParent(getter_AddRefs(parentAccessible));
GetParent(getter_AddRefs(parentAccessible));
if (parentAccessible)
parentAccessible->AccGetDOMNode(getter_AddRefs(parentNode));
parentAccessible->GetDOMNode(getter_AddRefs(parentNode));
element = do_QueryInterface(parentNode);
if (element)
element->HasAttribute(NS_LITERAL_STRING("open"), &isActive);
@ -309,7 +309,7 @@ NS_IMETHODIMP nsXULMenupopupAccessible::GetAccState(PRUint32 *_retval)
return NS_OK;
}
NS_IMETHODIMP nsXULMenupopupAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULMenupopupAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode));
NS_ASSERTION(element, "No element for popup node!");
@ -328,7 +328,7 @@ NS_IMETHODIMP nsXULMenupopupAccessible::GetAccName(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULMenupopupAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenupopupAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUPOPUP;
return NS_OK;
@ -341,22 +341,22 @@ nsXULMenubarAccessible::nsXULMenubarAccessible(nsIDOMNode* aDOMNode, nsIWeakRefe
{
}
NS_IMETHODIMP nsXULMenubarAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenubarAccessible::GetState(PRUint32 *_retval)
{
nsresult rv = nsAccessible::GetAccState(_retval);
nsresult rv = nsAccessible::GetState(_retval);
*_retval &= ~STATE_FOCUSABLE; // Menu bar iteself is not actually focusable
return rv;
}
NS_IMETHODIMP nsXULMenubarAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULMenubarAccessible::GetName(nsAString& _retval)
{
_retval = NS_LITERAL_STRING("Application");
return NS_OK;
}
NS_IMETHODIMP nsXULMenubarAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULMenubarAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_MENUBAR;
return NS_OK;

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

@ -50,45 +50,45 @@ class nsXULMenuitemAccessible : public nsAccessibleWrap
{
public:
nsXULMenuitemAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccKeyboardShortcut(nsAString& _retval);
NS_IMETHOD GetAccKeybinding(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *aAccChildCount);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetKeyboardShortcut(nsAString& _retval);
NS_IMETHOD GetKeyBinding(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetChildCount(PRInt32 *aAccChildCount);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
};
class nsXULMenuSeparatorAccessible : public nsXULMenuitemAccessible
{
public:
nsXULMenuSeparatorAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
};
class nsXULMenupopupAccessible : public nsAccessibleWrap
{
public:
nsXULMenupopupAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
};
class nsXULMenubarAccessible : public nsAccessibleWrap
{
public:
nsXULMenubarAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
};
#endif

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

@ -74,9 +74,9 @@ nsAccessibleWrap(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULSelectableAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULSelectableAccessible::GetName(nsAString& _retval)
{
return GetXULAccName(_retval);
return GetXULName(_retval);
}
NS_IMPL_ISUPPORTS_INHERITED1(nsXULSelectableAccessible, nsAccessible, nsIAccessibleSelectable)
@ -211,13 +211,13 @@ NS_IMETHODIMP nsXULSelectableAccessible::GetSelectionCount(PRInt32 *aSelectionCo
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULSelectableAccessible::AddSelection(PRInt32 aIndex)
NS_IMETHODIMP nsXULSelectableAccessible::AddChildToSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Add, &isSelected);
}
NS_IMETHODIMP nsXULSelectableAccessible::RemoveSelection(PRInt32 aIndex)
NS_IMETHODIMP nsXULSelectableAccessible::RemoveChildFromSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Remove, &isSelected);
@ -268,7 +268,7 @@ nsXULSelectListAccessible::nsXULSelectListAccessible(nsIDOMNode* aDOMNode,
{
}
NS_IMETHODIMP nsXULSelectListAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULSelectListAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
@ -279,7 +279,7 @@ NS_IMETHODIMP nsXULSelectListAccessible::GetAccRole(PRUint32 *_retval)
* STATE_MULTISELECTABLE
* STATE_EXTSELECTABLE
*/
NS_IMETHODIMP nsXULSelectListAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULSelectListAccessible::GetState(PRUint32 *_retval)
{
*_retval = 0;
nsAutoString selectionTypeString;
@ -300,7 +300,7 @@ nsXULMenuitemAccessible(aDOMNode, aShell)
{
}
NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULSelectOptionAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
@ -313,9 +313,9 @@ NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccRole(PRUint32 *_retval)
* STATE_FOCUSED
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsXULSelectOptionAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULSelectOptionAccessible::GetState(PRUint32 *_retval)
{
nsXULMenuitemAccessible::GetAccState(_retval);
nsXULMenuitemAccessible::GetState(_retval);
nsCOMPtr<nsIDOMXULSelectControlItemElement> item(do_QueryInterface(mDOMNode));
PRBool isSelected = PR_FALSE;
@ -341,9 +341,9 @@ nsXULSelectableAccessible(aDOMNode, aShell)
/**
* Let Accessible count them up
*/
NS_IMETHODIMP nsXULListboxAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsXULListboxAccessible::GetChildCount(PRInt32 *_retval)
{
return nsAccessible::GetAccChildCount(_retval);
return nsAccessible::GetChildCount(_retval);
}
/**
@ -352,10 +352,10 @@ NS_IMETHODIMP nsXULListboxAccessible::GetAccChildCount(PRInt32 *_retval)
* STATE_READONLY
* STATE_FOCUSABLE
*/
NS_IMETHODIMP nsXULListboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULListboxAccessible::GetState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval |= STATE_READONLY | STATE_FOCUSABLE;
@ -377,7 +377,7 @@ NS_IMETHODIMP nsXULListboxAccessible::GetAccState(PRUint32 *_retval)
* Our value is the value of our ( first ) selected child. nsIDOMXULSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsXULListboxAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULListboxAccessible::GetValue(nsAString& _retval)
{
_retval.Truncate();
nsCOMPtr<nsIDOMXULSelectControlElement> select(do_QueryInterface(mDOMNode));
@ -390,7 +390,7 @@ NS_IMETHODIMP nsXULListboxAccessible::GetAccValue(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULListboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULListboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
@ -409,9 +409,9 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsXULListitemAccessible, nsAccessible)
/**
* If there is a Listcell as a child ( not anonymous ) use it, otherwise
* default to getting the name from GetXULAccName
* default to getting the name from GetXULName
*/
NS_IMETHODIMP nsXULListitemAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULListitemAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMNode> child;
if (NS_SUCCEEDED(mDOMNode->GetFirstChild(getter_AddRefs(child)))) {
@ -425,13 +425,13 @@ NS_IMETHODIMP nsXULListitemAccessible::GetAccName(nsAString& _retval)
}
}
}
return GetXULAccName(_retval);
return GetXULName(_retval);
}
/**
*
*/
NS_IMETHODIMP nsXULListitemAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULListitemAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LISTITEM;
return NS_OK;
@ -440,9 +440,9 @@ NS_IMETHODIMP nsXULListitemAccessible::GetAccRole(PRUint32 *_retval)
/**
*
*/
NS_IMETHODIMP nsXULListitemAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULListitemAccessible::GetState(PRUint32 *_retval)
{
// nsAccessible::GetAccState(_retval); // get focused state
// nsAccessible::GetState(_retval); // get focused state
nsCOMPtr<nsIDOMXULSelectControlItemElement> listItem (do_QueryInterface(mDOMNode));
if (listItem) {
@ -482,7 +482,7 @@ nsXULSelectableAccessible(aDOMNode, aShell)
}
/** We are a combobox */
NS_IMETHODIMP nsXULComboboxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULComboboxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_COMBOBOX;
return NS_OK;
@ -497,10 +497,10 @@ NS_IMETHODIMP nsXULComboboxAccessible::GetAccRole(PRUint32 *_retval)
* STATE_EXPANDED
* STATE_COLLAPSED
*/
NS_IMETHODIMP nsXULComboboxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULComboboxAccessible::GetState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mDOMNode));
if (menuList) {
@ -521,11 +521,11 @@ NS_IMETHODIMP nsXULComboboxAccessible::GetAccState(PRUint32 *_retval)
* Our value is the name of our ( first ) selected child. nsIDOMXULSelectElement
* returns this by default with GetValue().
*/
NS_IMETHODIMP nsXULComboboxAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULComboboxAccessible::GetValue(nsAString& _retval)
{
// The first accessible child is the text accessible that contains the name of the selected element.
// This is our value
nsCOMPtr<nsIAccessible> firstChild;
GetAccFirstChild(getter_AddRefs(firstChild));
return firstChild->GetAccName(_retval);
GetFirstChild(getter_AddRefs(firstChild));
return firstChild->GetName(_retval);
}

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

@ -81,7 +81,7 @@ public:
nsXULSelectableAccessible(nsIDOMNode* aDOMNode, nsIWeakReference* aShell);
virtual ~nsXULSelectableAccessible() {}
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetName(nsAString& _retval);
protected:
NS_IMETHOD ChangeSelection(PRInt32 aIndex, PRUint8 aMethod, PRBool *aSelState);
@ -98,8 +98,8 @@ public:
virtual ~nsXULSelectListAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
/*
@ -113,8 +113,8 @@ public:
virtual ~nsXULSelectOptionAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
/** ------------------------------------------------------ */
@ -132,10 +132,10 @@ public:
virtual ~nsXULListboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
};
@ -151,9 +151,9 @@ public:
virtual ~nsXULListitemAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
@ -172,10 +172,10 @@ public:
virtual ~nsXULComboboxAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetValue(nsAString& _retval);
};
#endif

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

@ -56,25 +56,25 @@ nsLeafAccessible(aNode, aShell)
}
/**
* Might need to use the GetXULAccName method from nsFormControlAcc.cpp
* Might need to use the GetXULName method from nsFormControlAcc.cpp
*/
NS_IMETHODIMP nsXULTabAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULTabAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mDOMNode));
if (tab)
return GetXULAccName(_retval);
return GetXULName(_retval);
return NS_ERROR_FAILURE;
}
/** Only one action available */
NS_IMETHODIMP nsXULTabAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULTabAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
/** Return the name of our only action */
NS_IMETHODIMP nsXULTabAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULTabAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("switch"), _retval);
@ -84,7 +84,7 @@ NS_IMETHODIMP nsXULTabAccessible::GetAccActionName(PRUint8 index, nsAString& _re
}
/** Tell the tab to do it's action */
NS_IMETHODIMP nsXULTabAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULTabAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Switch) {
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mDOMNode));
@ -99,7 +99,7 @@ NS_IMETHODIMP nsXULTabAccessible::AccDoAction(PRUint8 index)
}
/** We are a tab */
NS_IMETHODIMP nsXULTabAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PAGETAB;
return NS_OK;
@ -108,10 +108,10 @@ NS_IMETHODIMP nsXULTabAccessible::GetAccRole(PRUint32 *_retval)
/**
* Possible states: focused, focusable, unavailable(disabled), offscreen
*/
NS_IMETHODIMP nsXULTabAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabAccessible::GetState(PRUint32 *_retval)
{
// get focus and disable status from base class
nsLeafAccessible::GetAccState(_retval);
nsLeafAccessible::GetState(_retval);
// In the past, tabs have been focusable in classic theme
// They may be again in the future
@ -144,14 +144,14 @@ nsAccessibleWrap(aNode, aShell)
}
/** We are a window*/
NS_IMETHODIMP nsXULTabBoxAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabBoxAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PANE;
return NS_OK;
}
/** Possible states: normal */
NS_IMETHODIMP nsXULTabBoxAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabBoxAccessible::GetState(PRUint32 *_retval)
{
*_retval = 0;
return NS_OK;
@ -159,7 +159,7 @@ NS_IMETHODIMP nsXULTabBoxAccessible::GetAccState(PRUint32 *_retval)
#ifdef NEVER
/** 2 children, tabs, tabpanels */
NS_IMETHODIMP nsXULTabBoxAccessible::GetAccChildCount(PRInt32 *_retval)
NS_IMETHODIMP nsXULTabBoxAccessible::GetChildCount(PRInt32 *_retval)
{
*_retval = 2;
return NS_OK;
@ -186,7 +186,7 @@ nsAccessibleWrap(aNode, aShell)
}
/** We are a Property Page */
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabPanelsAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PROPERTYPAGE;
return NS_OK;
@ -195,10 +195,10 @@ NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccRole(PRUint32 *_retval)
/**
* Possible values: unavailable
*/
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabPanelsAccessible::GetState(PRUint32 *_retval)
{
// get focus and disable status from base class -- skip container because we have state
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
*_retval &= ~STATE_FOCUSABLE;
return NS_OK;
}
@ -208,7 +208,7 @@ NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccState(PRUint32 *_retval)
* the panel. XXX not sure if the "panels" object should have the
* same name.
*/
NS_IMETHODIMP nsXULTabPanelsAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULTabPanelsAccessible::GetName(nsAString& _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -224,34 +224,34 @@ nsAccessibleWrap(aNode, aShell)
}
/** We are a Page Tab List */
NS_IMETHODIMP nsXULTabsAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabsAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_PAGETABLIST;
return NS_OK;
}
/** no actions */
NS_IMETHODIMP nsXULTabsAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULTabsAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eNo_Action;
return NS_OK;
}
/** no state -- normal */
NS_IMETHODIMP nsXULTabsAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTabsAccessible::GetState(PRUint32 *_retval)
{
*_retval = 0;
return NS_OK;
}
/** no value */
NS_IMETHODIMP nsXULTabsAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULTabsAccessible::GetValue(nsAString& _retval)
{
return NS_OK;
}
/** no name*/
NS_IMETHODIMP nsXULTabsAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULTabsAccessible::GetName(nsAString& _retval)
{
_retval.Truncate();
return NS_OK;

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

@ -48,12 +48,12 @@ class nsXULTabAccessible : public nsLeafAccessible
{
public:
nsXULTabAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD DoAction(PRUint8 index);
};
/**
@ -65,9 +65,9 @@ class nsXULTabBoxAccessible : public nsAccessibleWrap
{
public:
nsXULTabBoxAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
//NS_IMETHOD GetAccChildCount(PRInt32 *_retval); // aaronl remove this?
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
//NS_IMETHOD GetChildCount(PRInt32 *_retval); // aaronl remove this?
};
/**
@ -78,9 +78,9 @@ class nsXULTabPanelsAccessible : public nsAccessibleWrap
{
public:
nsXULTabPanelsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
protected:
nsresult GetAccPluginChild(nsIAccessible **_retval);
@ -95,11 +95,11 @@ class nsXULTabsAccessible : public nsAccessibleWrap
{
public:
nsXULTabsAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD GetName(nsAString& _retval);
};
#endif

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

@ -50,8 +50,8 @@ nsTextAccessibleWrap(aDomNode, aShell)
{
}
/* wstring getAccName (); */
NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAString& _retval)
/* wstring getName (); */
NS_IMETHODIMP nsXULTextAccessible::GetName(nsAString& _retval)
{
nsCOMPtr<nsIDOMXULDescriptionElement> descriptionElement(do_QueryInterface(mDOMNode));
if (descriptionElement) {
@ -61,7 +61,7 @@ NS_IMETHODIMP nsXULTextAccessible::GetAccName(nsAString& _retval)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsXULTextAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTextAccessible::GetState(PRUint32 *_retval)
{
// Labels and description can only have read only state
// They are not focusable or selectable
@ -77,22 +77,22 @@ nsLeafAccessible(aDomNode, aShell)
{
}
NS_IMETHODIMP nsXULTooltipAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULTooltipAccessible::GetName(nsAString& _retval)
{
//XXX, kyle.yuan@sun.com, we don't know how to get at this information at the moment,
// because it is not loaded until it shows.
return NS_OK;
}
NS_IMETHODIMP nsXULTooltipAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTooltipAccessible::GetState(PRUint32 *_retval)
{
nsLeafAccessible::GetAccState(_retval);
nsLeafAccessible::GetState(_retval);
*_retval &= ~STATE_FOCUSABLE;
*_retval |= STATE_READONLY;
return NS_OK;
}
NS_IMETHODIMP nsXULTooltipAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTooltipAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_TOOLTIP;
return NS_OK;

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

@ -50,8 +50,8 @@ class nsXULTextAccessible : public nsTextAccessibleWrap
public:
nsXULTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
};
class nsXULTooltipAccessible : public nsLeafAccessible
@ -59,9 +59,9 @@ class nsXULTooltipAccessible : public nsLeafAccessible
public:
nsXULTooltipAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
};
#endif

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

@ -91,10 +91,10 @@ void nsXULTreeAccessible::GetTreeBoxObject(nsIDOMNode *aDOMNode, nsITreeBoxObjec
*aBoxObject = nsnull;
}
NS_IMETHODIMP nsXULTreeAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeAccessible::GetState(PRUint32 *_retval)
{
// Get focus status from base class
nsAccessible::GetAccState(_retval);
nsAccessible::GetState(_retval);
// see if we are multiple select if so set ourselves as such
nsCOMPtr<nsIDOMElement> element (do_QueryInterface(mDOMNode));
@ -112,7 +112,7 @@ NS_IMETHODIMP nsXULTreeAccessible::GetAccState(PRUint32 *_retval)
}
// The value is the first selected child
NS_IMETHODIMP nsXULTreeAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULTreeAccessible::GetValue(nsAString& _retval)
{
_retval.Truncate(0);
@ -137,58 +137,58 @@ NS_IMETHODIMP nsXULTreeAccessible::GetAccValue(nsAString& _retval)
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_OUTLINE;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessible::GetAccFirstChild(nsIAccessible **aAccFirstChild)
NS_IMETHODIMP nsXULTreeAccessible::GetFirstChild(nsIAccessible **aFirstChild)
{
nsAccessible::GetAccFirstChild(aAccFirstChild);
nsAccessible::GetFirstChild(aFirstChild);
// in normal case, tree's first child should be treecols, if it is not here,
// use the first row as tree's first child
if (*aAccFirstChild == nsnull) {
if (*aFirstChild == nsnull) {
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
PRInt32 rowCount;
mTreeView->GetRowCount(&rowCount);
if (rowCount > 0) {
*aAccFirstChild = new nsXULTreeitemAccessible(this, mDOMNode, mWeakShell, 0);
if (! *aAccFirstChild)
*aFirstChild = new nsXULTreeitemAccessible(this, mDOMNode, mWeakShell, 0);
if (! *aFirstChild)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aAccFirstChild);
NS_ADDREF(*aFirstChild);
}
}
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessible::GetAccLastChild(nsIAccessible **aAccLastChild)
NS_IMETHODIMP nsXULTreeAccessible::GetLastChild(nsIAccessible **aLastChild)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
PRInt32 rowCount;
mTreeView->GetRowCount(&rowCount);
if (rowCount > 0) {
*aAccLastChild = new nsXULTreeitemAccessible(this, mDOMNode, mWeakShell, rowCount - 1);
if (! *aAccLastChild)
*aLastChild = new nsXULTreeitemAccessible(this, mDOMNode, mWeakShell, rowCount - 1);
if (! *aLastChild)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aAccLastChild);
NS_ADDREF(*aLastChild);
}
else // if there is not any rows, use treecols as tree's last child
nsAccessible::GetAccLastChild(aAccLastChild);
nsAccessible::GetLastChild(aLastChild);
return NS_OK;
}
// tree's children count is row count + treecols count
NS_IMETHODIMP nsXULTreeAccessible::GetAccChildCount(PRInt32 *aAccChildCount)
NS_IMETHODIMP nsXULTreeAccessible::GetChildCount(PRInt32 *aAccChildCount)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
nsAccessible::GetAccChildCount(aAccChildCount);
nsAccessible::GetChildCount(aAccChildCount);
PRInt32 rowCount;
mTreeView->GetRowCount(&rowCount);
@ -267,13 +267,13 @@ NS_IMETHODIMP nsXULTreeAccessible::ChangeSelection(PRInt32 aIndex, PRUint8 aMeth
return NS_OK;
}
NS_IMETHODIMP nsXULTreeAccessible::AddSelection(PRInt32 aIndex)
NS_IMETHODIMP nsXULTreeAccessible::AddChildToSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Add, &isSelected);
}
NS_IMETHODIMP nsXULTreeAccessible::RemoveSelection(PRInt32 aIndex)
NS_IMETHODIMP nsXULTreeAccessible::RemoveChildFromSelection(PRInt32 aIndex)
{
PRBool isSelected;
return ChangeSelection(aIndex, eSelection_Remove, &isSelected);
@ -381,14 +381,14 @@ nsLeafAccessible(aDOMNode, aShell)
NS_IMPL_ISUPPORTS_INHERITED0(nsXULTreeitemAccessible, nsLeafAccessible)
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULTreeitemAccessible::GetName(nsAString& _retval)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
return mTreeView->GetCellText(mRow, mColumn.get(), _retval);
}
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccValue(nsAString& _retval)
NS_IMETHODIMP nsXULTreeitemAccessible::GetValue(nsAString& _retval)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -409,14 +409,14 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetUniqueID(void **aUniqueID)
return NS_OK;
}
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeitemAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_OUTLINEITEM;
return NS_OK;
}
// Possible states: focused, focusable, selected, expanded/collapsed
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeitemAccessible::GetState(PRUint32 *_retval)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -456,7 +456,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccState(PRUint32 *_retval)
}
// Only one actions available
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULTreeitemAccessible::GetNumActions(PRUint8 *_retval)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -471,7 +471,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccNumActions(PRUint8 *_retval)
}
// Return the name of our only action
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULTreeitemAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -492,13 +492,13 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccActionName(PRUint8 index, nsAString
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccParent(nsIAccessible **aAccParent)
NS_IMETHODIMP nsXULTreeitemAccessible::GetParent(nsIAccessible **aParent)
{
*aAccParent = nsnull;
*aParent = nsnull;
if (mParent) {
*aAccParent = mParent;
NS_ADDREF(*aAccParent);
*aParent = mParent;
NS_ADDREF(*aParent);
}
return NS_OK;
@ -506,9 +506,9 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccParent(nsIAccessible **aAccParent)
// Return the next row of tree if mColumnIndex < 0 (if any),
// otherwise return the next cell.
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccNextSibling(nsIAccessible **aAccNextSibling)
NS_IMETHODIMP nsXULTreeitemAccessible::GetNextSibling(nsIAccessible **aNextSibling)
{
*aAccNextSibling = nsnull;
*aNextSibling = nsnull;
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -517,10 +517,10 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccNextSibling(nsIAccessible **aAccNex
if (mColumnIndex < 0) {
if (mRow < rowCount - 1) {
*aAccNextSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, mRow + 1);
if (! *aAccNextSibling)
*aNextSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, mRow + 1);
if (! *aNextSibling)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aAccNextSibling);
NS_ADDREF(*aNextSibling);
}
return NS_OK;
@ -542,10 +542,10 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccNextSibling(nsIAccessible **aAccNex
row++;
}
*aAccNextSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, row, column);
NS_ENSURE_TRUE(*aAccNextSibling, NS_ERROR_OUT_OF_MEMORY);
*aNextSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, row, column);
NS_ENSURE_TRUE(*aNextSibling, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aAccNextSibling);
NS_ADDREF(*aNextSibling);
#endif //MOZ_ACCESSIBILITY_ATK
return rv;
@ -553,17 +553,17 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccNextSibling(nsIAccessible **aAccNex
// Return the previou row of tree if mColumnIndex < 0 (if any),
// otherwise return the previou cell.
NS_IMETHODIMP nsXULTreeitemAccessible::GetAccPreviousSibling(nsIAccessible **aAccPreviousSibling)
NS_IMETHODIMP nsXULTreeitemAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
{
*aAccPreviousSibling = nsnull;
*aPreviousSibling = nsnull;
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
if (mRow > 0 && mColumnIndex < 0) {
*aAccPreviousSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, mRow - 1);
if (! *aAccPreviousSibling)
*aPreviousSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, mRow - 1);
if (! *aPreviousSibling)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aAccPreviousSibling);
NS_ADDREF(*aPreviousSibling);
return NS_OK;
}
@ -584,16 +584,16 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetAccPreviousSibling(nsIAccessible **aAc
row--;
}
*aAccPreviousSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, row, column);
NS_ENSURE_TRUE(*aAccPreviousSibling, NS_ERROR_OUT_OF_MEMORY);
*aPreviousSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, row, column);
NS_ENSURE_TRUE(*aPreviousSibling, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aAccPreviousSibling);
NS_ADDREF(*aPreviousSibling);
#endif //MOZ_ACCESSIBILITY_ATK
return rv;
}
NS_IMETHODIMP nsXULTreeitemAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULTreeitemAccessible::DoAction(PRUint8 index)
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -603,7 +603,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::AccDoAction(PRUint8 index)
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsXULTreeitemAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
NS_IMETHODIMP nsXULTreeitemAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
*x = *y = *width = *height = 0;
@ -655,7 +655,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::AccGetBounds(PRInt32 *x, PRInt32 *y, PRIn
return NS_OK;
}
NS_IMETHODIMP nsXULTreeitemAccessible::AccRemoveSelection()
NS_IMETHODIMP nsXULTreeitemAccessible::RemoveSelection()
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -671,7 +671,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::AccRemoveSelection()
return NS_OK;
}
NS_IMETHODIMP nsXULTreeitemAccessible::AccTakeSelection()
NS_IMETHODIMP nsXULTreeitemAccessible::TakeSelection()
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -687,7 +687,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::AccTakeSelection()
return NS_OK;
}
NS_IMETHODIMP nsXULTreeitemAccessible::AccTakeFocus()
NS_IMETHODIMP nsXULTreeitemAccessible::TakeFocus()
{
NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
@ -697,7 +697,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::AccTakeFocus()
selection->SetCurrentIndex(mRow);
// focus event will be fired here
return nsAccessible::AccTakeFocus();
return nsAccessible::TakeFocus();
}
// ---------- nsXULTreeColumnsAccessible ----------
@ -709,25 +709,25 @@ nsAccessibleWrap(aDOMNode, aShell)
NS_IMPL_ISUPPORTS_INHERITED0(nsXULTreeColumnsAccessible, nsAccessible)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetState(PRUint32 *_retval)
{
*_retval = STATE_READONLY;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_LIST;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("click"), _retval);
@ -737,11 +737,11 @@ NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccActionName(PRUint8 index, nsAStr
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccNextSibling(nsIAccessible **aAccNextSibling)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetNextSibling(nsIAccessible **aNextSibling)
{
nsresult ret = nsAccessible::GetAccNextSibling(aAccNextSibling);
nsresult ret = nsAccessible::GetNextSibling(aNextSibling);
if (*aAccNextSibling == nsnull) { // if there is not other sibling, use the first row as its sibling
if (*aNextSibling == nsnull) { // if there is not other sibling, use the first row as its sibling
nsCOMPtr<nsITreeBoxObject> tree;
nsCOMPtr<nsITreeView> treeView;
@ -752,10 +752,10 @@ NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccNextSibling(nsIAccessible **aAcc
PRInt32 rowCount;
treeView->GetRowCount(&rowCount);
if (rowCount > 0) {
*aAccNextSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, 0);
if (! *aAccNextSibling)
*aNextSibling = new nsXULTreeitemAccessible(mParent, mDOMNode, mWeakShell, 0);
if (! *aNextSibling)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aAccNextSibling);
NS_ADDREF(*aNextSibling);
ret = NS_OK;
}
}
@ -765,12 +765,12 @@ NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccNextSibling(nsIAccessible **aAcc
return ret;
}
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetAccPreviousSibling(nsIAccessible **aAccPreviousSibling)
NS_IMETHODIMP nsXULTreeColumnsAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
{
return nsAccessible::GetAccPreviousSibling(aAccPreviousSibling);
return nsAccessible::GetPreviousSibling(aPreviousSibling);
}
NS_IMETHODIMP nsXULTreeColumnsAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULTreeColumnsAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click)
return NS_OK;
@ -787,30 +787,30 @@ nsLeafAccessible(aDOMNode, aShell)
NS_IMPL_ISUPPORTS_INHERITED0(nsXULTreeColumnitemAccessible, nsLeafAccessible)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetAccState(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetState(PRUint32 *_retval)
{
*_retval = STATE_READONLY;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetAccName(nsAString& _retval)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetName(nsAString& _retval)
{
return GetXULAccName(_retval);
return GetXULName(_retval);
}
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetAccRole(PRUint32 *_retval)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetRole(PRUint32 *_retval)
{
*_retval = ROLE_COLUMNHEADER;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetAccNumActions(PRUint8 *_retval)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetNumActions(PRUint8 *_retval)
{
*_retval = eSingle_Action;
return NS_OK;
}
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetAccActionName(PRUint8 index, nsAString& _retval)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetActionName(PRUint8 index, nsAString& _retval)
{
if (index == eAction_Click) {
nsAccessible::GetTranslatedString(NS_LITERAL_STRING("click"), _retval);
@ -820,7 +820,7 @@ NS_IMETHODIMP nsXULTreeColumnitemAccessible::GetAccActionName(PRUint8 index, nsA
return NS_ERROR_INVALID_ARG;
}
NS_IMETHODIMP nsXULTreeColumnitemAccessible::AccDoAction(PRUint8 index)
NS_IMETHODIMP nsXULTreeColumnitemAccessible::DoAction(PRUint8 index)
{
if (index == eAction_Click) {
nsCOMPtr<nsIDOMXULElement> colElement(do_QueryInterface(mDOMNode));

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

@ -57,13 +57,13 @@ public:
virtual ~nsXULTreeAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD GetAccFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetAccLastChild(nsIAccessible **_retval);
NS_IMETHOD GetAccChildCount(PRInt32 *_retval);
NS_IMETHOD GetFirstChild(nsIAccessible **_retval);
NS_IMETHOD GetLastChild(nsIAccessible **_retval);
NS_IMETHOD GetChildCount(PRInt32 *_retval);
static void GetTreeBoxObject(nsIDOMNode* aDOMNode, nsITreeBoxObject** aBoxObject);
@ -86,22 +86,22 @@ public:
virtual ~nsXULTreeitemAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccValue(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetValue(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccParent(nsIAccessible **_retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetParent(nsIAccessible **_retval);
NS_IMETHOD GetNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD AccGetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD AccRemoveSelection(void);
NS_IMETHOD AccTakeSelection(void);
NS_IMETHOD AccTakeFocus(void);
NS_IMETHOD DoAction(PRUint8 index);
NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
NS_IMETHOD RemoveSelection(void);
NS_IMETHOD TakeSelection(void);
NS_IMETHOD TakeFocus(void);
/* ------ nsIAccessNode ----- */
NS_IMETHOD GetUniqueID(void **aUniqueID);
@ -122,15 +122,15 @@ public:
virtual ~nsXULTreeColumnsAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetAccNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetAccPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD GetNextSibling(nsIAccessible **_retval);
NS_IMETHOD GetPreviousSibling(nsIAccessible **_retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD DoAction(PRUint8 index);
};
class nsXULTreeColumnitemAccessible : public nsLeafAccessible
@ -142,13 +142,13 @@ public:
virtual ~nsXULTreeColumnitemAccessible() {}
/* ----- nsIAccessible ----- */
NS_IMETHOD GetAccName(nsAString& _retval);
NS_IMETHOD GetAccRole(PRUint32 *_retval);
NS_IMETHOD GetAccState(PRUint32 *_retval);
NS_IMETHOD GetAccNumActions(PRUint8 *_retval);
NS_IMETHOD GetAccActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
NS_IMETHOD GetNumActions(PRUint8 *_retval);
NS_IMETHOD GetActionName(PRUint8 index, nsAString& _retval);
NS_IMETHOD AccDoAction(PRUint8 index);
NS_IMETHOD DoAction(PRUint8 index);
};
#endif