зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to services-central.
This commit is contained in:
Коммит
dd6c3f6d8d
|
@ -83,7 +83,7 @@ public:
|
|||
* should be returned from the cache or can be created
|
||||
*/
|
||||
virtual nsAccessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
|
||||
PRBool aCanCreate) = 0;
|
||||
bool aCanCreate) = 0;
|
||||
|
||||
/**
|
||||
* Creates accessible for the given DOM node or frame.
|
||||
|
|
|
@ -320,7 +320,7 @@ nsAccessibleWrap::Shutdown()
|
|||
nsAccessible::Shutdown();
|
||||
}
|
||||
|
||||
MaiHyperlink* nsAccessibleWrap::GetMaiHyperlink(PRBool aCreate /* = PR_TRUE */)
|
||||
MaiHyperlink* nsAccessibleWrap::GetMaiHyperlink(bool aCreate /* = true */)
|
||||
{
|
||||
// make sure mAtkObject is created
|
||||
GetAtkObject();
|
||||
|
@ -550,7 +550,7 @@ GetUniqueMaiAtkTypeName(PRUint16 interfacesBits)
|
|||
return name;
|
||||
}
|
||||
|
||||
PRBool nsAccessibleWrap::IsValidObject()
|
||||
bool nsAccessibleWrap::IsValidObject()
|
||||
{
|
||||
// to ensure we are not shut down
|
||||
return !IsDefunct();
|
||||
|
@ -768,7 +768,7 @@ ConvertToAtkAttributeSet(nsIPersistentProperties* aAttributes)
|
|||
nsresult rv = aAttributes->Enumerate(getter_AddRefs(propEnum));
|
||||
NS_ENSURE_SUCCESS(rv, nsnull);
|
||||
|
||||
PRBool hasMore;
|
||||
bool hasMore;
|
||||
while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) {
|
||||
nsCOMPtr<nsISupports> sup;
|
||||
rv = propEnum->GetNext(getter_AddRefs(sup));
|
||||
|
@ -909,7 +909,7 @@ TranslateStates(PRUint64 aState, AtkStateSet* aStateSet)
|
|||
PRUint64 bitMask = 1;
|
||||
while (gAtkStateMap[stateIndex].stateMapEntryType != kNoSuchState) {
|
||||
if (gAtkStateMap[stateIndex].atkState) { // There's potentially an ATK state for this
|
||||
PRBool isStateOn = (aState & bitMask) != 0;
|
||||
bool isStateOn = (aState & bitMask) != 0;
|
||||
if (gAtkStateMap[stateIndex].stateMapEntryType == kMapOpposite) {
|
||||
isStateOn = !isStateOn;
|
||||
}
|
||||
|
@ -1319,7 +1319,7 @@ nsAccessibleWrap::FireAtkStateChangeEvent(AccEvent* aEvent,
|
|||
AccStateChangeEvent* event = downcast_accEvent(aEvent);
|
||||
NS_ENSURE_TRUE(event, NS_ERROR_FAILURE);
|
||||
|
||||
PRBool isEnabled = event->IsStateEnabled();
|
||||
bool isEnabled = event->IsStateEnabled();
|
||||
PRInt32 stateIndex = AtkStateMap::GetStateIndexFor(event->GetState());
|
||||
if (stateIndex >= 0) {
|
||||
NS_ASSERTION(gAtkStateMap[stateIndex].stateMapEntryType != kNoSuchState,
|
||||
|
@ -1353,8 +1353,8 @@ nsAccessibleWrap::FireAtkTextChangedEvent(AccEvent* aEvent,
|
|||
|
||||
PRInt32 start = event->GetStartOffset();
|
||||
PRUint32 length = event->GetLength();
|
||||
PRBool isInserted = event->IsTextInserted();
|
||||
PRBool isFromUserInput = aEvent->IsFromUserInput();
|
||||
bool isInserted = event->IsTextInserted();
|
||||
bool isFromUserInput = aEvent->IsFromUserInput();
|
||||
char* signal_name = nsnull;
|
||||
|
||||
if (gAvailableAtkSignals == eUnknown)
|
||||
|
@ -1384,7 +1384,7 @@ nsAccessibleWrap::FireAtkTextChangedEvent(AccEvent* aEvent,
|
|||
|
||||
nsresult
|
||||
nsAccessibleWrap::FireAtkShowHideEvent(AccEvent* aEvent,
|
||||
AtkObject *aObject, PRBool aIsAdded)
|
||||
AtkObject *aObject, bool aIsAdded)
|
||||
{
|
||||
if (aIsAdded)
|
||||
MAI_LOG_DEBUG(("\n\nReceived: Show event\n"));
|
||||
|
@ -1395,7 +1395,7 @@ nsAccessibleWrap::FireAtkShowHideEvent(AccEvent* aEvent,
|
|||
AtkObject *parentObject = getParentCB(aObject);
|
||||
NS_ENSURE_STATE(parentObject);
|
||||
|
||||
PRBool isFromUserInput = aEvent->IsFromUserInput();
|
||||
bool isFromUserInput = aEvent->IsFromUserInput();
|
||||
char *signal_name = g_strconcat(aIsAdded ? "children_changed::add" : "children_changed::remove",
|
||||
isFromUserInput ? "" : kNonUserInputEvent, NULL);
|
||||
g_signal_emit_by_name(parentObject, signal_name, indexInParent, aObject, NULL);
|
||||
|
|
|
@ -104,10 +104,10 @@ public:
|
|||
AtkObject * GetAtkObject(void);
|
||||
static AtkObject * GetAtkObject(nsIAccessible * acc);
|
||||
|
||||
PRBool IsValidObject();
|
||||
bool IsValidObject();
|
||||
|
||||
// get/set the MaiHyperlink object for this nsAccessibleWrap
|
||||
MaiHyperlink* GetMaiHyperlink(PRBool aCreate = PR_TRUE);
|
||||
MaiHyperlink* GetMaiHyperlink(bool aCreate = true);
|
||||
void SetMaiHyperlink(MaiHyperlink* aMaiHyperlink);
|
||||
|
||||
static const char * ReturnString(nsAString &aString) {
|
||||
|
@ -122,7 +122,7 @@ protected:
|
|||
nsresult FireAtkStateChangeEvent(AccEvent* aEvent, AtkObject *aObject);
|
||||
nsresult FireAtkTextChangedEvent(AccEvent* aEvent, AtkObject *aObject);
|
||||
nsresult FireAtkShowHideEvent(AccEvent* aEvent, AtkObject *aObject,
|
||||
PRBool aIsAdded);
|
||||
bool aIsAdded);
|
||||
|
||||
AtkObject *mAtkObject;
|
||||
|
||||
|
|
|
@ -611,7 +611,7 @@ toplevel_event_watcher(GSignalInvocationHint* ihint,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsApplicationAccessibleWrap::Init()
|
||||
{
|
||||
// XXX following code is copied from widget/src/gtk2/nsWindow.cpp
|
||||
|
@ -619,7 +619,7 @@ nsApplicationAccessibleWrap::Init()
|
|||
// see bug 390761
|
||||
|
||||
// check if accessibility enabled/disabled by environment variable
|
||||
PRBool isGnomeATEnabled = PR_FALSE;
|
||||
bool isGnomeATEnabled = false;
|
||||
const char *envValue = PR_GetEnv(sAccEnv);
|
||||
if (envValue) {
|
||||
isGnomeATEnabled = !!atoi(envValue);
|
||||
|
@ -752,7 +752,7 @@ gboolean fireRootAccessibleAddedCB(gpointer data)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
|
||||
{
|
||||
if (!nsApplicationAccessible::AppendChild(aChild))
|
||||
|
@ -779,7 +779,7 @@ nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
|
||||
{
|
||||
PRInt32 index = aChild->IndexInParent();
|
||||
|
|
|
@ -54,11 +54,11 @@ public:
|
|||
virtual ~nsApplicationAccessibleWrap();
|
||||
|
||||
// nsAccessNode
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
|
||||
// nsAccessible
|
||||
virtual PRBool AppendChild(nsAccessible* aChild);
|
||||
virtual PRBool RemoveChild(nsAccessible* aChild);
|
||||
virtual bool AppendChild(nsAccessible* aChild);
|
||||
virtual bool RemoveChild(nsAccessible* aChild);
|
||||
|
||||
// return the atk object for app root accessible
|
||||
NS_IMETHOD GetNativeInterface(void **aOutAccessible);
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
nsIWeakReference *aShell);
|
||||
virtual ~nsDocAccessibleWrap();
|
||||
|
||||
PRBool mActivated;
|
||||
bool mActivated;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -464,7 +464,7 @@ isColumnSelectedCB(AtkTable *aTable, gint aColumn)
|
|||
getter_AddRefs(accTable));
|
||||
NS_ENSURE_TRUE(accTable, FALSE);
|
||||
|
||||
PRBool outValue;
|
||||
bool outValue;
|
||||
nsresult rv = accTable->IsColumnSelected(aColumn, &outValue);
|
||||
return NS_FAILED(rv) ? FALSE : static_cast<gboolean>(outValue);
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ isRowSelectedCB(AtkTable *aTable, gint aRow)
|
|||
getter_AddRefs(accTable));
|
||||
NS_ENSURE_TRUE(accTable, FALSE);
|
||||
|
||||
PRBool outValue;
|
||||
bool outValue;
|
||||
nsresult rv = accTable->IsRowSelected(aRow, &outValue);
|
||||
return NS_FAILED(rv) ? FALSE : static_cast<gboolean>(outValue);
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ isCellSelectedCB(AtkTable *aTable, gint aRow, gint aColumn)
|
|||
getter_AddRefs(accTable));
|
||||
NS_ENSURE_TRUE(accTable, FALSE);
|
||||
|
||||
PRBool outValue;
|
||||
bool outValue;
|
||||
nsresult rv = accTable->IsCellSelected(aRow, aColumn, &outValue);
|
||||
return NS_FAILED(rv) ? FALSE : static_cast<gboolean>(outValue);
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ AccEvent::CaptureIsFromUserInput(EIsFromUserInput aIsFromUserInput)
|
|||
// decide how to coalesce events created via accessible (instead of node).
|
||||
AccStateChangeEvent::
|
||||
AccStateChangeEvent(nsAccessible* aAccessible, PRUint64 aState,
|
||||
PRBool aIsEnabled, EIsFromUserInput aIsFromUserInput):
|
||||
bool aIsEnabled, EIsFromUserInput aIsFromUserInput):
|
||||
AccEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, aAccessible,
|
||||
aIsFromUserInput, eAllowDupes),
|
||||
mState(aState), mIsEnabled(aIsEnabled)
|
||||
|
@ -201,7 +201,7 @@ AccStateChangeEvent::
|
|||
}
|
||||
|
||||
AccStateChangeEvent::
|
||||
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, PRBool aIsEnabled):
|
||||
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, bool aIsEnabled):
|
||||
AccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aNode,
|
||||
eAutoDetect, eAllowDupes),
|
||||
mState(aState), mIsEnabled(aIsEnabled)
|
||||
|
@ -244,7 +244,7 @@ AccStateChangeEvent::CreateXPCOMObject()
|
|||
// XXX revisit this when coalescence is faster (eCoalesceFromSameSubtree)
|
||||
AccTextChangeEvent::
|
||||
AccTextChangeEvent(nsAccessible* aAccessible, PRInt32 aStart,
|
||||
const nsAString& aModifiedText, PRBool aIsInserted,
|
||||
const nsAString& aModifiedText, bool aIsInserted,
|
||||
EIsFromUserInput aIsFromUserInput)
|
||||
: AccEvent(aIsInserted ?
|
||||
static_cast<PRUint32>(nsIAccessibleEvent::EVENT_TEXT_INSERTED) :
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
// AccEvent
|
||||
PRUint32 GetEventType() const { return mEventType; }
|
||||
EEventRule GetEventRule() const { return mEventRule; }
|
||||
PRBool IsFromUserInput() const { return mIsFromUserInput; }
|
||||
bool IsFromUserInput() const { return mIsFromUserInput; }
|
||||
|
||||
nsAccessible *GetAccessible();
|
||||
nsDocAccessible* GetDocAccessible();
|
||||
|
@ -152,7 +152,7 @@ protected:
|
|||
*/
|
||||
void CaptureIsFromUserInput(EIsFromUserInput aIsFromUserInput);
|
||||
|
||||
PRBool mIsFromUserInput;
|
||||
bool mIsFromUserInput;
|
||||
PRUint32 mEventType;
|
||||
EEventRule mEventRule;
|
||||
nsRefPtr<nsAccessible> mAccessible;
|
||||
|
@ -169,10 +169,10 @@ class AccStateChangeEvent: public AccEvent
|
|||
{
|
||||
public:
|
||||
AccStateChangeEvent(nsAccessible* aAccessible, PRUint64 aState,
|
||||
PRBool aIsEnabled,
|
||||
bool aIsEnabled,
|
||||
EIsFromUserInput aIsFromUserInput = eAutoDetect);
|
||||
|
||||
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, PRBool aIsEnabled);
|
||||
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, bool aIsEnabled);
|
||||
|
||||
AccStateChangeEvent(nsINode* aNode, PRUint64 aState);
|
||||
|
||||
|
@ -187,11 +187,11 @@ public:
|
|||
|
||||
// AccStateChangeEvent
|
||||
PRUint64 GetState() const { return mState; }
|
||||
PRBool IsStateEnabled() const { return mIsEnabled; }
|
||||
bool IsStateEnabled() const { return mIsEnabled; }
|
||||
|
||||
private:
|
||||
PRUint64 mState;
|
||||
PRBool mIsEnabled;
|
||||
bool mIsEnabled;
|
||||
};
|
||||
|
||||
|
||||
|
@ -202,7 +202,7 @@ class AccTextChangeEvent: public AccEvent
|
|||
{
|
||||
public:
|
||||
AccTextChangeEvent(nsAccessible* aAccessible, PRInt32 aStart,
|
||||
const nsAString& aModifiedText, PRBool aIsInserted,
|
||||
const nsAString& aModifiedText, bool aIsInserted,
|
||||
EIsFromUserInput aIsFromUserInput = eAutoDetect);
|
||||
|
||||
// AccEvent
|
||||
|
@ -217,13 +217,13 @@ public:
|
|||
// AccTextChangeEvent
|
||||
PRInt32 GetStartOffset() const { return mStart; }
|
||||
PRUint32 GetLength() const { return mModifiedText.Length(); }
|
||||
PRBool IsTextInserted() const { return mIsInserted; }
|
||||
bool IsTextInserted() const { return mIsInserted; }
|
||||
void GetModifiedText(nsAString& aModifiedText)
|
||||
{ aModifiedText = mModifiedText; }
|
||||
|
||||
private:
|
||||
PRInt32 mStart;
|
||||
PRBool mIsInserted;
|
||||
bool mIsInserted;
|
||||
nsString mModifiedText;
|
||||
|
||||
friend class NotificationController;
|
||||
|
|
|
@ -76,7 +76,7 @@ AccIterator::Next()
|
|||
continue;
|
||||
}
|
||||
|
||||
PRBool isComplying = mFilterFunc(child);
|
||||
bool isComplying = mFilterFunc(child);
|
||||
if (isComplying)
|
||||
return child;
|
||||
|
||||
|
@ -152,10 +152,10 @@ RelatedAccIterator::Next()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
HTMLLabelIterator::
|
||||
HTMLLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement,
|
||||
HTMLLabelIterator(nsDocAccessible* aDocument, const nsAccessible* aAccessible,
|
||||
LabelFilter aFilter) :
|
||||
mRelIter(aDocument, aElement, nsGkAtoms::_for),
|
||||
mElement(aElement), mLabelFilter(aFilter)
|
||||
mRelIter(aDocument, aAccessible->GetContent(), nsGkAtoms::_for),
|
||||
mAcc(aAccessible), mLabelFilter(aFilter)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -170,20 +170,25 @@ HTMLLabelIterator::Next()
|
|||
return label;
|
||||
}
|
||||
|
||||
if (mLabelFilter == eSkipAncestorLabel)
|
||||
// Ignore ancestor label on not widget accessible.
|
||||
if (mLabelFilter == eSkipAncestorLabel || !mAcc->IsWidget())
|
||||
return nsnull;
|
||||
|
||||
// Go up tree get name of ancestor label if there is one (an ancestor <label>
|
||||
// implicitly points to us). Don't go up farther than form or body element.
|
||||
nsIContent* walkUpContent = mElement;
|
||||
while ((walkUpContent = walkUpContent->GetParent()) &&
|
||||
walkUpContent->Tag() != nsGkAtoms::form &&
|
||||
walkUpContent->Tag() != nsGkAtoms::body) {
|
||||
if (walkUpContent->Tag() == nsGkAtoms::label) {
|
||||
// Prevent infinite loop.
|
||||
mLabelFilter = eSkipAncestorLabel;
|
||||
return GetAccService()->GetAccessible(walkUpContent);
|
||||
// Go up tree to get a name of ancestor label if there is one (an ancestor
|
||||
// <label> implicitly points to us). Don't go up farther than form or
|
||||
// document.
|
||||
nsAccessible* walkUp = mAcc->Parent();
|
||||
while (walkUp && !walkUp->IsDoc()) {
|
||||
nsIContent* walkUpElm = walkUp->GetContent();
|
||||
if (walkUpElm->Tag() == nsGkAtoms::label) {
|
||||
mLabelFilter = eSkipAncestorLabel; // prevent infinite loop
|
||||
return walkUp;
|
||||
}
|
||||
|
||||
if (walkUpElm->Tag() == nsGkAtoms::form)
|
||||
break;
|
||||
|
||||
walkUp = walkUp->Parent();
|
||||
}
|
||||
|
||||
return nsnull;
|
||||
|
|
|
@ -109,7 +109,7 @@ private:
|
|||
};
|
||||
|
||||
filters::FilterFuncPtr mFilterFunc;
|
||||
PRBool mIsDeep;
|
||||
bool mIsDeep;
|
||||
IteratorState *mState;
|
||||
};
|
||||
|
||||
|
@ -155,7 +155,7 @@ private:
|
|||
|
||||
|
||||
/**
|
||||
* Used to iterate through HTML labels associated with the given element.
|
||||
* Used to iterate through HTML labels associated with the given accessible.
|
||||
*/
|
||||
class HTMLLabelIterator : public AccIterable
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
eSkipAncestorLabel
|
||||
};
|
||||
|
||||
HTMLLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement,
|
||||
HTMLLabelIterator(nsDocAccessible* aDocument, const nsAccessible* aAccessible,
|
||||
LabelFilter aFilter = eAllLabels);
|
||||
|
||||
virtual ~HTMLLabelIterator() { }
|
||||
|
@ -181,7 +181,9 @@ private:
|
|||
HTMLLabelIterator& operator = (const HTMLLabelIterator&);
|
||||
|
||||
RelatedAccIterator mRelIter;
|
||||
nsIContent* mElement;
|
||||
// XXX: replace it on weak reference (bug 678429), it's safe to use raw
|
||||
// pointer now because iterators life cycle is short.
|
||||
const nsAccessible* mAcc;
|
||||
LabelFilter mLabelFilter;
|
||||
};
|
||||
|
||||
|
|
|
@ -573,7 +573,7 @@ NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
|
|||
nsCOMPtr<nsIEditor> editor;
|
||||
textAccessible->GetAssociatedEditor(getter_AddRefs(editor));
|
||||
if (editor) {
|
||||
PRBool isEmpty = PR_FALSE;
|
||||
bool isEmpty = false;
|
||||
editor->GetDocumentIsEmpty(&isEmpty);
|
||||
if (isEmpty)
|
||||
return;
|
||||
|
|
|
@ -344,7 +344,7 @@ private:
|
|||
~nsCOMPtrHashKey() { }
|
||||
|
||||
KeyType GetKey() const { return mKey; }
|
||||
PRBool KeyEquals(KeyTypePointer aKey) const { return aKey == mKey; }
|
||||
bool KeyEquals(KeyTypePointer aKey) const { return aKey == mKey; }
|
||||
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey) { return aKey; }
|
||||
static PLDHashNumber HashKey(KeyTypePointer aKey)
|
||||
|
|
|
@ -316,7 +316,7 @@ nsARIAGridAccessible::GetRowDescription(PRInt32 aRow, nsAString& aDescription)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsARIAGridAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
||||
nsARIAGridAccessible::IsColumnSelected(PRInt32 aColumn, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -347,7 +347,7 @@ nsARIAGridAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsARIAGridAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
||||
nsARIAGridAccessible::IsRowSelected(PRInt32 aRow, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -373,7 +373,7 @@ nsARIAGridAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsARIAGridAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
|
||||
PRBool *aIsSelected)
|
||||
bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -458,7 +458,7 @@ nsARIAGridAccessible::GetSelectedRowCount(PRUint32* aCount)
|
|||
if (!cell)
|
||||
continue;
|
||||
|
||||
PRBool isRowSelected = PR_TRUE;
|
||||
bool isRowSelected = true;
|
||||
do {
|
||||
if (!nsAccUtils::IsARIASelected(cell)) {
|
||||
isRowSelected = PR_FALSE;
|
||||
|
@ -605,7 +605,7 @@ nsARIAGridAccessible::GetSelectedRowIndices(PRUint32 *arowCount,
|
|||
if (!cell)
|
||||
continue;
|
||||
|
||||
PRBool isRowSelected = PR_TRUE;
|
||||
bool isRowSelected = true;
|
||||
do {
|
||||
if (!nsAccUtils::IsARIASelected(cell)) {
|
||||
isRowSelected = PR_FALSE;
|
||||
|
@ -710,7 +710,7 @@ nsARIAGridAccessible::UnselectColumn(PRInt32 aColumn)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsARIAGridAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
|
||||
nsARIAGridAccessible::IsProbablyForLayout(bool *aIsProbablyForLayout)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsProbablyForLayout);
|
||||
*aIsProbablyForLayout = PR_FALSE;
|
||||
|
@ -721,7 +721,7 @@ nsARIAGridAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Protected
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsARIAGridAccessible::IsValidRow(PRInt32 aRow)
|
||||
{
|
||||
if (aRow < 0)
|
||||
|
@ -732,7 +732,7 @@ nsARIAGridAccessible::IsValidRow(PRInt32 aRow)
|
|||
return aRow < rowCount;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsARIAGridAccessible::IsValidColumn(PRInt32 aColumn)
|
||||
{
|
||||
if (aColumn < 0)
|
||||
|
@ -743,7 +743,7 @@ nsARIAGridAccessible::IsValidColumn(PRInt32 aColumn)
|
|||
return aColumn < colCount;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsARIAGridAccessible::IsValidRowNColumn(PRInt32 aRow, PRInt32 aColumn)
|
||||
{
|
||||
if (aRow < 0 || aColumn < 0)
|
||||
|
@ -788,7 +788,7 @@ nsARIAGridAccessible::GetCellInRowAt(nsAccessible *aRow, PRInt32 aColumn)
|
|||
|
||||
nsresult
|
||||
nsARIAGridAccessible::SetARIASelected(nsAccessible *aAccessible,
|
||||
PRBool aIsSelected, PRBool aNotify)
|
||||
bool aIsSelected, bool aNotify)
|
||||
{
|
||||
nsIContent *content = aAccessible->GetContent();
|
||||
NS_ENSURE_STATE(content);
|
||||
|
@ -879,7 +879,7 @@ nsARIAGridAccessible::GetSelectedColumnsArray(PRUint32 *acolumnCount,
|
|||
|
||||
PRInt32 selColCount = colCount;
|
||||
|
||||
nsTArray<PRBool> isColSelArray(selColCount);
|
||||
nsTArray<bool> isColSelArray(selColCount);
|
||||
isColSelArray.AppendElements(selColCount);
|
||||
for (PRInt32 i = 0; i < selColCount; i++)
|
||||
isColSelArray[i] = PR_TRUE;
|
||||
|
@ -1092,7 +1092,7 @@ nsARIAGridCellAccessible::GetRowHeaderCells(nsIArray **aHeaderCells)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsARIAGridCellAccessible::IsSelected(PRBool *aIsSelected)
|
||||
nsARIAGridCellAccessible::IsSelected(bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
|
|
@ -62,17 +62,17 @@ protected:
|
|||
/**
|
||||
* Return true if the given row index is valid.
|
||||
*/
|
||||
PRBool IsValidRow(PRInt32 aRow);
|
||||
bool IsValidRow(PRInt32 aRow);
|
||||
|
||||
/**
|
||||
* Retrn true if the given column index is valid.
|
||||
*/
|
||||
PRBool IsValidColumn(PRInt32 aColumn);
|
||||
bool IsValidColumn(PRInt32 aColumn);
|
||||
|
||||
/**
|
||||
* Retrun true if given row and column indexes are valid.
|
||||
*/
|
||||
PRBool IsValidRowNColumn(PRInt32 aRow, PRInt32 aColumn);
|
||||
bool IsValidRowNColumn(PRInt32 aRow, PRInt32 aColumn);
|
||||
|
||||
/**
|
||||
* Return row accessible at the given row index.
|
||||
|
@ -92,8 +92,8 @@ protected:
|
|||
* @param aNotify [in, optional] specifies if DOM should be notified
|
||||
* about attribute change (used internally).
|
||||
*/
|
||||
nsresult SetARIASelected(nsAccessible *aAccessible, PRBool aIsSelected,
|
||||
PRBool aNotify = PR_TRUE);
|
||||
nsresult SetARIASelected(nsAccessible *aAccessible, bool aIsSelected,
|
||||
bool aNotify = true);
|
||||
|
||||
/**
|
||||
* Helper method for GetSelectedColumnCount and GetSelectedColumns.
|
||||
|
|
|
@ -755,7 +755,7 @@ nsStateMapEntry::nsStateMapEntry(nsIAtom** aAttrName, eStateValueType aType,
|
|||
PRUint64 aPermanentState,
|
||||
PRUint64 aTrueState,
|
||||
PRUint64 aFalseState,
|
||||
PRBool aDefinedIfAbsent) :
|
||||
bool aDefinedIfAbsent) :
|
||||
mAttributeName(aAttrName),
|
||||
mIsToken(PR_TRUE),
|
||||
mPermanentState(aPermanentState),
|
||||
|
@ -801,7 +801,7 @@ nsStateMapEntry::nsStateMapEntry(nsIAtom** aAttrName,
|
|||
mDefaultState = aState1;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsStateMapEntry::MapToStates(nsIContent* aContent, PRUint64* aState,
|
||||
eStateMapEntryID aStateMapEntryID)
|
||||
{
|
||||
|
@ -814,7 +814,7 @@ nsStateMapEntry::MapToStates(nsIContent* aContent, PRUint64* aState,
|
|||
if (entry.mIsToken) {
|
||||
// If attribute is considered as defined when it's absent then let's act
|
||||
// attribute value is "false" supposedly.
|
||||
PRBool hasAttr = aContent->HasAttr(kNameSpaceID_None, *entry.mAttributeName);
|
||||
bool hasAttr = aContent->HasAttr(kNameSpaceID_None, *entry.mAttributeName);
|
||||
if (entry.mDefinedIfAbsent && !hasAttr) {
|
||||
if (entry.mPermanentState)
|
||||
*aState |= entry.mPermanentState;
|
||||
|
@ -851,7 +851,7 @@ nsStateMapEntry::MapToStates(nsIContent* aContent, PRUint64* aState,
|
|||
|
||||
// Apply states for matched value. If no values was matched then apply default
|
||||
// states.
|
||||
PRBool applyDefaultStates = PR_TRUE;
|
||||
bool applyDefaultStates = true;
|
||||
if (entry.mValue1) {
|
||||
if (attrValue.EqualsASCII(entry.mValue1)) {
|
||||
applyDefaultStates = PR_FALSE;
|
||||
|
|
|
@ -107,12 +107,12 @@ enum ELiveAttrRule
|
|||
/**
|
||||
* ARIA role overrides role from native markup.
|
||||
*/
|
||||
const PRBool kUseMapRole = PR_TRUE;
|
||||
const bool kUseMapRole = true;
|
||||
|
||||
/**
|
||||
* ARIA role doesn't override the role from native markup.
|
||||
*/
|
||||
const PRBool kUseNativeRole = PR_FALSE;
|
||||
const bool kUseNativeRole = false;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -203,7 +203,7 @@ public:
|
|||
PRUint64 aPermanentState,
|
||||
PRUint64 aTrueState,
|
||||
PRUint64 aFalseState = 0,
|
||||
PRBool aDefinedIfAbsent = PR_FALSE);
|
||||
bool aDefinedIfAbsent = false);
|
||||
|
||||
/**
|
||||
* Used for ARIA attributes having enumerated values.
|
||||
|
@ -230,7 +230,7 @@ public:
|
|||
* @param aStateMapEntryID [in] state map entry ID
|
||||
* @return true if state map entry ID is valid
|
||||
*/
|
||||
static PRBool MapToStates(nsIContent* aContent, PRUint64* aState,
|
||||
static bool MapToStates(nsIContent* aContent, PRUint64* aState,
|
||||
eStateMapEntryID aStateMapEntryID);
|
||||
|
||||
private:
|
||||
|
@ -238,7 +238,7 @@ private:
|
|||
nsIAtom** mAttributeName;
|
||||
|
||||
// Indicates if attribute is token (can be undefined)
|
||||
PRBool mIsToken;
|
||||
bool mIsToken;
|
||||
|
||||
// State applied always if attribute is defined
|
||||
PRUint64 mPermanentState;
|
||||
|
@ -257,7 +257,7 @@ private:
|
|||
PRUint64 mDefaultState;
|
||||
|
||||
// Permanent and false states are applied if attribute is absent
|
||||
PRBool mDefinedIfAbsent;
|
||||
bool mDefinedIfAbsent;
|
||||
};
|
||||
|
||||
|
||||
|
@ -276,7 +276,7 @@ struct nsRoleMapEntry
|
|||
PRUint32 role;
|
||||
|
||||
// Role rule: whether to use mapped role or native semantics
|
||||
PRBool roleRule;
|
||||
bool roleRule;
|
||||
|
||||
// Value mapping rule: how to compute nsIAccessible value
|
||||
EValueRule valueRule;
|
||||
|
|
|
@ -98,7 +98,7 @@ nsAccDocManager::FindAccessibleInCache(nsINode* aNode) const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccDocManager protected
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccDocManager::Init()
|
||||
{
|
||||
mDocAccessibleCache.Init(4);
|
||||
|
@ -325,7 +325,7 @@ nsAccDocManager::HandleDOMDocumentLoad(nsIDocument *aDocument,
|
|||
|
||||
void
|
||||
nsAccDocManager::AddListeners(nsIDocument *aDocument,
|
||||
PRBool aAddDOMContentLoadedListener)
|
||||
bool aAddDOMContentLoadedListener)
|
||||
{
|
||||
nsPIDOMWindow *window = aDocument->GetWindow();
|
||||
nsIDOMEventTarget *target = window->GetChromeEventHandler();
|
||||
|
@ -362,7 +362,7 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument *aDocument)
|
|||
if (!rootElm)
|
||||
return nsnull;
|
||||
|
||||
PRBool isRootDoc = nsCoreUtils::IsRootDocument(aDocument);
|
||||
bool isRootDoc = nsCoreUtils::IsRootDocument(aDocument);
|
||||
|
||||
nsDocAccessible* parentDocAcc = nsnull;
|
||||
if (!isRootDoc) {
|
||||
|
|
|
@ -97,7 +97,7 @@ protected:
|
|||
/**
|
||||
* Initialize the manager.
|
||||
*/
|
||||
PRBool Init();
|
||||
bool Init();
|
||||
|
||||
/**
|
||||
* Shutdown the manager.
|
||||
|
@ -123,7 +123,7 @@ private:
|
|||
/**
|
||||
* Add 'pagehide' and 'DOMContentLoaded' event listeners.
|
||||
*/
|
||||
void AddListeners(nsIDocument *aDocument, PRBool aAddPageShowListener);
|
||||
void AddListeners(nsIDocument *aDocument, bool aAddPageShowListener);
|
||||
|
||||
/**
|
||||
* Create document or root accessible.
|
||||
|
@ -184,7 +184,7 @@ private:
|
|||
|
||||
#define NS_LOG_ACCDOC_TYPE(aDocument) \
|
||||
if (aDocument->IsActive()) { \
|
||||
PRBool isContent = nsCoreUtils::IsContentDocument(aDocument); \
|
||||
bool isContent = nsCoreUtils::IsContentDocument(aDocument); \
|
||||
printf("%s document", (isContent ? "content" : "chrome")); \
|
||||
} else { \
|
||||
printf("document type: [failed]"); \
|
||||
|
@ -464,7 +464,7 @@ private:
|
|||
NS_LOG_ACCDOCLOAD_REQUEST(aRequest) \
|
||||
printf("\n"); \
|
||||
printf(" state flags: %x", aStateFlags); \
|
||||
PRBool isDocLoading; \
|
||||
bool isDocLoading; \
|
||||
aWebProgress->GetIsLoadingDocument(&isDocLoading); \
|
||||
printf(", document is %sloading\n", (isDocLoading ? "" : "not ")); \
|
||||
printf(" }\n"); \
|
||||
|
|
|
@ -66,7 +66,7 @@ struct WalkState
|
|||
|
||||
nsAccTreeWalker::
|
||||
nsAccTreeWalker(nsIWeakReference* aShell, nsIContent* aContent,
|
||||
PRBool aWalkAnonContent, bool aWalkCache) :
|
||||
bool aWalkAnonContent, bool aWalkCache) :
|
||||
mWeakShell(aShell), mWalkCache(aWalkCache), mState(nsnull)
|
||||
{
|
||||
NS_ASSERTION(aContent, "No node for the accessible tree walker!");
|
||||
|
@ -147,7 +147,7 @@ nsAccTreeWalker::PopState()
|
|||
mState = prevToLastState;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccTreeWalker::PushState(nsIContent* aContent)
|
||||
{
|
||||
WalkState* nextToLastState = new WalkState(aContent);
|
||||
|
|
|
@ -54,7 +54,7 @@ class nsAccTreeWalker
|
|||
{
|
||||
public:
|
||||
nsAccTreeWalker(nsIWeakReference *aShell, nsIContent *aNode,
|
||||
PRBool aWalkAnonymousContent, bool aWalkCache = false);
|
||||
bool aWalkAnonymousContent, bool aWalkCache = false);
|
||||
virtual ~nsAccTreeWalker();
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ private:
|
|||
* @note State stack is used to navigate up/down the DOM subtree during
|
||||
* accessible children search.
|
||||
*/
|
||||
PRBool PushState(nsIContent *aNode);
|
||||
bool PushState(nsIContent *aNode);
|
||||
|
||||
/**
|
||||
* Pop state from stack.
|
||||
|
|
|
@ -320,7 +320,7 @@ nsAccUtils::SetLiveContainerAttributes(nsIPersistentProperties *aAttributes,
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccUtils::HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom)
|
||||
{
|
||||
NS_ASSERTION(aContent, "aContent is null in call to HasDefinedARIAToken!");
|
||||
|
@ -400,7 +400,7 @@ nsAccUtils::GetMultiSelectableContainer(nsINode* aNode)
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccUtils::IsARIASelected(nsAccessible *aAccessible)
|
||||
{
|
||||
return aAccessible->GetContent()->
|
||||
|
@ -587,7 +587,7 @@ nsAccUtils::GetAttributeCharacteristics(nsIAtom* aAtom)
|
|||
return 0;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccUtils::GetLiveAttrValue(PRUint32 aRule, nsAString& aValue)
|
||||
{
|
||||
switch (aRule) {
|
||||
|
@ -604,10 +604,10 @@ nsAccUtils::GetLiveAttrValue(PRUint32 aRule, nsAString& aValue)
|
|||
|
||||
#ifdef DEBUG_A11Y
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccUtils::IsTextInterfaceSupportCorrect(nsAccessible *aAccessible)
|
||||
{
|
||||
PRBool foundText = PR_FALSE;
|
||||
bool foundText = false;
|
||||
|
||||
nsCOMPtr<nsIAccessibleDocument> accDoc = do_QueryObject(aAccessible);
|
||||
if (accDoc) {
|
||||
|
@ -655,7 +655,7 @@ nsAccUtils::TextLength(nsAccessible *aAccessible)
|
|||
return text.Length();
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccUtils::MustPrune(nsIAccessible *aAccessible)
|
||||
{
|
||||
PRUint32 role = nsAccUtils::Role(aAccessible);
|
||||
|
@ -693,7 +693,7 @@ nsAccUtils::GetHeaderCellsFor(nsIAccessibleTable *aTable,
|
|||
rv = aCell->GetColumnIndex(&colIdx);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool moveToLeft = aRowOrColHeaderCells == eRowHeaderCells;
|
||||
bool moveToLeft = aRowOrColHeaderCells == eRowHeaderCells;
|
||||
|
||||
// Move to the left or top to find row header cells or column header cells.
|
||||
PRInt32 index = (moveToLeft ? colIdx : rowIdx) - 1;
|
||||
|
@ -721,7 +721,7 @@ nsAccUtils::GetHeaderCellsFor(nsIAccessibleTable *aTable,
|
|||
if (origIdx == index) {
|
||||
// Append original header cells only.
|
||||
PRUint32 role = Role(cell);
|
||||
PRBool isHeader = moveToLeft ?
|
||||
bool isHeader = moveToLeft ?
|
||||
role == nsIAccessibleRole::ROLE_ROWHEADER :
|
||||
role == nsIAccessibleRole::ROLE_COLUMNHEADER;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ public:
|
|||
*
|
||||
* Return PR_TRUE if the ARIA property is defined, otherwise PR_FALSE
|
||||
*/
|
||||
static PRBool HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom);
|
||||
static bool HasDefinedARIAToken(nsIContent *aContent, nsIAtom *aAtom);
|
||||
|
||||
/**
|
||||
* Return atomic value of ARIA attribute of boolean or NMTOKEN type.
|
||||
|
@ -216,7 +216,7 @@ public:
|
|||
* Return true if the DOM node of given accessible has aria-selected="true"
|
||||
* attribute.
|
||||
*/
|
||||
static PRBool IsARIASelected(nsAccessible *aAccessible);
|
||||
static bool IsARIASelected(nsAccessible *aAccessible);
|
||||
|
||||
/**
|
||||
* Return text accessible containing focus point of the given selection.
|
||||
|
@ -313,20 +313,20 @@ public:
|
|||
*
|
||||
* @return true if object attribute should be exposed
|
||||
*/
|
||||
static PRBool GetLiveAttrValue(PRUint32 aRule, nsAString& aValue);
|
||||
static bool GetLiveAttrValue(PRUint32 aRule, nsAString& aValue);
|
||||
|
||||
#ifdef DEBUG_A11Y
|
||||
/**
|
||||
* Detect whether the given accessible object implements nsIAccessibleText,
|
||||
* when it is text or has text child node.
|
||||
*/
|
||||
static PRBool IsTextInterfaceSupportCorrect(nsAccessible *aAccessible);
|
||||
static bool IsTextInterfaceSupportCorrect(nsAccessible *aAccessible);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return true if the given accessible has text role.
|
||||
*/
|
||||
static PRBool IsText(nsIAccessible *aAcc)
|
||||
static bool IsText(nsIAccessible *aAcc)
|
||||
{
|
||||
PRUint32 role = Role(aAcc);
|
||||
return role == nsIAccessibleRole::ROLE_TEXT_LEAF ||
|
||||
|
@ -341,7 +341,7 @@ public:
|
|||
/**
|
||||
* Return true if the given accessible is embedded object.
|
||||
*/
|
||||
static PRBool IsEmbeddedObject(nsIAccessible *aAcc)
|
||||
static bool IsEmbeddedObject(nsIAccessible *aAcc)
|
||||
{
|
||||
PRUint32 role = Role(aAcc);
|
||||
return role != nsIAccessibleRole::ROLE_TEXT_LEAF &&
|
||||
|
@ -373,7 +373,7 @@ public:
|
|||
* Return true if the given accessible can't have children. Used when exposing
|
||||
* to platform accessibility APIs, should the children be pruned off?
|
||||
*/
|
||||
static PRBool MustPrune(nsIAccessible *aAccessible);
|
||||
static bool MustPrune(nsIAccessible *aAccessible);
|
||||
|
||||
/**
|
||||
* Search hint enum constants. Used by GetHeaderCellsFor() method.
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
nsIStringBundle *nsAccessNode::gStringBundle = 0;
|
||||
|
||||
PRBool nsAccessNode::gIsFormFillEnabled = PR_FALSE;
|
||||
bool nsAccessNode::gIsFormFillEnabled = false;
|
||||
|
||||
nsApplicationAccessible *nsAccessNode::gApplicationAccessible = nsnull;
|
||||
|
||||
|
@ -135,7 +135,7 @@ nsAccessNode::IsDefunct() const
|
|||
return !mContent;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessNode::Init()
|
||||
{
|
||||
return PR_TRUE;
|
||||
|
@ -205,7 +205,7 @@ void nsAccessNode::InitXPAccessibility()
|
|||
}
|
||||
|
||||
// nsAccessNode protected static
|
||||
void nsAccessNode::NotifyA11yInitOrShutdown(PRBool aIsInit)
|
||||
void nsAccessNode::NotifyA11yInitOrShutdown(bool aIsInit)
|
||||
{
|
||||
nsCOMPtr<nsIObserverService> obsService =
|
||||
mozilla::services::GetObserverService();
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
/**
|
||||
* Initialize the access node object, add it to the cache.
|
||||
*/
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
|
||||
/**
|
||||
* Shutdown the access node object.
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
/**
|
||||
* Return node type information of DOM node associated with the accessible.
|
||||
*/
|
||||
PRBool IsContent() const
|
||||
bool IsContent() const
|
||||
{
|
||||
return GetNode() && GetNode()->IsNodeOfType(nsINode::eCONTENT);
|
||||
}
|
||||
|
@ -206,12 +206,12 @@ protected:
|
|||
/**
|
||||
* Notify global nsIObserver's that a11y is getting init'd or shutdown
|
||||
*/
|
||||
static void NotifyA11yInitOrShutdown(PRBool aIsInit);
|
||||
static void NotifyA11yInitOrShutdown(bool aIsInit);
|
||||
|
||||
// Static data, we do our own refcounting for our static data
|
||||
static nsIStringBundle *gStringBundle;
|
||||
|
||||
static PRBool gIsFormFillEnabled;
|
||||
static bool gIsFormFillEnabled;
|
||||
|
||||
private:
|
||||
static nsApplicationAccessible *gApplicationAccessible;
|
||||
|
|
|
@ -117,7 +117,7 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsAccessibilityService *nsAccessibilityService::gAccessibilityService = nsnull;
|
||||
PRBool nsAccessibilityService::gIsShutdown = PR_TRUE;
|
||||
bool nsAccessibilityService::gIsShutdown = true;
|
||||
|
||||
nsAccessibilityService::nsAccessibilityService() :
|
||||
nsAccDocManager(), FocusManager()
|
||||
|
@ -178,7 +178,7 @@ nsAccessibilityService::FireAccessibleEvent(PRUint32 aEvent,
|
|||
|
||||
nsAccessible*
|
||||
nsAccessibilityService::GetRootDocumentAccessible(nsIPresShell* aPresShell,
|
||||
PRBool aCanCreate)
|
||||
bool aCanCreate)
|
||||
{
|
||||
nsIDocument* documentNode = aPresShell->GetDocument();
|
||||
if (documentNode) {
|
||||
|
@ -876,7 +876,7 @@ nsAccessibilityService::GetAccessibleOrContainer(nsINode* aNode,
|
|||
return document ? document->GetAccessibleOrContainer(aNode) : nsnull;
|
||||
}
|
||||
|
||||
static PRBool HasRelatedContent(nsIContent *aContent)
|
||||
static bool HasRelatedContent(nsIContent *aContent)
|
||||
{
|
||||
nsAutoString id;
|
||||
if (!aContent || !nsCoreUtils::GetID(aContent, id) || id.IsEmpty()) {
|
||||
|
@ -995,7 +995,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
PRBool isHTML = content->IsHTML();
|
||||
bool isHTML = content->IsHTML();
|
||||
if (isHTML && content->Tag() == nsGkAtoms::map) {
|
||||
// Create hyper text accessible for HTML map if it is used to group links
|
||||
// (see http://www.w3.org/TR/WCAG10-HTML-TECHS/#group-bypass). If the HTML
|
||||
|
@ -1031,11 +1031,11 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
}
|
||||
|
||||
if (weakFrame.IsAlive() && !newAcc && isHTML) { // HTML accessibles
|
||||
PRBool tryTagNameOrFrame = PR_TRUE;
|
||||
bool tryTagNameOrFrame = true;
|
||||
|
||||
nsIAtom *frameType = weakFrame.GetFrame()->GetType();
|
||||
|
||||
PRBool partOfHTMLTable =
|
||||
bool partOfHTMLTable =
|
||||
frameType == nsGkAtoms::tableCaptionFrame ||
|
||||
frameType == nsGkAtoms::tableCellFrame ||
|
||||
frameType == nsGkAtoms::tableRowGroupFrame ||
|
||||
|
@ -1209,7 +1209,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessibilityService private
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessibilityService::Init()
|
||||
{
|
||||
// Initialize accessible document manager.
|
||||
|
@ -1255,7 +1255,7 @@ nsAccessibilityService::Shutdown()
|
|||
nsAccessNodeWrap::ShutdownAccessibility();
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessibilityService::HasUniversalAriaProperty(nsIContent *aContent)
|
||||
{
|
||||
// ARIA attributes that take token values (NMTOKEN, bool) are special cased
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
virtual nsAccessible* GetAccessibleInShell(nsINode* aNode,
|
||||
nsIPresShell* aPresShell);
|
||||
virtual nsAccessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
|
||||
PRBool aCanCreate);
|
||||
bool aCanCreate);
|
||||
|
||||
virtual already_AddRefed<nsAccessible>
|
||||
CreateHTMLBRAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
|
||||
|
@ -160,7 +160,7 @@ public:
|
|||
/**
|
||||
* Return true if accessibility service has been shutdown.
|
||||
*/
|
||||
static PRBool IsShutdown() { return gIsShutdown; }
|
||||
static bool IsShutdown() { return gIsShutdown; }
|
||||
|
||||
/**
|
||||
* Return an accessible for the given DOM node from the cache or create new
|
||||
|
@ -222,7 +222,7 @@ private:
|
|||
/**
|
||||
* Initialize accessibility service.
|
||||
*/
|
||||
PRBool Init();
|
||||
bool Init();
|
||||
|
||||
/**
|
||||
* Shutdowns accessibility service.
|
||||
|
@ -278,7 +278,7 @@ private:
|
|||
/**
|
||||
* Indicates whether accessibility service was shutdown.
|
||||
*/
|
||||
static PRBool gIsShutdown;
|
||||
static bool gIsShutdown;
|
||||
|
||||
/**
|
||||
* Does this content node have a universal ARIA property set on it?
|
||||
|
@ -287,7 +287,7 @@ private:
|
|||
* @param aContent The content node to test
|
||||
* @return PR_TRUE if there is a universal ARIA property set on the node
|
||||
*/
|
||||
PRBool HasUniversalAriaProperty(nsIContent *aContent);
|
||||
bool HasUniversalAriaProperty(nsIContent *aContent);
|
||||
|
||||
friend nsAccessibilityService* GetAccService();
|
||||
friend mozilla::a11y::FocusManager* mozilla::a11y::FocusMgr();
|
||||
|
|
|
@ -307,7 +307,7 @@ nsAccessible::Description(nsString& aDescription)
|
|||
aDescription);
|
||||
|
||||
if (aDescription.IsEmpty()) {
|
||||
PRBool isXUL = mContent->IsXUL();
|
||||
bool isXUL = mContent->IsXUL();
|
||||
if (isXUL) {
|
||||
// Try XUL <description control="[id]">description text</description>
|
||||
XULDescriptionIterator iter(GetDocAccessible(), mContent);
|
||||
|
@ -356,7 +356,7 @@ nsAccessible::AccessKey() const
|
|||
if (mContent->IsHTML()) {
|
||||
// Unless it is labeled via an ancestor <label>, in which case that would
|
||||
// be redundant.
|
||||
HTMLLabelIterator iter(GetDocAccessible(), mContent,
|
||||
HTMLLabelIterator iter(GetDocAccessible(), this,
|
||||
HTMLLabelIterator::eSkipAncestorLabel);
|
||||
label = iter.Next();
|
||||
|
||||
|
@ -549,7 +549,7 @@ nsAccessible::GetChildren(nsIArray **aOutChildren)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
return PR_TRUE;
|
||||
|
@ -590,8 +590,8 @@ nsresult nsAccessible::GetTranslatedString(const nsAString& aKey, nsAString& aSt
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsAccessible::IsVisible(PRBool* aIsOffscreen)
|
||||
bool
|
||||
nsAccessible::IsVisible(bool* aIsOffscreen)
|
||||
{
|
||||
// We need to know if at least a kMinPixels around the object is visible,
|
||||
// otherwise it will be marked states::OFFSCREEN. The states::INVISIBLE flag
|
||||
|
@ -627,7 +627,7 @@ nsAccessible::IsVisible(PRBool* aIsOffscreen)
|
|||
nsPresContext::CSSPixelsToAppUnits(kMinPixels));
|
||||
|
||||
if (frame->GetRect().IsEmpty()) {
|
||||
PRBool isEmpty = PR_TRUE;
|
||||
bool isEmpty = true;
|
||||
|
||||
nsIAtom *frameType = frame->GetType();
|
||||
if (frameType == nsGkAtoms::textFrame) {
|
||||
|
@ -670,7 +670,7 @@ nsAccessible::NativeState()
|
|||
if (!document || !document->IsInDocument(this))
|
||||
state |= states::STALE;
|
||||
|
||||
PRBool disabled = PR_FALSE;
|
||||
bool disabled = false;
|
||||
if (mContent->IsElement()) {
|
||||
nsEventStates elementState = mContent->AsElement()->State();
|
||||
|
||||
|
@ -703,7 +703,7 @@ nsAccessible::NativeState()
|
|||
|
||||
// Check if states::INVISIBLE and
|
||||
// states::OFFSCREEN flags should be turned on for this object.
|
||||
PRBool isOffscreen;
|
||||
bool isOffscreen;
|
||||
if (!IsVisible(&isOffscreen)) {
|
||||
state |= states::INVISIBLE;
|
||||
}
|
||||
|
@ -1019,7 +1019,7 @@ nsIFrame* nsAccessible::GetBoundsFrame()
|
|||
}
|
||||
|
||||
/* void removeSelection (); */
|
||||
NS_IMETHODIMP nsAccessible::SetSelected(PRBool aSelect)
|
||||
NS_IMETHODIMP nsAccessible::SetSelected(bool aSelect)
|
||||
{
|
||||
// Add or remove selection
|
||||
if (IsDefunct())
|
||||
|
@ -1120,7 +1120,7 @@ nsAccessible::GetHTMLName(nsAString& aLabel)
|
|||
nsAutoString label;
|
||||
|
||||
nsAccessible* labelAcc = nsnull;
|
||||
HTMLLabelIterator iter(GetDocAccessible(), mContent);
|
||||
HTMLLabelIterator iter(GetDocAccessible(), this);
|
||||
while ((labelAcc = iter.Next())) {
|
||||
nsresult rv = nsTextEquivUtils::
|
||||
AppendTextEquivFromContent(this, labelAcc->GetContent(), &label);
|
||||
|
@ -1235,7 +1235,7 @@ nsAccessible::HandleAccEvent(AccEvent* aEvent)
|
|||
|
||||
NS_ENSURE_STATE(observers);
|
||||
|
||||
PRBool hasObservers = PR_FALSE;
|
||||
bool hasObservers = false;
|
||||
observers->HasMoreElements(&hasObservers);
|
||||
if (hasObservers) {
|
||||
nsRefPtr<nsAccEvent> evnt(aEvent->CreateXPCOMObject());
|
||||
|
@ -1426,7 +1426,7 @@ nsAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
|
|||
// Expose draggable object attribute?
|
||||
nsCOMPtr<nsIDOMNSHTMLElement> htmlElement = do_QueryInterface(mContent);
|
||||
if (htmlElement) {
|
||||
PRBool draggable = PR_FALSE;
|
||||
bool draggable = false;
|
||||
htmlElement->GetDraggable(&draggable);
|
||||
if (draggable) {
|
||||
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::draggable,
|
||||
|
@ -2008,7 +2008,7 @@ nsAccessible::RelationByType(PRUint32 aType)
|
|||
Relation rel(new IDRefsIterator(mContent,
|
||||
nsGkAtoms::aria_labelledby));
|
||||
if (mContent->IsHTML()) {
|
||||
rel.AppendIter(new HTMLLabelIterator(GetDocAccessible(), mContent));
|
||||
rel.AppendIter(new HTMLLabelIterator(GetDocAccessible(), this));
|
||||
} else if (mContent->IsXUL()) {
|
||||
rel.AppendIter(new XULLabelIterator(GetDocAccessible(), mContent));
|
||||
}
|
||||
|
@ -2219,7 +2219,7 @@ nsAccessible::DispatchClickEvent(nsIContent *aContent, PRUint32 aActionIndex)
|
|||
nsIPresShell::SCROLL_OVERFLOW_HIDDEN);
|
||||
|
||||
// Fire mouse down and mouse up events.
|
||||
PRBool res = nsCoreUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, presShell,
|
||||
bool res = nsCoreUtils::DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, presShell,
|
||||
aContent);
|
||||
if (!res)
|
||||
return;
|
||||
|
@ -2299,7 +2299,7 @@ NS_IMETHODIMP nsAccessible::RemoveChildFromSelection(PRInt32 aIndex)
|
|||
NS_OK : NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAccessible::IsChildSelected(PRInt32 aIndex, PRBool *aIsSelected)
|
||||
NS_IMETHODIMP nsAccessible::IsChildSelected(PRInt32 aIndex, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -2324,7 +2324,7 @@ nsAccessible::ClearSelection()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::SelectAllSelection(PRBool* aIsMultiSelect)
|
||||
nsAccessible::SelectAllSelection(bool* aIsMultiSelect)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsMultiSelect);
|
||||
*aIsMultiSelect = PR_FALSE;
|
||||
|
@ -2417,7 +2417,7 @@ nsAccessible::GetAnchor(PRInt32 aIndex, nsIAccessible** aAccessible)
|
|||
|
||||
// readonly attribute boolean nsIAccessibleHyperLink::valid
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetValid(PRBool *aValid)
|
||||
nsAccessible::GetValid(bool *aValid)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aValid);
|
||||
*aValid = PR_FALSE;
|
||||
|
@ -2431,7 +2431,7 @@ nsAccessible::GetValid(PRBool *aValid)
|
|||
|
||||
// readonly attribute boolean nsIAccessibleHyperLink::selected
|
||||
NS_IMETHODIMP
|
||||
nsAccessible::GetSelected(PRBool *aSelected)
|
||||
nsAccessible::GetSelected(bool *aSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aSelected);
|
||||
*aSelected = PR_FALSE;
|
||||
|
@ -2565,7 +2565,7 @@ nsAccessible::InvalidateChildren()
|
|||
SetChildrenFlag(eChildrenUninitialized);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessible::AppendChild(nsAccessible* aChild)
|
||||
{
|
||||
if (!aChild)
|
||||
|
@ -2581,7 +2581,7 @@ nsAccessible::AppendChild(nsAccessible* aChild)
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessible::InsertChildAt(PRUint32 aIndex, nsAccessible* aChild)
|
||||
{
|
||||
if (!aChild)
|
||||
|
@ -2604,7 +2604,7 @@ nsAccessible::InsertChildAt(PRUint32 aIndex, nsAccessible* aChild)
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessible::RemoveChild(nsAccessible* aChild)
|
||||
{
|
||||
if (!aChild)
|
||||
|
@ -3127,7 +3127,7 @@ nsAccessible::GetActionRule(PRUint64 aStates)
|
|||
return eClickAction;
|
||||
|
||||
// Has registered 'click' event handler.
|
||||
PRBool isOnclick = nsCoreUtils::HasClickListener(mContent);
|
||||
bool isOnclick = nsCoreUtils::HasClickListener(mContent);
|
||||
|
||||
if (isOnclick)
|
||||
return eClickAction;
|
||||
|
|
|
@ -280,9 +280,9 @@ public:
|
|||
/**
|
||||
* Append/insert/remove a child. Return true if operation was successful.
|
||||
*/
|
||||
virtual PRBool AppendChild(nsAccessible* aChild);
|
||||
virtual PRBool InsertChildAt(PRUint32 aIndex, nsAccessible* aChild);
|
||||
virtual PRBool RemoveChild(nsAccessible* aChild);
|
||||
virtual bool AppendChild(nsAccessible* aChild);
|
||||
virtual bool InsertChildAt(PRUint32 aIndex, nsAccessible* aChild);
|
||||
virtual bool RemoveChild(nsAccessible* aChild);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible tree traverse methods
|
||||
|
@ -315,7 +315,7 @@ public:
|
|||
/**
|
||||
* Return true if accessible has children;
|
||||
*/
|
||||
PRBool HasChildren() { return !!GetChildAt(0); }
|
||||
bool HasChildren() { return !!GetChildAt(0); }
|
||||
|
||||
/**
|
||||
* Return first/last/next/previous sibling of the accessible.
|
||||
|
@ -380,7 +380,7 @@ public:
|
|||
/**
|
||||
* Return true if there are accessible children in anonymous content
|
||||
*/
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
/**
|
||||
* Returns text of accessible if accessible has text role otherwise empty
|
||||
|
@ -657,7 +657,7 @@ protected:
|
|||
|
||||
virtual nsIFrame* GetBoundsFrame();
|
||||
virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame);
|
||||
PRBool IsVisible(PRBool *aIsOffscreen);
|
||||
bool IsVisible(bool *aIsOffscreen);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Name helpers
|
||||
|
|
|
@ -203,7 +203,7 @@ nsApplicationAccessible::GetBounds(PRInt32 *aX, PRInt32 *aY,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsApplicationAccessible::SetSelected(PRBool aIsSelected)
|
||||
nsApplicationAccessible::SetSelected(bool aIsSelected)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ nsApplicationAccessible::IsDefunct() const
|
|||
return nsAccessibilityService::IsShutdown();
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsApplicationAccessible::Init()
|
||||
{
|
||||
mAppInfo = do_GetService("@mozilla.org/xre/app-info;1");
|
||||
|
@ -391,7 +391,7 @@ nsApplicationAccessible::CacheChildren()
|
|||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
PRBool hasMore = PR_FALSE;
|
||||
bool hasMore = false;
|
||||
windowEnumerator->HasMoreElements(&hasMore);
|
||||
while (hasMore) {
|
||||
nsCOMPtr<nsISupports> window;
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
PRInt32 *aPositionInGroup);
|
||||
NS_IMETHOD GetBounds(PRInt32 *aX, PRInt32 *aY,
|
||||
PRInt32 *aWidth, PRInt32 *aHeight);
|
||||
NS_IMETHOD SetSelected(PRBool aIsSelected);
|
||||
NS_IMETHOD SetSelected(bool aIsSelected);
|
||||
NS_IMETHOD TakeSelection();
|
||||
NS_IMETHOD TakeFocus();
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString &aName);
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
|
||||
// nsAccessNode
|
||||
virtual bool IsDefunct() const;
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
virtual void Shutdown();
|
||||
virtual bool IsPrimaryForNode() const;
|
||||
|
||||
|
|
|
@ -113,8 +113,8 @@ protected:
|
|||
* Parent accessible that provides an action for this linkable accessible.
|
||||
*/
|
||||
nsAccessible* mActionAcc;
|
||||
PRPackedBool mIsLink;
|
||||
PRPackedBool mIsOnclick;
|
||||
bool mIsLink;
|
||||
bool mIsOnclick;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -339,7 +339,7 @@ nsCaretAccessible::GetCaretRect(nsIWidget **aOutWidget)
|
|||
nsCOMPtr<nsISelection> caretSelection(do_QueryReferent(mLastUsedSelection));
|
||||
NS_ENSURE_TRUE(caretSelection, caretRect);
|
||||
|
||||
PRBool isVisible;
|
||||
bool isVisible;
|
||||
caret->GetCaretVisible(&isVisible);
|
||||
if (!isVisible) {
|
||||
return nsIntRect(); // Return empty rect
|
||||
|
|
|
@ -74,7 +74,7 @@ static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
|||
// nsCoreUtils
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::HasClickListener(nsIContent *aContent)
|
||||
{
|
||||
NS_ENSURE_TRUE(aContent, PR_FALSE);
|
||||
|
@ -150,7 +150,7 @@ nsCoreUtils::DispatchClickEvent(nsITreeBoxObject *aTreeBoxObj,
|
|||
tcContent, tcFrame, presShell, rootWidget);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::DispatchMouseEvent(PRUint32 aEventType,
|
||||
nsIPresShell *aPresShell,
|
||||
nsIContent *aContent)
|
||||
|
@ -280,7 +280,7 @@ nsCoreUtils::GetRoleContent(nsINode *aNode)
|
|||
return content;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsAncestorOf(nsINode *aPossibleAncestorNode,
|
||||
nsINode *aPossibleDescendantNode,
|
||||
nsINode *aRootNode)
|
||||
|
@ -451,7 +451,7 @@ nsCoreUtils::GetDocShellTreeItemFor(nsINode *aNode)
|
|||
return docShellTreeItem;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsRootDocument(nsIDocument *aDocument)
|
||||
{
|
||||
nsCOMPtr<nsISupports> container = aDocument->GetContainer();
|
||||
|
@ -465,7 +465,7 @@ nsCoreUtils::IsRootDocument(nsIDocument *aDocument)
|
|||
return !parentTreeItem;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsContentDocument(nsIDocument *aDocument)
|
||||
{
|
||||
nsCOMPtr<nsISupports> container = aDocument->GetContainer();
|
||||
|
@ -498,11 +498,11 @@ nsCoreUtils::IsTabDocument(nsIDocument* aDocumentNode)
|
|||
return parentTreeItem == rootTreeItem;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsErrorPage(nsIDocument *aDocument)
|
||||
{
|
||||
nsIURI *uri = aDocument->GetDocumentURI();
|
||||
PRBool isAboutScheme = PR_FALSE;
|
||||
bool isAboutScheme = false;
|
||||
uri->SchemeIs("about", &isAboutScheme);
|
||||
if (!isAboutScheme)
|
||||
return PR_FALSE;
|
||||
|
@ -516,7 +516,7 @@ nsCoreUtils::IsErrorPage(nsIDocument *aDocument)
|
|||
return StringBeginsWith(path, neterror) || StringBeginsWith(path, certerror);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsCorrectFrameType(nsIFrame *aFrame, nsIAtom *aAtom)
|
||||
{
|
||||
NS_ASSERTION(aFrame != nsnull,
|
||||
|
@ -547,14 +547,14 @@ nsCoreUtils::GetDOMNodeForContainer(nsIDocShellTreeItem *aContainer)
|
|||
return node;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::GetID(nsIContent *aContent, nsAString& aID)
|
||||
{
|
||||
nsIAtom *idAttribute = aContent->GetIDAttributeName();
|
||||
return idAttribute ? aContent->GetAttr(kNameSpaceID_None, idAttribute, aID) : PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr, PRInt32 *aUInt)
|
||||
{
|
||||
nsAutoString value;
|
||||
|
@ -571,7 +571,7 @@ nsCoreUtils::GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr, PRInt32 *aUInt)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsXLink(nsIContent *aContent)
|
||||
{
|
||||
if (!aContent)
|
||||
|
@ -759,7 +759,7 @@ nsCoreUtils::GetPreviousSensibleColumn(nsITreeColumn *aColumn)
|
|||
return prevColumn.forget();
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCoreUtils::IsColumnHidden(nsITreeColumn *aColumn)
|
||||
{
|
||||
nsCOMPtr<nsIDOMElement> element;
|
||||
|
@ -820,7 +820,7 @@ nsAccessibleDOMStringList::GetLength(PRUint32 *aLength)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessibleDOMStringList::Contains(const nsAString& aString, PRBool *aResult)
|
||||
nsAccessibleDOMStringList::Contains(const nsAString& aString, bool *aResult)
|
||||
{
|
||||
*aResult = mNames.Contains(aString);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
* Return true if the given node has registered click, mousedown or mouseup
|
||||
* event listeners.
|
||||
*/
|
||||
static PRBool HasClickListener(nsIContent *aContent);
|
||||
static bool HasClickListener(nsIContent *aContent);
|
||||
|
||||
/**
|
||||
* Dispatch click event to XUL tree cell.
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
* @param aPresShell [in] the presshell for the given element
|
||||
* @param aContent [in] the element
|
||||
*/
|
||||
static PRBool DispatchMouseEvent(PRUint32 aEventType,
|
||||
static bool DispatchMouseEvent(PRUint32 aEventType,
|
||||
nsIPresShell *aPresShell,
|
||||
nsIContent *aContent);
|
||||
|
||||
|
@ -153,7 +153,7 @@ public:
|
|||
* @return PR_TRUE if aPossibleAncestorNode is an ancestor of
|
||||
* aPossibleDescendantNode
|
||||
*/
|
||||
static PRBool IsAncestorOf(nsINode *aPossibleAncestorNode,
|
||||
static bool IsAncestorOf(nsINode *aPossibleAncestorNode,
|
||||
nsINode *aPossibleDescendantNode,
|
||||
nsINode *aRootNode = nsnull);
|
||||
|
||||
|
@ -224,12 +224,12 @@ public:
|
|||
/**
|
||||
* Return true if the given document is root document.
|
||||
*/
|
||||
static PRBool IsRootDocument(nsIDocument *aDocument);
|
||||
static bool IsRootDocument(nsIDocument *aDocument);
|
||||
|
||||
/**
|
||||
* Return true if the given document is content document (not chrome).
|
||||
*/
|
||||
static PRBool IsContentDocument(nsIDocument *aDocument);
|
||||
static bool IsContentDocument(nsIDocument *aDocument);
|
||||
|
||||
/**
|
||||
* Return true if the given document node is for tab document accessible.
|
||||
|
@ -239,7 +239,7 @@ public:
|
|||
/**
|
||||
* Return true if the given document is an error page.
|
||||
*/
|
||||
static PRBool IsErrorPage(nsIDocument *aDocument);
|
||||
static bool IsErrorPage(nsIDocument *aDocument);
|
||||
|
||||
/**
|
||||
* Retrun true if the type of given frame equals to the given frame type.
|
||||
|
@ -247,7 +247,7 @@ public:
|
|||
* @param aFrame the frame
|
||||
* @param aAtom the frame type
|
||||
*/
|
||||
static PRBool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
|
||||
static bool IsCorrectFrameType(nsIFrame* aFrame, nsIAtom* aAtom);
|
||||
|
||||
/**
|
||||
* Return presShell for the document containing the given DOM node.
|
||||
|
@ -276,13 +276,13 @@ public:
|
|||
* @param aID Where to put ID string
|
||||
* @return PR_TRUE if there is an ID set for this node
|
||||
*/
|
||||
static PRBool GetID(nsIContent *aContent, nsAString& aID);
|
||||
static bool GetID(nsIContent *aContent, nsAString& aID);
|
||||
|
||||
/**
|
||||
* Convert attribute value of the given node to positive integer. If no
|
||||
* attribute or wrong value then false is returned.
|
||||
*/
|
||||
static PRBool GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr,
|
||||
static bool GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr,
|
||||
PRInt32 *aUInt);
|
||||
|
||||
/**
|
||||
|
@ -291,7 +291,7 @@ public:
|
|||
* @param aContent the given element
|
||||
* @return PR_TRUE if the given element is XLink
|
||||
*/
|
||||
static PRBool IsXLink(nsIContent *aContent);
|
||||
static bool IsXLink(nsIContent *aContent);
|
||||
|
||||
/**
|
||||
* Returns language for the given node.
|
||||
|
@ -360,12 +360,12 @@ public:
|
|||
/**
|
||||
* Return true if the given column is hidden (i.e. not sensible).
|
||||
*/
|
||||
static PRBool IsColumnHidden(nsITreeColumn *aColumn);
|
||||
static bool IsColumnHidden(nsITreeColumn *aColumn);
|
||||
|
||||
/**
|
||||
* Return true if the given node is table header element.
|
||||
*/
|
||||
static PRBool IsHTMLTableHeader(nsIContent *aContent)
|
||||
static bool IsHTMLTableHeader(nsIContent *aContent)
|
||||
{
|
||||
return aContent->NodeInfo()->Equals(nsGkAtoms::th) ||
|
||||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::scope);
|
||||
|
@ -391,7 +391,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMDOMSTRINGLIST
|
||||
|
||||
PRBool Add(const nsAString& aName) {
|
||||
bool Add(const nsAString& aName) {
|
||||
return mNames.AppendElement(aName) != nsnull;
|
||||
}
|
||||
|
||||
|
|
|
@ -539,7 +539,7 @@ NS_IMETHODIMP nsDocAccessible::GetAssociatedEditor(nsIEditor **aEditor)
|
|||
if (!editor) {
|
||||
return NS_OK;
|
||||
}
|
||||
PRBool isEditable;
|
||||
bool isEditable;
|
||||
editor->GetIsDocumentEditable(&isEditable);
|
||||
if (isEditable) {
|
||||
NS_ADDREF(*aEditor = editor);
|
||||
|
@ -578,7 +578,7 @@ nsDocAccessible::GetAccessible(nsINode* aNode) const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsDocAccessible::Init()
|
||||
{
|
||||
NS_LOG_ACCDOCCREATE_FOR("document initialize", mDocument, this)
|
||||
|
@ -723,7 +723,7 @@ nsresult nsDocAccessible::AddEventListeners()
|
|||
PRInt32 itemType;
|
||||
docShellTreeItem->GetItemType(&itemType);
|
||||
|
||||
PRBool isContent = (itemType == nsIDocShellTreeItem::typeContent);
|
||||
bool isContent = (itemType == nsIDocShellTreeItem::typeContent);
|
||||
|
||||
if (isContent) {
|
||||
// We're not an editor yet, but we might become one
|
||||
|
@ -1034,7 +1034,7 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
|
|||
}
|
||||
|
||||
if (aAttribute == nsGkAtoms::aria_busy) {
|
||||
PRBool isOn = aContent->AttrValueIs(aNameSpaceID, aAttribute,
|
||||
bool isOn = aContent->AttrValueIs(aNameSpaceID, aAttribute,
|
||||
nsGkAtoms::_true, eCaseMatters);
|
||||
nsRefPtr<AccEvent> event = new AccStateChangeEvent(aContent, states::BUSY, isOn);
|
||||
FireDelayedAccessibleEvent(event);
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
NS_DECL_NSIDOCUMENTOBSERVER
|
||||
|
||||
// nsAccessNode
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
virtual void Shutdown();
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
virtual bool IsDefunct() const;
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
/**
|
||||
* Return true if associated DOM document was loaded and isn't unloading.
|
||||
*/
|
||||
PRBool IsContentLoaded() const
|
||||
bool IsContentLoaded() const
|
||||
{
|
||||
// eDOMLoaded flag check is used for error pages as workaround to make this
|
||||
// method return correct result since error pages do not receive 'pageshow'
|
||||
|
@ -305,7 +305,7 @@ public:
|
|||
* XBL bindings. Be careful the result of this method may be senseless
|
||||
* while it's called for XUL elements (where XBL is used widely).
|
||||
*/
|
||||
PRBool IsDependentID(const nsAString& aID) const
|
||||
bool IsDependentID(const nsAString& aID) const
|
||||
{ return mDependentIDsHash.Get(aID, nsnull); }
|
||||
|
||||
/**
|
||||
|
|
|
@ -92,5 +92,5 @@ nsEventShell::GetEventAttributes(nsINode *aNode,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsEventShell: private
|
||||
|
||||
PRBool nsEventShell::sEventFromUserInput = PR_FALSE;
|
||||
bool nsEventShell::sEventFromUserInput = false;
|
||||
nsCOMPtr<nsINode> nsEventShell::sEventTargetNode;
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
|
||||
private:
|
||||
static nsCOMPtr<nsINode> sEventTargetNode;
|
||||
static PRBool sEventFromUserInput;
|
||||
static bool sEventFromUserInput;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -75,6 +75,16 @@ ProgressMeterAccessible<Max>::NativeRole()
|
|||
return nsIAccessibleRole::ROLE_PROGRESSBAR;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ProgressMeterAccessible<Max>: Widgets
|
||||
|
||||
template<int Max>
|
||||
bool
|
||||
ProgressMeterAccessible<Max>::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIAccessibleValue
|
||||
|
||||
|
@ -222,3 +232,11 @@ nsRadioButtonAccessible::NativeRole()
|
|||
return nsIAccessibleRole::ROLE_RADIOBUTTON;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsRadioButtonAccessible: Widgets
|
||||
|
||||
bool
|
||||
nsRadioButtonAccessible::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,9 @@ public:
|
|||
|
||||
// nsAccessible
|
||||
virtual PRUint32 NativeRole();
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -85,6 +88,9 @@ public:
|
|||
virtual PRUint8 ActionCount();
|
||||
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ nsOuterDocAccessible::InvalidateChildren()
|
|||
SetChildrenFlag(eChildrenUninitialized);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsOuterDocAccessible::AppendChild(nsAccessible *aAccessible)
|
||||
{
|
||||
// We keep showing the old document for a bit after creating the new one,
|
||||
|
@ -197,7 +197,7 @@ nsOuterDocAccessible::AppendChild(nsAccessible *aAccessible)
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsOuterDocAccessible::RemoveChild(nsAccessible *aAccessible)
|
||||
{
|
||||
nsAccessible *child = mChildren.SafeElementAt(0, nsnull);
|
||||
|
@ -210,7 +210,7 @@ nsOuterDocAccessible::RemoveChild(nsAccessible *aAccessible)
|
|||
child->GetDocumentNode(), child)
|
||||
NS_LOG_ACCDOCDESTROY_ACCADDRESS("outerdoc", this)
|
||||
|
||||
PRBool wasRemoved = nsAccessible::RemoveChild(child);
|
||||
bool wasRemoved = nsAccessible::RemoveChild(child);
|
||||
|
||||
NS_ASSERTION(!mChildren.Length(),
|
||||
"This child document of outerdoc accessible wasn't removed!");
|
||||
|
|
|
@ -72,8 +72,8 @@ public:
|
|||
EWhichChildAtPoint aWhichChild);
|
||||
|
||||
virtual void InvalidateChildren();
|
||||
virtual PRBool AppendChild(nsAccessible *aAccessible);
|
||||
virtual PRBool RemoveChild(nsAccessible *aAccessible);
|
||||
virtual bool AppendChild(nsAccessible *aAccessible);
|
||||
virtual bool RemoveChild(nsAccessible *aAccessible);
|
||||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
|
|
@ -393,7 +393,7 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||
origTargetNode->AsElement() : nsnull;
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
PRBool isTree = targetContent ?
|
||||
bool isTree = targetContent ?
|
||||
targetContent->NodeInfo()->Equals(nsGkAtoms::tree, kNameSpaceID_XUL) :
|
||||
PR_FALSE;
|
||||
|
||||
|
@ -428,7 +428,7 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||
// and panebutton is exposed as XULListitem in A11y.
|
||||
// nsXULListitemAccessible::GetStateInternal uses STATE_SELECTED in this case,
|
||||
// so we need to check states::SELECTED also.
|
||||
PRBool isEnabled = (state & (states::CHECKED | states::SELECTED)) != 0;
|
||||
bool isEnabled = (state & (states::CHECKED | states::SELECTED)) != 0;
|
||||
|
||||
nsRefPtr<AccEvent> accEvent =
|
||||
new AccStateChangeEvent(accessible, states::CHECKED, isEnabled);
|
||||
|
@ -445,7 +445,7 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||
if (eventType.EqualsLiteral("CheckboxStateChange")) {
|
||||
PRUint64 state = accessible->State();
|
||||
|
||||
PRBool isEnabled = !!(state & states::CHECKED);
|
||||
bool isEnabled = !!(state & states::CHECKED);
|
||||
|
||||
nsRefPtr<AccEvent> accEvent =
|
||||
new AccStateChangeEvent(accessible, states::CHECKED, isEnabled);
|
||||
|
@ -467,7 +467,7 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||
#ifdef MOZ_XUL
|
||||
if (treeItemAccessible && eventType.EqualsLiteral("OpenStateChange")) {
|
||||
PRUint64 state = accessible->State();
|
||||
PRBool isEnabled = (state & states::EXPANDED) != 0;
|
||||
bool isEnabled = (state & states::EXPANDED) != 0;
|
||||
|
||||
nsRefPtr<AccEvent> accEvent =
|
||||
new AccStateChangeEvent(accessible, states::EXPANDED, isEnabled);
|
||||
|
|
|
@ -82,7 +82,7 @@ static nsCSSTextAttrMapItem gCSSTextAttrsMap[] =
|
|||
// nsTextAttrs
|
||||
|
||||
nsTextAttrsMgr::nsTextAttrsMgr(nsHyperTextAccessible *aHyperTextAcc,
|
||||
PRBool aIncludeDefAttrs,
|
||||
bool aIncludeDefAttrs,
|
||||
nsAccessible *aOffsetAcc,
|
||||
PRInt32 aOffsetAccIdx) :
|
||||
mHyperTextAcc(aHyperTextAcc), mIncludeDefAttrs(aIncludeDefAttrs),
|
||||
|
@ -230,7 +230,7 @@ nsTextAttrsMgr::GetRange(const nsTArray<nsITextAttr*>& aTextAttrArray,
|
|||
nsIContent *currElm = nsCoreUtils::GetDOMElementFor(currAcc->GetContent());
|
||||
NS_ENSURE_STATE(currElm);
|
||||
|
||||
PRBool offsetFound = PR_FALSE;
|
||||
bool offsetFound = false;
|
||||
for (PRUint32 attrIdx = 0; attrIdx < attrLen; attrIdx++) {
|
||||
nsITextAttr *textAttr = aTextAttrArray[attrIdx];
|
||||
if (!textAttr->Equal(currElm)) {
|
||||
|
@ -255,7 +255,7 @@ nsTextAttrsMgr::GetRange(const nsTArray<nsITextAttr*>& aTextAttrArray,
|
|||
nsIContent *currElm = nsCoreUtils::GetDOMElementFor(currAcc->GetContent());
|
||||
NS_ENSURE_STATE(currElm);
|
||||
|
||||
PRBool offsetFound = PR_FALSE;
|
||||
bool offsetFound = false;
|
||||
for (PRUint32 attrIdx = 0; attrIdx < attrLen; attrIdx++) {
|
||||
nsITextAttr *textAttr = aTextAttrArray[attrIdx];
|
||||
|
||||
|
@ -290,7 +290,7 @@ nsLangTextAttr::nsLangTextAttr(nsHyperTextAccessible *aRootAcc,
|
|||
mIsDefined = GetLang(aContent, mNativeValue);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsLangTextAttr::GetValueFor(nsIContent *aElm, nsAutoString *aValue)
|
||||
{
|
||||
return GetLang(aElm, *aValue);
|
||||
|
@ -302,7 +302,7 @@ nsLangTextAttr::Format(const nsAutoString& aValue, nsAString& aFormattedValue)
|
|||
aFormattedValue = aValue;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsLangTextAttr::GetLang(nsIContent *aContent, nsAString& aLang)
|
||||
{
|
||||
nsCoreUtils::GetLanguageFor(aContent, mRootContent, aLang);
|
||||
|
@ -330,7 +330,7 @@ nsCSSTextAttr::GetName() const
|
|||
return *gCSSTextAttrsMap[mIndex].mAttrName;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsCSSTextAttr::GetValueFor(nsIContent *aContent, nsAutoString *aValue)
|
||||
{
|
||||
nsCOMPtr<nsIDOMCSSStyleDeclaration> currStyleDecl =
|
||||
|
@ -374,7 +374,7 @@ nsBGColorTextAttr::nsBGColorTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame) :
|
|||
mIsDefined = GetColor(aFrame, &mNativeValue);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsBGColorTextAttr::GetValueFor(nsIContent *aContent, nscolor *aValue)
|
||||
{
|
||||
nsIFrame *frame = aContent->GetPrimaryFrame();
|
||||
|
@ -400,7 +400,7 @@ nsBGColorTextAttr::Format(const nscolor& aValue, nsAString& aFormattedValue)
|
|||
aFormattedValue = value;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsBGColorTextAttr::GetColor(nsIFrame *aFrame, nscolor *aColor)
|
||||
{
|
||||
const nsStyleBackground *styleBackground = aFrame->GetStyleBackground();
|
||||
|
@ -444,7 +444,7 @@ nsFontSizeTextAttr::nsFontSizeTextAttr(nsIFrame *aRootFrame, nsIFrame *aFrame) :
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsFontSizeTextAttr::GetValueFor(nsIContent *aContent, nscoord *aValue)
|
||||
{
|
||||
nsIFrame *frame = aContent->GetPrimaryFrame();
|
||||
|
@ -501,7 +501,7 @@ nsFontWeightTextAttr::nsFontWeightTextAttr(nsIFrame *aRootFrame,
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsFontWeightTextAttr::GetValueFor(nsIContent *aContent, PRInt32 *aValue)
|
||||
{
|
||||
nsIFrame *frame = aContent->GetPrimaryFrame();
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
* inside hyper text accessible
|
||||
*/
|
||||
nsTextAttrsMgr(nsHyperTextAccessible *aHyperTextAcc,
|
||||
PRBool aIncludeDefAttrs = PR_TRUE,
|
||||
bool aIncludeDefAttrs = true,
|
||||
nsAccessible *aOffsetAcc = nsnull,
|
||||
PRInt32 aOffsetAccIdx = -1);
|
||||
|
||||
|
@ -116,7 +116,7 @@ protected:
|
|||
private:
|
||||
nsRefPtr<nsHyperTextAccessible> mHyperTextAcc;
|
||||
|
||||
PRBool mIncludeDefAttrs;
|
||||
bool mIncludeDefAttrs;
|
||||
|
||||
nsRefPtr<nsAccessible> mOffsetAcc;
|
||||
PRInt32 mOffsetAccIdx;
|
||||
|
@ -148,13 +148,13 @@ public:
|
|||
* default or include default attribute value
|
||||
* flag is applied
|
||||
*/
|
||||
virtual PRBool GetValue(nsAString& aValue, PRBool aIncludeDefAttrValue) = 0;
|
||||
virtual bool GetValue(nsAString& aValue, bool aIncludeDefAttrValue) = 0;
|
||||
|
||||
/**
|
||||
* Return true if the text attribute value on the given element equals with
|
||||
* predefined attribute value.
|
||||
*/
|
||||
virtual PRBool Equal(nsIContent *aContent) = 0;
|
||||
virtual bool Equal(nsIContent *aContent) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -165,17 +165,17 @@ template<class T>
|
|||
class nsTextAttr : public nsITextAttr
|
||||
{
|
||||
public:
|
||||
nsTextAttr(PRBool aGetRootValue) : mGetRootValue(aGetRootValue) {}
|
||||
nsTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {}
|
||||
|
||||
// nsITextAttr
|
||||
virtual PRBool GetValue(nsAString& aValue, PRBool aIncludeDefAttrValue)
|
||||
virtual bool GetValue(nsAString& aValue, bool aIncludeDefAttrValue)
|
||||
{
|
||||
if (mGetRootValue) {
|
||||
Format(mRootNativeValue, aValue);
|
||||
return mIsRootDefined;
|
||||
}
|
||||
|
||||
PRBool isDefined = mIsDefined;
|
||||
bool isDefined = mIsDefined;
|
||||
T* nativeValue = &mNativeValue;
|
||||
|
||||
if (!isDefined) {
|
||||
|
@ -194,10 +194,10 @@ public:
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
virtual PRBool Equal(nsIContent *aContent)
|
||||
virtual bool Equal(nsIContent *aContent)
|
||||
{
|
||||
T nativeValue;
|
||||
PRBool isDefined = GetValueFor(aContent, &nativeValue);
|
||||
bool isDefined = GetValueFor(aContent, &nativeValue);
|
||||
|
||||
if (!mIsDefined && !isDefined)
|
||||
return PR_TRUE;
|
||||
|
@ -214,24 +214,24 @@ public:
|
|||
protected:
|
||||
|
||||
// Return native value for the given DOM element.
|
||||
virtual PRBool GetValueFor(nsIContent *aContent, T *aValue) = 0;
|
||||
virtual bool GetValueFor(nsIContent *aContent, T *aValue) = 0;
|
||||
|
||||
// Format native value to text attribute value.
|
||||
virtual void Format(const T& aValue, nsAString& aFormattedValue) = 0;
|
||||
|
||||
// Indicates if root value should be exposed.
|
||||
PRBool mGetRootValue;
|
||||
bool mGetRootValue;
|
||||
|
||||
// Native value and flag indicating if the value is defined (initialized in
|
||||
// derived classes). Note, undefined native value means it is inherited
|
||||
// from root.
|
||||
T mNativeValue;
|
||||
PRBool mIsDefined;
|
||||
bool mIsDefined;
|
||||
|
||||
// Native root value and flag indicating if the value is defined (initialized
|
||||
// in derived classes).
|
||||
T mRootNativeValue;
|
||||
PRBool mIsRootDefined;
|
||||
bool mIsRootDefined;
|
||||
};
|
||||
|
||||
|
||||
|
@ -251,11 +251,11 @@ public:
|
|||
protected:
|
||||
|
||||
// nsTextAttr
|
||||
virtual PRBool GetValueFor(nsIContent *aElm, nsAutoString *aValue);
|
||||
virtual bool GetValueFor(nsIContent *aElm, nsAutoString *aValue);
|
||||
virtual void Format(const nsAutoString& aValue, nsAString& aFormattedValue);
|
||||
|
||||
private:
|
||||
PRBool GetLang(nsIContent *aContent, nsAString& aLang);
|
||||
bool GetLang(nsIContent *aContent, nsAString& aLang);
|
||||
nsCOMPtr<nsIContent> mRootContent;
|
||||
};
|
||||
|
||||
|
@ -276,7 +276,7 @@ public:
|
|||
protected:
|
||||
|
||||
// nsTextAttr
|
||||
virtual PRBool GetValueFor(nsIContent *aContent, nsAutoString *aValue);
|
||||
virtual bool GetValueFor(nsIContent *aContent, nsAutoString *aValue);
|
||||
virtual void Format(const nsAutoString& aValue, nsAString& aFormattedValue);
|
||||
|
||||
private:
|
||||
|
@ -298,11 +298,11 @@ public:
|
|||
|
||||
protected:
|
||||
// nsTextAttr
|
||||
virtual PRBool GetValueFor(nsIContent *aContent, nscolor *aValue);
|
||||
virtual bool GetValueFor(nsIContent *aContent, nscolor *aValue);
|
||||
virtual void Format(const nscolor& aValue, nsAString& aFormattedValue);
|
||||
|
||||
private:
|
||||
PRBool GetColor(nsIFrame *aFrame, nscolor *aColor);
|
||||
bool GetColor(nsIFrame *aFrame, nscolor *aColor);
|
||||
nsIFrame *mRootFrame;
|
||||
};
|
||||
|
||||
|
@ -322,7 +322,7 @@ public:
|
|||
protected:
|
||||
|
||||
// nsTextAttr
|
||||
virtual PRBool GetValueFor(nsIContent *aContent, nscoord *aValue);
|
||||
virtual bool GetValueFor(nsIContent *aContent, nscoord *aValue);
|
||||
virtual void Format(const nscoord& aValue, nsAString& aFormattedValue);
|
||||
|
||||
private:
|
||||
|
@ -354,7 +354,7 @@ public:
|
|||
protected:
|
||||
|
||||
// nsTextAttr
|
||||
virtual PRBool GetValueFor(nsIContent *aElm, PRInt32 *aValue);
|
||||
virtual bool GetValueFor(nsIContent *aElm, PRInt32 *aValue);
|
||||
virtual void Format(const PRInt32& aValue, nsAString& aFormattedValue);
|
||||
|
||||
private:
|
||||
|
|
|
@ -129,10 +129,10 @@ nsTextEquivUtils::AppendTextEquivFromContent(nsAccessible *aInitiatorAcc,
|
|||
// through the DOM subtree otherwise go down through accessible subtree and
|
||||
// calculate the flat string.
|
||||
nsIFrame *frame = aContent->GetPrimaryFrame();
|
||||
PRBool isVisible = frame && frame->GetStyleVisibility()->IsVisible();
|
||||
bool isVisible = frame && frame->GetStyleVisibility()->IsVisible();
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
PRBool goThroughDOMSubtree = PR_TRUE;
|
||||
bool goThroughDOMSubtree = true;
|
||||
|
||||
if (isVisible) {
|
||||
nsAccessible *accessible =
|
||||
|
@ -155,7 +155,7 @@ nsTextEquivUtils::AppendTextEquivFromTextContent(nsIContent *aContent,
|
|||
nsAString *aString)
|
||||
{
|
||||
if (aContent->IsNodeOfType(nsINode::eTEXT)) {
|
||||
PRBool isHTMLBlock = PR_FALSE;
|
||||
bool isHTMLBlock = false;
|
||||
|
||||
nsIContent *parentContent = aContent->GetParent();
|
||||
if (parentContent) {
|
||||
|
@ -238,7 +238,7 @@ nsTextEquivUtils::AppendFromAccessible(nsAccessible *aAccessible,
|
|||
nsresult rv = aAccessible->GetName(text);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool isEmptyTextEquiv = PR_TRUE;
|
||||
bool isEmptyTextEquiv = true;
|
||||
|
||||
// If the name is from tooltip then append it to result string in the end
|
||||
// (see h. step of name computation guide).
|
||||
|
@ -376,7 +376,7 @@ nsTextEquivUtils::AppendFromDOMNode(nsIContent *aContent, nsAString *aString)
|
|||
return AppendFromDOMChildren(aContent, aString);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsTextEquivUtils::AppendString(nsAString *aString,
|
||||
const nsAString& aTextEquivalent)
|
||||
{
|
||||
|
@ -391,7 +391,7 @@ nsTextEquivUtils::AppendString(nsAString *aString,
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsTextEquivUtils::IsWhitespaceString(const nsSubstring& aString)
|
||||
{
|
||||
nsSubstring::const_char_iterator iterBegin, iterEnd;
|
||||
|
@ -405,7 +405,7 @@ nsTextEquivUtils::IsWhitespaceString(const nsSubstring& aString)
|
|||
return iterBegin == iterEnd;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsTextEquivUtils::IsWhitespace(PRUnichar aChar)
|
||||
{
|
||||
return aChar == ' ' || aChar == '\n' ||
|
||||
|
|
|
@ -156,7 +156,7 @@ private:
|
|||
* Concatenates strings and appends space between them. Returns true if
|
||||
* text equivalent string was appended.
|
||||
*/
|
||||
static PRBool AppendString(nsAString *aString,
|
||||
static bool AppendString(nsAString *aString,
|
||||
const nsAString& aTextEquivalent);
|
||||
|
||||
/**
|
||||
|
@ -164,12 +164,12 @@ private:
|
|||
* only. In contrast to nsWhitespaceTokenizer class it takes into account
|
||||
* non-breaking space (0xa0).
|
||||
*/
|
||||
static PRBool IsWhitespaceString(const nsSubstring& aString);
|
||||
static bool IsWhitespaceString(const nsSubstring& aString);
|
||||
|
||||
/**
|
||||
* Returns true if the given character is whitespace symbol.
|
||||
*/
|
||||
static PRBool IsWhitespace(PRUnichar aChar);
|
||||
static bool IsWhitespace(PRUnichar aChar);
|
||||
|
||||
/**
|
||||
* Map array from roles to name rules (constants of ETextEquivRule).
|
||||
|
|
|
@ -119,7 +119,7 @@ nsHTMLCheckboxAccessible::NativeState()
|
|||
PRUint64 state = nsFormControlAccessible::NativeState();
|
||||
|
||||
state |= states::CHECKABLE;
|
||||
PRBool checkState = PR_FALSE; // Radio buttons and check boxes can be checked or mixed
|
||||
bool checkState = false; // Radio buttons and check boxes can be checked or mixed
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement =
|
||||
do_QueryInterface(mContent);
|
||||
|
@ -139,6 +139,16 @@ nsHTMLCheckboxAccessible::NativeState()
|
|||
return state;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLCheckboxAccessible: Widgets
|
||||
|
||||
bool
|
||||
nsHTMLCheckboxAccessible::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLRadioButtonAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -156,7 +166,7 @@ nsHTMLRadioButtonAccessible::NativeState()
|
|||
|
||||
state |= states::CHECKABLE;
|
||||
|
||||
PRBool checked = PR_FALSE; // Radio buttons and check boxes can be checked
|
||||
bool checked = false; // Radio buttons and check boxes can be checked
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLInputElement> htmlRadioElement =
|
||||
do_QueryInterface(mContent);
|
||||
|
@ -314,6 +324,15 @@ nsHTMLButtonAccessible::GetNameInternal(nsAString& aName)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLButtonAccessible: Widgets
|
||||
|
||||
bool
|
||||
nsHTMLButtonAccessible::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTML4ButtonAccessible
|
||||
|
@ -370,6 +389,15 @@ nsHTML4ButtonAccessible::NativeState()
|
|||
return state;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTML4ButtonAccessible: Widgets
|
||||
|
||||
bool
|
||||
nsHTML4ButtonAccessible::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsHTMLTextFieldAccessible
|
||||
|
@ -550,7 +578,7 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetAssociatedEditor(nsIEditor **aEditor
|
|||
// whatever script is currently running.
|
||||
nsCOMPtr<nsIJSContextStack> stack =
|
||||
do_GetService("@mozilla.org/js/xpc/ContextStack;1");
|
||||
PRBool pushed = stack && NS_SUCCEEDED(stack->Push(nsnull));
|
||||
bool pushed = stack && NS_SUCCEEDED(stack->Push(nsnull));
|
||||
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
nsresult rv = editableElt->GetEditor(aEditor);
|
||||
|
|
|
@ -68,6 +68,9 @@ public:
|
|||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -110,6 +113,9 @@ public:
|
|||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -134,6 +140,9 @@ public:
|
|||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ nsHTMLImageAccessible::NativeState()
|
|||
imageRequest->GetImage(getter_AddRefs(imgContainer));
|
||||
|
||||
if (imgContainer) {
|
||||
PRBool animated;
|
||||
bool animated;
|
||||
imgContainer->GetAnimated(&animated);
|
||||
if (animated)
|
||||
state |= states::ANIMATED;
|
||||
|
@ -102,7 +102,7 @@ nsHTMLImageAccessible::NativeState()
|
|||
nsresult
|
||||
nsHTMLImageAccessible::GetNameInternal(nsAString& aName)
|
||||
{
|
||||
PRBool hasAltAttrib =
|
||||
bool hasAltAttrib =
|
||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::alt, aName);
|
||||
if (!aName.IsEmpty())
|
||||
return NS_OK;
|
||||
|
@ -221,7 +221,7 @@ nsHTMLImageAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Private methods
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsHTMLImageAccessible::HasLongDesc()
|
||||
{
|
||||
if (IsDefunct())
|
||||
|
@ -230,7 +230,7 @@ nsHTMLImageAccessible::HasLongDesc()
|
|||
return mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::longdesc);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsHTMLImageAccessible::IsValidLongDescIndex(PRUint8 aIndex)
|
||||
{
|
||||
if (!HasLongDesc())
|
||||
|
|
|
@ -78,7 +78,7 @@ private:
|
|||
*
|
||||
* @returns true if the longdesc attribute is present.
|
||||
*/
|
||||
PRBool HasLongDesc();
|
||||
bool HasLongDesc();
|
||||
|
||||
/**
|
||||
* Used by GetActionName and DoAction to ensure the index for opening the
|
||||
|
@ -89,7 +89,7 @@ private:
|
|||
*
|
||||
* @returns true if index is valid for longdesc action.
|
||||
*/
|
||||
PRBool IsValidLongDescIndex(PRUint8 aIndex);
|
||||
bool IsValidLongDescIndex(PRUint8 aIndex);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -201,7 +201,7 @@ nsHTMLAreaAccessible::GetBounds(PRInt32 *aX, PRInt32 *aY,
|
|||
NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
|
||||
nsImageFrame *imageFrame = do_QueryFrame(frame);
|
||||
|
||||
nsImageMap* map = imageFrame->GetImageMap(presContext);
|
||||
nsImageMap* map = imageFrame->GetImageMap();
|
||||
NS_ENSURE_TRUE(map, NS_ERROR_FAILURE);
|
||||
|
||||
nsRect rect;
|
||||
|
|
|
@ -178,7 +178,7 @@ nsHTMLLinkAccessible::AnchorURIAt(PRUint32 aAnchorIndex)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Protected members
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsHTMLLinkAccessible::IsLinked()
|
||||
{
|
||||
if (IsDefunct())
|
||||
|
|
|
@ -72,7 +72,7 @@ protected:
|
|||
/**
|
||||
* Returns true if the link has href attribute.
|
||||
*/
|
||||
PRBool IsLinked();
|
||||
bool IsLinked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -284,7 +284,7 @@ nsHTMLSelectOptionAccessible::NativeState()
|
|||
state |= (states::FOCUSABLE | states::SELECTABLE);
|
||||
|
||||
// Are we selected?
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> option(do_QueryInterface(mContent));
|
||||
if (option) {
|
||||
option->GetSelected(&isSelected);
|
||||
|
@ -348,7 +348,7 @@ nsHTMLSelectOptionAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||
nsIContent *parentContent = mContent->GetParent();
|
||||
|
||||
PRInt32 posInSet = 0, setSize = 0;
|
||||
PRBool isContentFound = PR_FALSE;
|
||||
bool isContentFound = false;
|
||||
|
||||
PRUint32 childCount = parentContent->GetChildCount();
|
||||
for (PRUint32 childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
|
@ -401,7 +401,7 @@ nsHTMLSelectOptionAccessible::DoAction(PRUint8 aIndex)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLSelectOptionAccessible::SetSelected(PRBool aSelect)
|
||||
nsHTMLSelectOptionAccessible::SetSelected(bool aSelect)
|
||||
{
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
// nsIAccessible
|
||||
NS_IMETHOD DoAction(PRUint8 index);
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
NS_IMETHOD SetSelected(PRBool aSelect);
|
||||
NS_IMETHOD SetSelected(bool aSelect);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetNameInternal(nsAString& aName);
|
||||
|
|
|
@ -106,7 +106,7 @@ nsHTMLTableCellAccessible::NativeState()
|
|||
|
||||
if (frame) {
|
||||
state |= states::SELECTABLE;
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
frame->GetSelected(&isSelected);
|
||||
if (isSelected)
|
||||
state |= states::SELECTED;
|
||||
|
@ -245,7 +245,7 @@ nsHTMLTableCellAccessible::GetRowHeaderCells(nsIArray **aHeaderCells)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableCellAccessible::IsSelected(PRBool *aIsSelected)
|
||||
nsHTMLTableCellAccessible::IsSelected(bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -492,7 +492,7 @@ nsHTMLTableAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
|
|||
nsresult rv = nsAccessibleWrap::GetAttributesInternal(aAttributes);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool isProbablyForLayout;
|
||||
bool isProbablyForLayout;
|
||||
IsProbablyForLayout(&isProbablyForLayout);
|
||||
if (isProbablyForLayout) {
|
||||
nsAutoString oldValueUnused;
|
||||
|
@ -589,7 +589,7 @@ nsHTMLTableAccessible::GetSelectedCellCount(PRUint32* aCount)
|
|||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
PRInt32 startRowIndex = 0, startColIndex = 0,
|
||||
rowSpan, colSpan, actualRowSpan, actualColSpan;
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
|
||||
PRInt32 rowIndex;
|
||||
for (rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
||||
|
@ -624,7 +624,7 @@ nsHTMLTableAccessible::GetSelectedColumnCount(PRUint32* aCount)
|
|||
|
||||
PRInt32 index;
|
||||
for (index = 0; index < count; index++) {
|
||||
PRBool state = PR_FALSE;
|
||||
bool state = false;
|
||||
rv = IsColumnSelected(index, &state);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -647,7 +647,7 @@ nsHTMLTableAccessible::GetSelectedRowCount(PRUint32* aCount)
|
|||
|
||||
PRInt32 index;
|
||||
for (index = 0; index < count; index++) {
|
||||
PRBool state = PR_FALSE;
|
||||
bool state = false;
|
||||
rv = IsRowSelected(index, &state);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -682,7 +682,7 @@ nsHTMLTableAccessible::GetSelectedCells(nsIArray **aCells)
|
|||
nsCOMPtr<nsIDOMElement> cellElement;
|
||||
PRInt32 startRowIndex = 0, startColIndex = 0,
|
||||
rowSpan, colSpan, actualRowSpan, actualColSpan;
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
|
||||
PRInt32 rowIndex, index;
|
||||
for (rowIndex = 0, index = 0; rowIndex < rowCount; rowIndex++) {
|
||||
|
@ -732,10 +732,10 @@ nsHTMLTableAccessible::GetSelectedCellIndices(PRUint32 *aNumCells,
|
|||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
PRInt32 startRowIndex = 0, startColIndex = 0,
|
||||
rowSpan, colSpan, actualRowSpan, actualColSpan;
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
|
||||
PRInt32 cellsCount = columnCount * rowCount;
|
||||
nsAutoArrayPtr<PRBool> states(new PRBool[cellsCount]);
|
||||
nsAutoArrayPtr<bool> states(new bool[cellsCount]);
|
||||
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
PRInt32 rowIndex, index;
|
||||
|
@ -789,7 +789,7 @@ nsHTMLTableAccessible::GetSelectedColumnIndices(PRUint32 *aNumColumns,
|
|||
rv = GetColumnCount(&columnCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool *states = new PRBool[columnCount];
|
||||
bool *states = new bool[columnCount];
|
||||
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*aNumColumns = 0;
|
||||
|
@ -831,7 +831,7 @@ nsHTMLTableAccessible::GetSelectedRowIndices(PRUint32 *aNumRows,
|
|||
rv = GetRowCount(&rowCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool *states = new PRBool[rowCount];
|
||||
bool *states = new bool[rowCount];
|
||||
NS_ENSURE_TRUE(states, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*aNumRows = 0;
|
||||
|
@ -970,7 +970,7 @@ nsHTMLTableAccessible::GetColumnExtentAt(PRInt32 aRowIndex,
|
|||
|
||||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
PRInt32 startRowIndex, startColIndex, rowSpan, colSpan, actualRowSpan;
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
|
||||
nsresult rv = tableLayout->
|
||||
GetCellDataAt(aRowIndex, aColumnIndex, *getter_AddRefs(domElement),
|
||||
|
@ -989,7 +989,7 @@ nsHTMLTableAccessible::GetRowExtentAt(PRInt32 aRowIndex, PRInt32 aColumnIndex,
|
|||
|
||||
nsCOMPtr<nsIDOMElement> domElement;
|
||||
PRInt32 startRowIndex, startColIndex, rowSpan, colSpan, actualColSpan;
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
|
||||
nsresult rv = tableLayout->
|
||||
GetCellDataAt(aRowIndex, aColumnIndex, *getter_AddRefs(domElement),
|
||||
|
@ -1012,7 +1012,7 @@ nsHTMLTableAccessible::GetRowDescription(PRInt32 aRow, nsAString &_retval)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
||||
nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -1029,7 +1029,7 @@ nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
for (PRInt32 rowIdx = 0; rowIdx < rowCount; rowIdx++) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
rv = IsCellSelected(rowIdx, aColumn, &isSelected);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aIsSelected = isSelected;
|
||||
|
@ -1042,7 +1042,7 @@ nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
||||
nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -1059,7 +1059,7 @@ nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
for (PRInt32 colIdx = 0; colIdx < colCount; colIdx++) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
rv = IsCellSelected(aRow, colIdx, &isSelected);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aIsSelected = isSelected;
|
||||
|
@ -1073,7 +1073,7 @@ nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
|
||||
PRBool *aIsSelected)
|
||||
bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -1155,7 +1155,7 @@ nsresult
|
|||
nsHTMLTableAccessible::AddRowOrColumnToSelection(PRInt32 aIndex,
|
||||
PRUint32 aTarget)
|
||||
{
|
||||
PRBool doSelectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
|
||||
bool doSelectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
|
||||
|
||||
nsITableLayout *tableLayout = GetTableLayout();
|
||||
NS_ENSURE_STATE(tableLayout);
|
||||
|
@ -1163,7 +1163,7 @@ nsHTMLTableAccessible::AddRowOrColumnToSelection(PRInt32 aIndex,
|
|||
nsCOMPtr<nsIDOMElement> cellElm;
|
||||
PRInt32 startRowIdx, startColIdx, rowSpan, colSpan,
|
||||
actualRowSpan, actualColSpan;
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
PRInt32 count = 0;
|
||||
|
@ -1201,7 +1201,7 @@ nsHTMLTableAccessible::AddRowOrColumnToSelection(PRInt32 aIndex,
|
|||
nsresult
|
||||
nsHTMLTableAccessible::RemoveRowsOrColumnsFromSelection(PRInt32 aIndex,
|
||||
PRUint32 aTarget,
|
||||
PRBool aIsOuter)
|
||||
bool aIsOuter)
|
||||
{
|
||||
nsITableLayout *tableLayout = GetTableLayout();
|
||||
NS_ENSURE_STATE(tableLayout);
|
||||
|
@ -1210,7 +1210,7 @@ nsHTMLTableAccessible::RemoveRowsOrColumnsFromSelection(PRInt32 aIndex,
|
|||
nsRefPtr<nsFrameSelection> tableSelection =
|
||||
const_cast<nsFrameSelection*>(presShell->ConstFrameSelection());
|
||||
|
||||
PRBool doUnselectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
|
||||
bool doUnselectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
|
||||
PRInt32 count = 0;
|
||||
nsresult rv = doUnselectRow ? GetColumnCount(&count) : GetRowCount(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -1248,7 +1248,7 @@ nsHTMLTableAccessible::GetCellAt(PRInt32 aRowIndex,
|
|||
{
|
||||
PRInt32 startRowIndex = 0, startColIndex = 0,
|
||||
rowSpan, colSpan, actualRowSpan, actualColSpan;
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
|
||||
nsITableLayout *tableLayout = GetTableLayout();
|
||||
NS_ENSURE_STATE(tableLayout);
|
||||
|
@ -1290,7 +1290,7 @@ nsHTMLTableAccessible::Description(nsString& aDescription)
|
|||
|
||||
#ifdef SHOW_LAYOUT_HEURISTIC
|
||||
if (aDescription.IsEmpty()) {
|
||||
PRBool isProbablyForLayout;
|
||||
bool isProbablyForLayout;
|
||||
IsProbablyForLayout(&isProbablyForLayout);
|
||||
aDescription = mLayoutHeuristic;
|
||||
}
|
||||
|
@ -1300,9 +1300,9 @@ nsHTMLTableAccessible::Description(nsString& aDescription)
|
|||
#endif
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsHTMLTableAccessible::HasDescendant(const nsAString& aTagName,
|
||||
PRBool aAllowEmpty)
|
||||
bool aAllowEmpty)
|
||||
{
|
||||
nsCOMPtr<nsIDOMElement> tableElt(do_QueryInterface(mContent));
|
||||
NS_ENSURE_TRUE(tableElt, PR_FALSE);
|
||||
|
@ -1341,7 +1341,7 @@ nsHTMLTableAccessible::HasDescendant(const nsAString& aTagName,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
|
||||
nsHTMLTableAccessible::IsProbablyForLayout(bool *aIsProbablyForLayout)
|
||||
{
|
||||
// Implement a heuristic to determine if table is most likely used for layout
|
||||
// XXX do we want to look for rowspan or colspan, especialy that span all but a couple cells
|
||||
|
@ -1375,7 +1375,7 @@ nsHTMLTableAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
|
|||
|
||||
// Check to see if an ARIA role overrides the role from native markup,
|
||||
// but for which we still expose table semantics (treegrid, for example).
|
||||
PRBool hasNonTableRole = (Role() != nsIAccessibleRole::ROLE_TABLE);
|
||||
bool hasNonTableRole = (Role() != nsIAccessibleRole::ROLE_TABLE);
|
||||
if (hasNonTableRole) {
|
||||
RETURN_LAYOUT_ANSWER(PR_FALSE, "Has role attribute");
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ protected:
|
|||
*/
|
||||
nsresult RemoveRowsOrColumnsFromSelection(PRInt32 aIndex,
|
||||
PRUint32 aTarget,
|
||||
PRBool aIsOuter);
|
||||
bool aIsOuter);
|
||||
|
||||
/**
|
||||
* Return true if table has an element with the given tag name.
|
||||
|
@ -195,7 +195,7 @@ protected:
|
|||
* @param aAllowEmpty [in, optional] points if found element can be empty
|
||||
* or contain whitespace text only.
|
||||
*/
|
||||
PRBool HasDescendant(const nsAString& aTagName, PRBool aAllowEmpty = PR_TRUE);
|
||||
bool HasDescendant(const nsAString& aTagName, bool aAllowEmpty = true);
|
||||
|
||||
#ifdef SHOW_LAYOUT_HEURISTIC
|
||||
nsString mLayoutHeuristic;
|
||||
|
|
|
@ -287,7 +287,7 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset,
|
|||
PRInt32 startOffset = aStartOffset;
|
||||
PRInt32 endOffset = aEndOffset;
|
||||
// XXX this prevents text interface usage on <input type="password">
|
||||
PRBool isPassword = (Role() == nsIAccessibleRole::ROLE_PASSWORD_TEXT);
|
||||
bool isPassword = (Role() == nsIAccessibleRole::ROLE_PASSWORD_TEXT);
|
||||
|
||||
// Clear out parameters and set up loop
|
||||
if (aText) {
|
||||
|
@ -552,7 +552,7 @@ nsAccessible*
|
|||
nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode,
|
||||
PRInt32 aNodeOffset,
|
||||
PRInt32 *aHyperTextOffset,
|
||||
PRBool aIsEndOffset)
|
||||
bool aIsEndOffset)
|
||||
{
|
||||
if (!aHyperTextOffset)
|
||||
return nsnull;
|
||||
|
@ -721,7 +721,7 @@ nsHyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset,
|
|||
nsCOMPtr<nsIEditor> editor;
|
||||
GetAssociatedEditor(getter_AddRefs(editor));
|
||||
if (editor) {
|
||||
PRBool isEmpty = PR_FALSE;
|
||||
bool isEmpty = false;
|
||||
editor->GetDocumentIsEmpty(&isEmpty);
|
||||
if (isEmpty) {
|
||||
nsCOMPtr<nsIDOMElement> editorRootElm;
|
||||
|
@ -779,12 +779,12 @@ nsHyperTextAccessible::GetRelativeOffset(nsIPresShell *aPresShell,
|
|||
nsAccessible *aFromAccessible,
|
||||
nsSelectionAmount aAmount,
|
||||
nsDirection aDirection,
|
||||
PRBool aNeedsStart)
|
||||
bool aNeedsStart)
|
||||
{
|
||||
const PRBool kIsJumpLinesOk = PR_TRUE; // okay to jump lines
|
||||
const PRBool kIsScrollViewAStop = PR_FALSE; // do not stop at scroll views
|
||||
const PRBool kIsKeyboardSelect = PR_TRUE; // is keyboard selection
|
||||
const PRBool kIsVisualBidi = PR_FALSE; // use visual order for bidi text
|
||||
const bool kIsJumpLinesOk = true; // okay to jump lines
|
||||
const bool kIsScrollViewAStop = false; // do not stop at scroll views
|
||||
const bool kIsKeyboardSelect = true; // is keyboard selection
|
||||
const bool kIsVisualBidi = false; // use visual order for bidi text
|
||||
|
||||
EWordMovementType wordMovementType = aNeedsStart ? eStartWord : eEndWord;
|
||||
if (aAmount == eSelectLine) {
|
||||
|
@ -928,7 +928,7 @@ nsresult nsHyperTextAccessible::GetTextHelper(EGetTextType aType, nsAccessibleTe
|
|||
}
|
||||
|
||||
nsSelectionAmount amount;
|
||||
PRBool needsStart = PR_FALSE;
|
||||
bool needsStart = false;
|
||||
switch (aBoundaryType) {
|
||||
case BOUNDARY_CHAR:
|
||||
amount = eSelectCluster;
|
||||
|
@ -1108,7 +1108,7 @@ NS_IMETHODIMP nsHyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, nsAcces
|
|||
// out long rangeStartOffset,
|
||||
// out long rangeEndOffset);
|
||||
NS_IMETHODIMP
|
||||
nsHyperTextAccessible::GetTextAttributes(PRBool aIncludeDefAttrs,
|
||||
nsHyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs,
|
||||
PRInt32 aOffset,
|
||||
PRInt32 *aStartOffset,
|
||||
PRInt32 *aEndOffset,
|
||||
|
@ -1805,7 +1805,7 @@ nsHyperTextAccessible::GetSelections(PRInt16 aType,
|
|||
// Remove collapsed ranges
|
||||
PRInt32 numRanges = aRanges->Count();
|
||||
for (PRInt32 count = 0; count < numRanges; count ++) {
|
||||
PRBool isCollapsed;
|
||||
bool isCollapsed;
|
||||
(*aRanges)[count]->GetCollapsed(&isCollapsed);
|
||||
if (isCollapsed) {
|
||||
aRanges->RemoveObjectAt(count);
|
||||
|
@ -1904,7 +1904,7 @@ nsHyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Caret is a collapsed selection
|
||||
PRBool isOnlyCaret = (aStartOffset == aEndOffset);
|
||||
bool isOnlyCaret = (aStartOffset == aEndOffset);
|
||||
|
||||
PRInt32 rangeCount;
|
||||
domSel->GetRangeCount(&rangeCount);
|
||||
|
@ -2028,7 +2028,7 @@ nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex,
|
|||
|
||||
nsPresContext *presContext = frame->PresContext();
|
||||
|
||||
PRBool initialScrolled = PR_FALSE;
|
||||
bool initialScrolled = false;
|
||||
nsIFrame *parentFrame = frame;
|
||||
while ((parentFrame = parentFrame->GetParent())) {
|
||||
nsIScrollableFrame *scrollableFrame = do_QueryFrame(parentFrame);
|
||||
|
@ -2083,7 +2083,7 @@ nsHyperTextAccessible::InvalidateChildren()
|
|||
nsAccessibleWrap::InvalidateChildren();
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsHyperTextAccessible::RemoveChild(nsAccessible* aAccessible)
|
||||
{
|
||||
PRInt32 childIndex = aAccessible->IndexInParent();
|
||||
|
@ -2179,7 +2179,7 @@ nsHyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift,
|
|||
|
||||
PRInt32
|
||||
nsHyperTextAccessible::GetChildOffset(PRUint32 aChildIndex,
|
||||
PRBool aInvalidateAfter)
|
||||
bool aInvalidateAfter)
|
||||
{
|
||||
if (aChildIndex == 0) {
|
||||
if (aInvalidateAfter)
|
||||
|
@ -2307,8 +2307,8 @@ nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame *aFrame,
|
|||
// nsHyperTextAccessible
|
||||
nsresult
|
||||
nsHyperTextAccessible::DOMRangeBoundToHypertextOffset(nsIDOMRange *aRange,
|
||||
PRBool aIsStartBound,
|
||||
PRBool aIsStartHTOffset,
|
||||
bool aIsStartBound,
|
||||
bool aIsStartHTOffset,
|
||||
PRInt32 *aHTOffset)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> DOMNode;
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
virtual PRUint64 NativeState();
|
||||
|
||||
virtual void InvalidateChildren();
|
||||
virtual PRBool RemoveChild(nsAccessible* aAccessible);
|
||||
virtual bool RemoveChild(nsAccessible* aAccessible);
|
||||
|
||||
// nsHyperTextAccessible (static helper method)
|
||||
|
||||
|
@ -169,7 +169,7 @@ public:
|
|||
nsAccessible *DOMPointToHypertextOffset(nsINode *aNode,
|
||||
PRInt32 aNodeOffset,
|
||||
PRInt32 *aHypertextOffset,
|
||||
PRBool aIsEndOffset = PR_FALSE);
|
||||
bool aIsEndOffset = false);
|
||||
|
||||
/**
|
||||
* Turn a hypertext offsets into DOM point.
|
||||
|
@ -233,7 +233,7 @@ public:
|
|||
* cached offsets for next siblings of the child
|
||||
*/
|
||||
PRInt32 GetChildOffset(nsAccessible* aChild,
|
||||
PRBool aInvalidateAfter = PR_FALSE)
|
||||
bool aInvalidateAfter = false)
|
||||
{
|
||||
PRInt32 index = GetIndexOf(aChild);
|
||||
return index == -1 ? -1 : GetChildOffset(index, aInvalidateAfter);
|
||||
|
@ -243,7 +243,7 @@ public:
|
|||
* Return text offset for the child accessible index.
|
||||
*/
|
||||
PRInt32 GetChildOffset(PRUint32 aChildIndex,
|
||||
PRBool aInvalidateAfter = PR_FALSE);
|
||||
bool aInvalidateAfter = false);
|
||||
|
||||
/**
|
||||
* Return child accessible at the given text offset.
|
||||
|
@ -313,7 +313,7 @@ protected:
|
|||
PRInt32 GetRelativeOffset(nsIPresShell *aPresShell, nsIFrame *aFromFrame,
|
||||
PRInt32 aFromOffset, nsAccessible *aFromAccessible,
|
||||
nsSelectionAmount aAmount, nsDirection aDirection,
|
||||
PRBool aNeedsStart);
|
||||
bool aNeedsStart);
|
||||
|
||||
/**
|
||||
* Provides information for substring that is defined by the given start
|
||||
|
@ -397,8 +397,8 @@ protected:
|
|||
* @param aHTOffset [out] the result offset
|
||||
*/
|
||||
nsresult DOMRangeBoundToHypertextOffset(nsIDOMRange *aRange,
|
||||
PRBool aIsStartBound,
|
||||
PRBool aIsStartOffset,
|
||||
bool aIsStartBound,
|
||||
bool aIsStartOffset,
|
||||
PRInt32 *aHTOffset);
|
||||
|
||||
/**
|
||||
|
|
|
@ -81,10 +81,10 @@ struct AccessibleWrapper {
|
|||
return object;
|
||||
}
|
||||
|
||||
PRBool isIgnored () {
|
||||
bool isIgnored () {
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
|
||||
|
||||
return (PRBool)[object accessibilityIsIgnored];
|
||||
return (bool)[object accessibilityIsIgnored];
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ class nsAccessibleWrap : public nsAccessible
|
|||
virtual ~nsAccessibleWrap();
|
||||
|
||||
// creates the native accessible connected to this one.
|
||||
virtual PRBool Init ();
|
||||
virtual bool Init ();
|
||||
|
||||
// get the native obj-c object (mozAccessible)
|
||||
NS_IMETHOD GetNativeInterface (void **aOutAccessible);
|
||||
|
@ -81,11 +81,11 @@ class nsAccessibleWrap : public nsAccessible
|
|||
|
||||
// ignored means that the accessible might still have children, but is not displayed
|
||||
// to the user. it also has no native accessible object represented for it.
|
||||
PRBool IsIgnored();
|
||||
bool IsIgnored();
|
||||
|
||||
PRInt32 GetUnignoredChildCount(PRBool aDeepCount);
|
||||
PRInt32 GetUnignoredChildCount(bool aDeepCount);
|
||||
|
||||
PRBool HasPopup () {
|
||||
bool HasPopup () {
|
||||
return (NativeState() & mozilla::a11y::states::HASPOPUP);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ class nsAccessibleWrap : public nsAccessible
|
|||
/**
|
||||
* Return true if the parent doesn't have children to expose to AT.
|
||||
*/
|
||||
PRBool AncestorIsFlat();
|
||||
bool AncestorIsFlat();
|
||||
|
||||
// Wrapper around our native object.
|
||||
AccessibleWrapper *mNativeWrapper;
|
||||
|
|
|
@ -60,7 +60,7 @@ nsAccessibleWrap::~nsAccessibleWrap()
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessibleWrap::Init ()
|
||||
{
|
||||
if (!nsAccessible::Init())
|
||||
|
@ -211,7 +211,7 @@ nsAccessibleWrap::InvalidateChildren()
|
|||
}
|
||||
|
||||
PRInt32
|
||||
nsAccessibleWrap::GetUnignoredChildCount(PRBool aDeepCount)
|
||||
nsAccessibleWrap::GetUnignoredChildCount(bool aDeepCount)
|
||||
{
|
||||
// if we're flat, we have no children.
|
||||
if (nsAccUtils::MustPrune(this))
|
||||
|
@ -248,7 +248,7 @@ nsAccessibleWrap::GetUnignoredChildCount(PRBool aDeepCount)
|
|||
|
||||
// if we for some reason have no native accessible, we should be skipped over (and traversed)
|
||||
// when fetching all unignored children, etc. when counting unignored children, we will not be counted.
|
||||
PRBool
|
||||
bool
|
||||
nsAccessibleWrap::IsIgnored()
|
||||
{
|
||||
return (mNativeWrapper == nsnull) || mNativeWrapper->isIgnored();
|
||||
|
@ -302,7 +302,7 @@ nsAccessibleWrap::GetUnignoredParent()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessibleWrap protected
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsAccessibleWrap::AncestorIsFlat()
|
||||
{
|
||||
// We don't create a native object if we're child of a "flat" accessible;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
/**
|
||||
* Creates the native accessible connected to this one.
|
||||
*/
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -50,7 +50,7 @@ nsDocAccessibleWrap::~nsDocAccessibleWrap()
|
|||
{
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsDocAccessibleWrap::Init ()
|
||||
{
|
||||
if (!nsDocAccessible::Init())
|
||||
|
|
|
@ -525,7 +525,7 @@ __try {
|
|||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
nsresult rv = tableAcc->IsColumnSelected(aColumn, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
@ -548,7 +548,7 @@ __try {
|
|||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
nsresult rv = tableAcc->IsRowSelected(aRow, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
@ -571,7 +571,7 @@ __try {
|
|||
if (!tableAcc)
|
||||
return E_FAIL;
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
nsresult rv = tableAcc->IsCellSelected(aRow, aColumn, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
@ -681,7 +681,7 @@ __try {
|
|||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
rv = tableAcc->IsCellSelected(rowIdx, columnIdx, &isSelected);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
|
|
@ -297,7 +297,7 @@ __try {
|
|||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
||||
PRBool isSel = PR_FALSE;
|
||||
bool isSel = false;
|
||||
rv = tableCell->IsSelected(&isSel);
|
||||
if (NS_FAILED(rv))
|
||||
return GetHRESULT(rv);
|
||||
|
@ -325,7 +325,7 @@ __try {
|
|||
if (!tableCell)
|
||||
return E_FAIL;
|
||||
|
||||
PRBool isSel = PR_FALSE;
|
||||
bool isSel = false;
|
||||
nsresult rv = tableCell->IsSelected(&isSel);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*isSelected = isSel;
|
||||
|
|
|
@ -518,7 +518,7 @@ __try {
|
|||
// CAccessibleText
|
||||
|
||||
HRESULT
|
||||
CAccessibleText::GetModifiedText(PRBool aGetInsertedText,
|
||||
CAccessibleText::GetModifiedText(bool aGetInsertedText,
|
||||
IA2TextSegment *aText)
|
||||
{
|
||||
PRUint32 startOffset = 0, endOffset = 0;
|
||||
|
|
|
@ -151,12 +151,12 @@ public:
|
|||
NS_IMETHOD QueryInterface(const nsIID& uuid, void** result) = 0;
|
||||
|
||||
protected:
|
||||
virtual nsresult GetModifiedText(PRBool aGetInsertedText, nsAString& aText,
|
||||
virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText,
|
||||
PRUint32 *aStartOffset,
|
||||
PRUint32 *aEndOffset) = 0;
|
||||
|
||||
private:
|
||||
HRESULT GetModifiedText(PRBool aGetInsertedText, IA2TextSegment *aNewText);
|
||||
HRESULT GetModifiedText(bool aGetInsertedText, IA2TextSegment *aNewText);
|
||||
nsAccessibleTextBoundary GetGeckoTextBoundary(enum IA2TextBoundaryType coordinateType);
|
||||
};
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ LPFNNOTIFYWINEVENT nsAccessNodeWrap::gmNotifyWinEvent = nsnull;
|
|||
LPFNGETGUITHREADINFO nsAccessNodeWrap::gmGetGUIThreadInfo = nsnull;
|
||||
|
||||
// Used to determine whether an IAccessible2 compatible screen reader is loaded.
|
||||
PRBool nsAccessNodeWrap::gIsIA2Disabled = PR_FALSE;
|
||||
bool nsAccessNodeWrap::gIsIA2Disabled = false;
|
||||
|
||||
AccTextChangeEvent* nsAccessNodeWrap::gTextEvent = nsnull;
|
||||
|
||||
|
@ -666,7 +666,7 @@ GetHRESULT(nsresult aResult)
|
|||
}
|
||||
}
|
||||
|
||||
PRBool nsAccessNodeWrap::IsOnlyMsaaCompatibleJawsPresent()
|
||||
bool nsAccessNodeWrap::IsOnlyMsaaCompatibleJawsPresent()
|
||||
{
|
||||
HMODULE jhookhandle = ::GetModuleHandleW(kJAWSModuleHandle);
|
||||
if (!jhookhandle)
|
||||
|
|
|
@ -159,7 +159,7 @@ public: // construction, destruction
|
|||
|
||||
static int FilterA11yExceptions(unsigned int aCode, EXCEPTION_POINTERS *aExceptionInfo);
|
||||
|
||||
static PRBool IsOnlyMsaaCompatibleJawsPresent();
|
||||
static bool IsOnlyMsaaCompatibleJawsPresent();
|
||||
|
||||
static void TurnOffNewTabSwitchingForJawsAndWE();
|
||||
|
||||
|
@ -186,7 +186,7 @@ protected:
|
|||
* Used to determine whether an IAccessible2 compatible screen reader is
|
||||
* loaded. Currently used for JAWS versions older than 8.0.2173.
|
||||
*/
|
||||
static PRBool gIsIA2Disabled;
|
||||
static bool gIsIA2Disabled;
|
||||
|
||||
/**
|
||||
* It is used in nsHyperTextAccessibleWrap for IA2::newText/oldText
|
||||
|
|
|
@ -1617,7 +1617,7 @@ nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
|
|||
nsIFrame* frame = aAccessible->GetFrame();
|
||||
if (frame) {
|
||||
nsIWidget* widget = frame->GetNearestWidget();
|
||||
PRBool isVisible = PR_FALSE;
|
||||
bool isVisible = false;
|
||||
widget->IsVisible(isVisible);
|
||||
if (isVisible) {
|
||||
nsCOMPtr<nsIPresShell> shell(aAccessible->GetPresShell());
|
||||
|
@ -1662,7 +1662,7 @@ nsAccessibleWrap::ConvertToIA2Attributes(nsIPersistentProperties *aAttributes,
|
|||
|
||||
const char kCharsToEscape[] = ":;=,\\";
|
||||
|
||||
PRBool hasMore = PR_FALSE;
|
||||
bool hasMore = false;
|
||||
while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) {
|
||||
nsCOMPtr<nsISupports> propSupports;
|
||||
propEnum->GetNext(getter_AddRefs(propSupports));
|
||||
|
|
|
@ -287,7 +287,7 @@ nsDocAccessibleWrap::DoInitialUpdate()
|
|||
nativeData = reinterpret_cast<mozilla::WindowsHandle>(
|
||||
rootDocument->GetNativeWindow());
|
||||
|
||||
PRBool isActive = PR_TRUE;
|
||||
bool isActive = true;
|
||||
PRInt32 x = CW_USEDEFAULT, y = CW_USEDEFAULT, width = 0, height = 0;
|
||||
if (nsWinUtils::IsWindowEmulationFor(kDolphinModuleHandle)) {
|
||||
GetBounds(&x, &y, &width, &height);
|
||||
|
|
|
@ -78,7 +78,7 @@ nsHyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsHyperTextAccessibleWrap::GetModifiedText(PRBool aGetInsertedText,
|
||||
nsHyperTextAccessibleWrap::GetModifiedText(bool aGetInsertedText,
|
||||
nsAString& aText,
|
||||
PRUint32 *aStartOffset,
|
||||
PRUint32 *aEndOffset)
|
||||
|
@ -90,7 +90,7 @@ nsHyperTextAccessibleWrap::GetModifiedText(PRBool aGetInsertedText,
|
|||
if (!gTextEvent)
|
||||
return NS_OK;
|
||||
|
||||
PRBool isInserted = gTextEvent->IsTextInserted();
|
||||
bool isInserted = gTextEvent->IsTextInserted();
|
||||
if (aGetInsertedText != isInserted)
|
||||
return NS_OK;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
virtual nsresult HandleAccEvent(AccEvent* aEvent);
|
||||
|
||||
protected:
|
||||
virtual nsresult GetModifiedText(PRBool aGetInsertedText, nsAString& aText,
|
||||
virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText,
|
||||
PRUint32 *aStartOffset,
|
||||
PRUint32 *aEndOffset);
|
||||
};
|
||||
|
|
|
@ -189,7 +189,7 @@ __try {
|
|||
|
||||
nsIFrame* nsTextAccessibleWrap::GetPointFromOffset(nsIFrame *aContainingFrame,
|
||||
PRInt32 aOffset,
|
||||
PRBool aPreferNext,
|
||||
bool aPreferNext,
|
||||
nsPoint& aOutPoint)
|
||||
{
|
||||
nsIFrame *textFrame = nsnull;
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
|
||||
// Return child frame containing offset on success
|
||||
nsIFrame* GetPointFromOffset(nsIFrame *aContainingFrame,
|
||||
PRInt32 aOffset, PRBool aPreferNext, nsPoint& aOutPoint);
|
||||
PRInt32 aOffset, bool aPreferNext, nsPoint& aOutPoint);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -160,19 +160,19 @@ nsXFormsAccessible::NativeState()
|
|||
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
|
||||
PRBool isRelevant = PR_FALSE;
|
||||
bool isRelevant = false;
|
||||
nsresult rv = sXFormsService->IsRelevant(DOMNode, &isRelevant);
|
||||
NS_ENSURE_SUCCESS(rv, 0);
|
||||
|
||||
PRBool isReadonly = PR_FALSE;
|
||||
bool isReadonly = false;
|
||||
rv = sXFormsService->IsReadonly(DOMNode, &isReadonly);
|
||||
NS_ENSURE_SUCCESS(rv, 0);
|
||||
|
||||
PRBool isRequired = PR_FALSE;
|
||||
bool isRequired = false;
|
||||
rv = sXFormsService->IsRequired(DOMNode, &isRequired);
|
||||
NS_ENSURE_SUCCESS(rv, 0);
|
||||
|
||||
PRBool isValid = PR_FALSE;
|
||||
bool isValid = false;
|
||||
rv = sXFormsService->IsValid(DOMNode, &isValid);
|
||||
NS_ENSURE_SUCCESS(rv, 0);
|
||||
|
||||
|
@ -211,7 +211,7 @@ nsXFormsAccessible::Description(nsString& aDescription)
|
|||
GetBoundChildElementValue(NS_LITERAL_STRING("hint"), aDescription);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXFormsAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
return PR_FALSE;
|
||||
|
@ -234,7 +234,7 @@ nsXFormsContainerAccessible::NativeRole()
|
|||
return nsIAccessibleRole::ROLE_GROUPING;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXFormsContainerAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
return PR_TRUE;
|
||||
|
@ -258,12 +258,12 @@ nsXFormsEditableAccessible::NativeState()
|
|||
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
|
||||
PRBool isReadonly = PR_FALSE;
|
||||
bool isReadonly = false;
|
||||
nsresult rv = sXFormsService->IsReadonly(DOMNode, &isReadonly);
|
||||
NS_ENSURE_SUCCESS(rv, state);
|
||||
|
||||
if (!isReadonly) {
|
||||
PRBool isRelevant = PR_FALSE;
|
||||
bool isRelevant = false;
|
||||
rv = sXFormsService->IsRelevant(DOMNode, &isRelevant);
|
||||
NS_ENSURE_SUCCESS(rv, state);
|
||||
if (isRelevant) {
|
||||
|
@ -473,7 +473,7 @@ nsXFormsSelectableAccessible::IsItemSelected(PRUint32 aIndex)
|
|||
return selItemDOMNode == itemDOMNode;
|
||||
}
|
||||
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
sXFormsService->IsSelectItemSelected(DOMNode, itemDOMNode, &isSelected);
|
||||
return isSelected;
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ nsXFormsSelectableItemAccessible::IsSelected()
|
|||
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
if (nodeinfo->Equals(nsGkAtoms::select)) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
rv = sXFormsService->IsSelectItemSelected(select, DOMNode, &isSelected);
|
||||
return NS_SUCCEEDED(rv) && isSelected;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
|
||||
// Denies accessible nodes in anonymous content of xforms element by
|
||||
// always returning PR_FALSE value.
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
protected:
|
||||
// Returns value of first child xforms element by tagname that is bound to
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
|
||||
// Allows accessible nodes in anonymous content of xforms element by
|
||||
// always returning PR_TRUE value.
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
};
|
||||
|
||||
|
||||
|
@ -176,7 +176,7 @@ protected:
|
|||
nsIContent* GetItemByIndex(PRUint32* aIndex,
|
||||
nsAccessible* aAccessible = nsnull);
|
||||
|
||||
PRBool mIsSelect1Element;
|
||||
bool mIsSelect1Element;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -575,7 +575,7 @@ nsXFormsSelectComboboxAccessible::NativeState()
|
|||
{
|
||||
PRUint64 state = nsXFormsSelectableAccessible::NativeState();
|
||||
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
nsresult rv = sXFormsService->IsDropmarkerOpen(DOMNode, &isOpen);
|
||||
NS_ENSURE_SUCCESS(rv, state);
|
||||
|
@ -588,7 +588,7 @@ nsXFormsSelectComboboxAccessible::NativeState()
|
|||
return state | states::HASPOPUP | states::FOCUSABLE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXFormsSelectComboboxAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
return PR_TRUE;
|
||||
|
|
|
@ -297,7 +297,7 @@ public:
|
|||
// nsAccessible
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ nsXFormsDropmarkerWidgetAccessible::NativeRole()
|
|||
PRUint64
|
||||
nsXFormsDropmarkerWidgetAccessible::NativeState()
|
||||
{
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
nsresult rv = sXFormsService->IsDropmarkerOpen(DOMNode, &isOpen);
|
||||
NS_ENSURE_SUCCESS(rv, 0);
|
||||
|
@ -83,7 +83,7 @@ nsXFormsDropmarkerWidgetAccessible::GetActionName(PRUint8 aIndex,
|
|||
if (aIndex != eAction_Click)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
nsresult rv = sXFormsService->IsDropmarkerOpen(DOMNode, &isOpen);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -146,7 +146,7 @@ nsXFormsComboboxPopupWidgetAccessible::NativeState()
|
|||
{
|
||||
PRUint64 state = nsXFormsAccessible::NativeState();
|
||||
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
nsresult rv = sXFormsService->IsDropmarkerOpen(DOMNode, &isOpen);
|
||||
NS_ENSURE_SUCCESS(rv, state);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
NS_IMPL_ISUPPORTS1(nsAccEvent, nsIAccessibleEvent)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccEvent::GetIsFromUserInput(PRBool* aIsFromUserInput)
|
||||
nsAccEvent::GetIsFromUserInput(bool* aIsFromUserInput)
|
||||
{
|
||||
*aIsFromUserInput = mEvent->IsFromUserInput();
|
||||
return NS_OK;
|
||||
|
@ -114,7 +114,7 @@ nsAccStateChangeEvent::GetState(PRUint32* aState)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccStateChangeEvent::IsExtraState(PRBool* aIsExtraState)
|
||||
nsAccStateChangeEvent::IsExtraState(bool* aIsExtraState)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsExtraState);
|
||||
|
||||
|
@ -127,7 +127,7 @@ nsAccStateChangeEvent::IsExtraState(PRBool* aIsExtraState)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccStateChangeEvent::IsEnabled(PRBool* aIsEnabled)
|
||||
nsAccStateChangeEvent::IsEnabled(bool* aIsEnabled)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsEnabled);
|
||||
*aIsEnabled = static_cast<AccStateChangeEvent*>(mEvent.get())->IsStateEnabled();
|
||||
|
@ -158,7 +158,7 @@ nsAccTextChangeEvent::GetLength(PRUint32* aLength)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccTextChangeEvent::IsInserted(PRBool* aIsInserted)
|
||||
nsAccTextChangeEvent::IsInserted(bool* aIsInserted)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsInserted);
|
||||
*aIsInserted = static_cast<AccTextChangeEvent*>(mEvent.get())->IsTextInserted();
|
||||
|
|
|
@ -88,7 +88,7 @@ nsXULComboboxAccessible::NativeState()
|
|||
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
|
||||
if (menuList) {
|
||||
PRBool isOpen;
|
||||
bool isOpen;
|
||||
menuList->GetOpen(&isOpen);
|
||||
if (isOpen) {
|
||||
states |= states::EXPANDED;
|
||||
|
@ -140,7 +140,7 @@ nsXULComboboxAccessible::Description(nsString& aDescription)
|
|||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULComboboxAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
if (mContent->NodeInfo()->Equals(nsGkAtoms::textbox, kNameSpaceID_XUL) ||
|
||||
|
@ -178,7 +178,7 @@ nsXULComboboxAccessible::DoAction(PRUint8 aIndex)
|
|||
if (!menuList) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
PRBool isDroppedDown;
|
||||
bool isDroppedDown;
|
||||
menuList->GetOpen(&isDroppedDown);
|
||||
return menuList->SetOpen(!isDroppedDown);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ nsXULComboboxAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
|
|||
if (!menuList) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
PRBool isDroppedDown;
|
||||
bool isDroppedDown;
|
||||
menuList->GetOpen(&isDroppedDown);
|
||||
if (isDroppedDown)
|
||||
aName.AssignLiteral("close");
|
||||
|
@ -240,7 +240,7 @@ nsXULComboboxAccessible::AreItemsOperable() const
|
|||
nsCOMPtr<nsIAutoCompleteInput> autoCompleteInputElm =
|
||||
do_QueryInterface(mContent);
|
||||
if (autoCompleteInputElm) {
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
autoCompleteInputElm->GetPopupOpen(&isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ nsXULComboboxAccessible::AreItemsOperable() const
|
|||
|
||||
nsCOMPtr<nsIDOMXULMenuListElement> menuListElm = do_QueryInterface(mContent);
|
||||
if (menuListElm) {
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
menuListElm->GetOpen(&isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
virtual void Description(nsString& aDescription);
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
|
|
@ -128,7 +128,7 @@ nsXULButtonAccessible::NativeState()
|
|||
// get focus and disable status from base class
|
||||
PRUint64 state = nsAccessible::NativeState();
|
||||
|
||||
PRBool disabled = PR_FALSE;
|
||||
bool disabled = false;
|
||||
nsCOMPtr<nsIDOMXULControlElement> xulFormElement(do_QueryInterface(mContent));
|
||||
if (xulFormElement) {
|
||||
xulFormElement->GetDisabled(&disabled);
|
||||
|
@ -145,7 +145,7 @@ nsXULButtonAccessible::NativeState()
|
|||
xulButtonElement->GetType(type);
|
||||
if (type.EqualsLiteral("checkbox") || type.EqualsLiteral("radio")) {
|
||||
state |= states::CHECKABLE;
|
||||
PRBool checked = PR_FALSE;
|
||||
bool checked = false;
|
||||
PRInt32 checkState = 0;
|
||||
xulButtonElement->GetChecked(&checked);
|
||||
if (checked) {
|
||||
|
@ -215,12 +215,12 @@ nsXULButtonAccessible::CacheChildren()
|
|||
|
||||
// XXX: no children until the button is menu button. Probably it's not
|
||||
// totally correct but in general AT wants to have leaf buttons.
|
||||
PRBool isMenu = mContent->AttrValueIs(kNameSpaceID_None,
|
||||
bool isMenu = mContent->AttrValueIs(kNameSpaceID_None,
|
||||
nsGkAtoms::type,
|
||||
nsGkAtoms::menu,
|
||||
eCaseMatters);
|
||||
|
||||
PRBool isMenuButton = isMenu ?
|
||||
bool isMenuButton = isMenu ?
|
||||
PR_FALSE :
|
||||
mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::menuButton, eCaseMatters);
|
||||
|
@ -264,7 +264,7 @@ nsXULButtonAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULButtonAccessible protected
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULButtonAccessible::ContainsMenu()
|
||||
{
|
||||
static nsIContent::AttrValuesArray strings[] =
|
||||
|
@ -291,9 +291,9 @@ nsXULDropmarkerAccessible::ActionCount()
|
|||
return 1;
|
||||
}
|
||||
|
||||
PRBool nsXULDropmarkerAccessible::DropmarkerOpen(PRBool aToggleOpen)
|
||||
bool nsXULDropmarkerAccessible::DropmarkerOpen(bool aToggleOpen)
|
||||
{
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
|
||||
nsCOMPtr<nsIDOMXULButtonElement> parentButtonElement =
|
||||
do_QueryInterface(mContent->GetParent());
|
||||
|
@ -422,7 +422,7 @@ nsXULCheckboxAccessible::NativeState()
|
|||
nsCOMPtr<nsIDOMXULCheckboxElement> xulCheckboxElement =
|
||||
do_QueryInterface(mContent);
|
||||
if (xulCheckboxElement) {
|
||||
PRBool checked = PR_FALSE;
|
||||
bool checked = false;
|
||||
xulCheckboxElement->GetChecked(&checked);
|
||||
if (checked) {
|
||||
state |= states::CHECKED;
|
||||
|
@ -515,7 +515,7 @@ nsXULRadioButtonAccessible::NativeState()
|
|||
nsCOMPtr<nsIDOMXULSelectControlItemElement> radioButton =
|
||||
do_QueryInterface(mContent);
|
||||
if (radioButton) {
|
||||
PRBool selected = PR_FALSE; // Radio buttons can be selected
|
||||
bool selected = false; // Radio buttons can be selected
|
||||
radioButton->GetSelected(&selected);
|
||||
if (selected) {
|
||||
state |= states::CHECKED;
|
||||
|
@ -658,7 +658,7 @@ nsXULToolbarButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||
*aSetSize = setSize;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULToolbarButtonAccessible::IsSeparator(nsAccessible *aAccessible)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
|
@ -848,7 +848,7 @@ NS_IMETHODIMP nsXULTextFieldAccessible::DoAction(PRUint8 index)
|
|||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULTextFieldAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -89,7 +89,7 @@ protected:
|
|||
virtual void CacheChildren();
|
||||
|
||||
// nsXULButtonAccessible
|
||||
PRBool ContainsMenu();
|
||||
bool ContainsMenu();
|
||||
};
|
||||
|
||||
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
virtual PRUint8 ActionCount();
|
||||
|
||||
private:
|
||||
PRBool DropmarkerOpen(PRBool aToggleOpen);
|
||||
bool DropmarkerOpen(bool aToggleOpen);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -213,7 +213,7 @@ public:
|
|||
PRInt32 *aSetSize);
|
||||
|
||||
// nsXULToolbarButtonAccessible
|
||||
static PRBool IsSeparator(nsAccessible *aAccessible);
|
||||
static bool IsSeparator(nsAccessible *aAccessible);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -267,7 +267,7 @@ public:
|
|||
virtual void ApplyARIAState(PRUint64* aState);
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
|
|
@ -162,7 +162,7 @@ nsXULListboxAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
return NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULListboxAccessible::IsMulticolumn()
|
||||
{
|
||||
PRInt32 numColumns = 0;
|
||||
|
@ -440,7 +440,7 @@ nsXULListboxAccessible::GetRowDescription(PRInt32 aRow, nsAString& aDescription)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULListboxAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
||||
nsXULListboxAccessible::IsColumnSelected(PRInt32 aColumn, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -466,7 +466,7 @@ nsXULListboxAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULListboxAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
||||
nsXULListboxAccessible::IsRowSelected(PRInt32 aRow, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -488,7 +488,7 @@ nsXULListboxAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsXULListboxAccessible::IsCellSelected(PRInt32 aRowIndex, PRInt32 aColumnIndex,
|
||||
PRBool *aIsSelected)
|
||||
bool *aIsSelected)
|
||||
{
|
||||
return IsRowSelected(aRowIndex, aIsSelected);
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ nsXULListboxAccessible::UnselectColumn(PRInt32 aColumn)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULListboxAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
|
||||
nsXULListboxAccessible::IsProbablyForLayout(bool *aIsProbablyForLayout)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsProbablyForLayout);
|
||||
*aIsProbablyForLayout = PR_FALSE;
|
||||
|
@ -852,7 +852,7 @@ nsXULListboxAccessible::IsActiveWidget() const
|
|||
do_QueryInterface(mContent->GetParent());
|
||||
|
||||
if (autoCompletePopupElm) {
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
autoCompletePopupElm->GetPopupOpen(&isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ nsXULListboxAccessible::AreItemsOperable() const
|
|||
do_QueryInterface(mContent->GetParent());
|
||||
|
||||
if (autoCompletePopupElm) {
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
autoCompletePopupElm->GetPopupOpen(&isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ nsXULListitemAccessible::NativeState()
|
|||
do_QueryInterface(mContent);
|
||||
|
||||
if (listItem) {
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
listItem->GetSelected(&isSelected);
|
||||
if (isSelected)
|
||||
states |= states::SELECTED;
|
||||
|
@ -1029,7 +1029,7 @@ NS_IMETHODIMP nsXULListitemAccessible::GetActionName(PRUint8 aIndex, nsAString&
|
|||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULListitemAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
// That indicates we should walk anonymous children for listitems
|
||||
|
@ -1248,7 +1248,7 @@ nsXULListCellAccessible::GetRowHeaderCells(nsIArray **aHeaderCells)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULListCellAccessible::IsSelected(PRBool *aIsSelected)
|
||||
nsXULListCellAccessible::IsSelected(bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
virtual nsAccessible* ContainerWidget() const;
|
||||
|
||||
protected:
|
||||
PRBool IsMulticolumn();
|
||||
bool IsMulticolumn();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -140,7 +140,7 @@ public:
|
|||
virtual PRUint64 NativeState();
|
||||
virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
||||
PRInt32 *aSetSize);
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
// Widgets
|
||||
virtual nsAccessible* ContainerWidget() const;
|
||||
|
@ -152,7 +152,7 @@ protected:
|
|||
nsAccessible *GetListAccessible();
|
||||
|
||||
private:
|
||||
PRBool mIsCheckbox;
|
||||
bool mIsCheckbox;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -186,7 +186,7 @@ nsXULSelectableAccessible::AddItemToSelection(PRUint32 aIndex)
|
|||
if (!itemElm)
|
||||
return false;
|
||||
|
||||
PRBool isItemSelected = PR_FALSE;
|
||||
bool isItemSelected = false;
|
||||
itemElm->GetSelected(&isItemSelected);
|
||||
if (isItemSelected)
|
||||
return true;
|
||||
|
@ -214,7 +214,7 @@ nsXULSelectableAccessible::RemoveItemFromSelection(PRUint32 aIndex)
|
|||
if (!itemElm)
|
||||
return false;
|
||||
|
||||
PRBool isItemSelected = PR_FALSE;
|
||||
bool isItemSelected = false;
|
||||
itemElm->GetSelected(&isItemSelected);
|
||||
if (!isItemSelected)
|
||||
return true;
|
||||
|
@ -242,7 +242,7 @@ nsXULSelectableAccessible::IsItemSelected(PRUint32 aIndex)
|
|||
if (!itemElm)
|
||||
return false;
|
||||
|
||||
PRBool isItemSelected = PR_FALSE;
|
||||
bool isItemSelected = false;
|
||||
itemElm->GetSelected(&isItemSelected);
|
||||
return isItemSelected;
|
||||
}
|
||||
|
@ -343,17 +343,17 @@ nsXULMenuitemAccessible::NativeState()
|
|||
}
|
||||
|
||||
// Combo box listitem
|
||||
PRBool isComboboxOption = (Role() == nsIAccessibleRole::ROLE_COMBOBOX_OPTION);
|
||||
bool isComboboxOption = (Role() == nsIAccessibleRole::ROLE_COMBOBOX_OPTION);
|
||||
if (isComboboxOption) {
|
||||
// Is selected?
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement>
|
||||
item(do_QueryInterface(mContent));
|
||||
NS_ENSURE_TRUE(item, state);
|
||||
item->GetSelected(&isSelected);
|
||||
|
||||
// Is collapsed?
|
||||
PRBool isCollapsed = PR_FALSE;
|
||||
bool isCollapsed = false;
|
||||
nsAccessible* parent = Parent();
|
||||
if (parent && parent->State() & states::INVISIBLE)
|
||||
isCollapsed = PR_TRUE;
|
||||
|
@ -561,7 +561,7 @@ nsXULMenuitemAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||
aSetSize);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULMenuitemAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
// That indicates we don't walk anonymous children for menuitems
|
||||
|
@ -714,7 +714,7 @@ nsXULMenupopupAccessible::NativeState()
|
|||
|
||||
#ifdef DEBUG_A11Y
|
||||
// We are onscreen if our parent is active
|
||||
PRBool isActive = mContent->HasAttr(kNameSpaceID_None,
|
||||
bool isActive = mContent->HasAttr(kNameSpaceID_None,
|
||||
nsGkAtoms::menuactive);
|
||||
if (!isActive) {
|
||||
nsAccessible* parent = Parent();
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
||||
PRInt32 *aSetSize);
|
||||
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
|
|
@ -188,7 +188,7 @@ nsXULSliderAccessible::SetCurrentValue(double aValue)
|
|||
return SetSliderAttr(nsGkAtoms::curpos, aValue);
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULSliderAccessible::GetAllowsAnonChildAccessibles()
|
||||
{
|
||||
// Do not allow anonymous xul:slider be accessible.
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
// nsAccessible
|
||||
virtual PRUint32 NativeRole();
|
||||
virtual PRUint64 NativeState();
|
||||
virtual PRBool GetAllowsAnonChildAccessibles();
|
||||
virtual bool GetAllowsAnonChildAccessibles();
|
||||
|
||||
// ActionAccessible
|
||||
virtual PRUint8 ActionCount();
|
||||
|
|
|
@ -131,7 +131,7 @@ nsXULTabAccessible::NativeState()
|
|||
state &= ~states::SELECTED;
|
||||
nsCOMPtr<nsIDOMXULSelectControlItemElement> tab(do_QueryInterface(mContent));
|
||||
if (tab) {
|
||||
PRBool selected = PR_FALSE;
|
||||
bool selected = false;
|
||||
if (NS_SUCCEEDED(tab->GetSelected(&selected)) && selected)
|
||||
state |= states::SELECTED;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ nsXULTreeAccessible::NativeState()
|
|||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
NS_ENSURE_TRUE(selection, state);
|
||||
|
||||
PRBool isSingle = PR_FALSE;
|
||||
bool isSingle = false;
|
||||
nsresult rv = selection->GetSingle(&isSingle);
|
||||
NS_ENSURE_SUCCESS(rv, state);
|
||||
|
||||
|
@ -329,7 +329,7 @@ nsXULTreeAccessible::AddItemToSelection(PRUint32 aIndex)
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
selection->IsSelected(aIndex, &isSelected);
|
||||
if (!isSelected)
|
||||
selection->ToggleSelect(aIndex);
|
||||
|
@ -345,7 +345,7 @@ nsXULTreeAccessible::RemoveItemFromSelection(PRUint32 aIndex)
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
selection->IsSelected(aIndex, &isSelected);
|
||||
if (isSelected)
|
||||
selection->ToggleSelect(aIndex);
|
||||
|
@ -361,7 +361,7 @@ nsXULTreeAccessible::IsItemSelected(PRUint32 aIndex)
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
selection->IsSelected(aIndex, &isSelected);
|
||||
return isSelected;
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ nsXULTreeAccessible::SelectAll()
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool single = PR_FALSE;
|
||||
bool single = false;
|
||||
selection->GetSingle(&single);
|
||||
if (!single) {
|
||||
selection->SelectAll();
|
||||
|
@ -471,7 +471,7 @@ nsXULTreeAccessible::IsActiveWidget() const
|
|||
do_QueryInterface(mContent->GetParent());
|
||||
|
||||
if (autoCompletePopupElm) {
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
autoCompletePopupElm->GetPopupOpen(&isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ nsXULTreeAccessible::AreItemsOperable() const
|
|||
do_QueryInterface(mContent->GetParent());
|
||||
|
||||
if (autoCompletePopupElm) {
|
||||
PRBool isOpen = PR_FALSE;
|
||||
bool isOpen = false;
|
||||
autoCompletePopupElm->GetPopupOpen(&isOpen);
|
||||
return isOpen;
|
||||
}
|
||||
|
@ -781,7 +781,7 @@ nsXULTreeItemAccessibleBase::GetBounds(PRInt32 *aX, PRInt32 *aY,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeItemAccessibleBase::SetSelected(PRBool aSelect)
|
||||
nsXULTreeItemAccessibleBase::SetSelected(bool aSelect)
|
||||
{
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -789,7 +789,7 @@ nsXULTreeItemAccessibleBase::SetSelected(PRBool aSelect)
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
selection->IsSelected(mRow, &isSelected);
|
||||
if (isSelected != aSelect)
|
||||
selection->ToggleSelect(mRow);
|
||||
|
@ -855,7 +855,7 @@ nsXULTreeItemAccessibleBase::GetActionName(PRUint8 aIndex, nsAString& aName)
|
|||
}
|
||||
|
||||
if (aIndex == eAction_Expand && IsExpandable()) {
|
||||
PRBool isContainerOpen;
|
||||
bool isContainerOpen;
|
||||
mTreeView->IsContainerOpen(mRow, &isContainerOpen);
|
||||
if (isContainerOpen)
|
||||
aName.AssignLiteral("collapse");
|
||||
|
@ -983,7 +983,7 @@ nsXULTreeItemAccessibleBase::NativeState()
|
|||
|
||||
// expanded/collapsed state
|
||||
if (IsExpandable()) {
|
||||
PRBool isContainerOpen;
|
||||
bool isContainerOpen;
|
||||
mTreeView->IsContainerOpen(mRow, &isContainerOpen);
|
||||
state |= isContainerOpen ? states::EXPANDED : states::COLLAPSED;
|
||||
}
|
||||
|
@ -992,7 +992,7 @@ nsXULTreeItemAccessibleBase::NativeState()
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
selection->IsSelected(mRow, &isSelected);
|
||||
if (isSelected)
|
||||
state |= states::SELECTED;
|
||||
|
@ -1072,13 +1072,13 @@ nsXULTreeItemAccessibleBase::GetSiblingAtOffset(PRInt32 aOffset,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeItemAccessibleBase: protected implementation
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULTreeItemAccessibleBase::IsExpandable()
|
||||
{
|
||||
PRBool isContainer = PR_FALSE;
|
||||
bool isContainer = false;
|
||||
mTreeView->IsContainer(mRow, &isContainer);
|
||||
if (isContainer) {
|
||||
PRBool isEmpty = PR_FALSE;
|
||||
bool isEmpty = false;
|
||||
mTreeView->IsContainerEmpty(mRow, &isEmpty);
|
||||
if (!isEmpty) {
|
||||
nsCOMPtr<nsITreeColumns> columns;
|
||||
|
@ -1170,7 +1170,7 @@ nsXULTreeItemAccessible::IsDefunct() const
|
|||
return nsXULTreeItemAccessibleBase::IsDefunct() || !mColumn;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULTreeItemAccessible::Init()
|
||||
{
|
||||
if (!nsXULTreeItemAccessibleBase::Init())
|
||||
|
|
|
@ -192,7 +192,7 @@ public:
|
|||
NS_IMETHOD GetBounds(PRInt32 *aX, PRInt32 *aY,
|
||||
PRInt32 *aWidth, PRInt32 *aHeight);
|
||||
|
||||
NS_IMETHOD SetSelected(PRBool aSelect);
|
||||
NS_IMETHOD SetSelected(bool aSelect);
|
||||
NS_IMETHOD TakeFocus();
|
||||
|
||||
NS_IMETHOD GroupPosition(PRInt32 *aGroupLevel,
|
||||
|
@ -252,7 +252,7 @@ protected:
|
|||
/**
|
||||
* Return true if the tree item accessible is expandable (contains subrows).
|
||||
*/
|
||||
PRBool IsExpandable();
|
||||
bool IsExpandable();
|
||||
|
||||
/**
|
||||
* Return name for cell at the given column.
|
||||
|
@ -287,7 +287,7 @@ public:
|
|||
|
||||
// nsAccessNode
|
||||
virtual bool IsDefunct() const;
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
virtual void Shutdown();
|
||||
|
||||
// nsAccessible
|
||||
|
|
|
@ -202,7 +202,7 @@ nsXULTreeGridAccessible::GetSelectedCells(nsIArray **aCells)
|
|||
rv = GetRowCount(&rowCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
for (PRInt32 rowIdx = 0; rowIdx < rowCount; rowIdx++) {
|
||||
selection->IsSelected(rowIdx, &isSelected);
|
||||
if (isSelected) {
|
||||
|
@ -248,7 +248,7 @@ nsXULTreeGridAccessible::GetSelectedCellIndices(PRUint32 *aCellsCount,
|
|||
rv = GetRowCount(&rowCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
for (PRInt32 rowIdx = 0, arrayIdx = 0; rowIdx < rowCount; rowIdx++) {
|
||||
selection->IsSelected(rowIdx, &isSelected);
|
||||
if (isSelected) {
|
||||
|
@ -332,7 +332,7 @@ nsXULTreeGridAccessible::GetSelectedRowIndices(PRUint32 *arowCount,
|
|||
rv = GetRowCount(&rowCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool isSelected;
|
||||
bool isSelected;
|
||||
for (PRInt32 rowIdx = 0, arrayIdx = 0; rowIdx < rowCount; rowIdx++) {
|
||||
selection->IsSelected(rowIdx, &isSelected);
|
||||
if (isSelected)
|
||||
|
@ -490,7 +490,7 @@ nsXULTreeGridAccessible::GetRowDescription(PRInt32 aRowIndex,
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridAccessible::IsColumnSelected(PRInt32 aColumnIndex,
|
||||
PRBool *aIsSelected)
|
||||
bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -514,7 +514,7 @@ nsXULTreeGridAccessible::IsColumnSelected(PRInt32 aColumnIndex,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridAccessible::IsRowSelected(PRInt32 aRowIndex, PRBool *aIsSelected)
|
||||
nsXULTreeGridAccessible::IsRowSelected(PRInt32 aRowIndex, bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -531,7 +531,7 @@ nsXULTreeGridAccessible::IsRowSelected(PRInt32 aRowIndex, PRBool *aIsSelected)
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridAccessible::IsCellSelected(PRInt32 aRowIndex, PRInt32 aColumnIndex,
|
||||
PRBool *aIsSelected)
|
||||
bool *aIsSelected)
|
||||
{
|
||||
return IsRowSelected(aRowIndex, aIsSelected);
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ nsXULTreeGridAccessible::UnselectColumn(PRInt32 aColumnIndex)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridAccessible::IsProbablyForLayout(PRBool *aIsProbablyForLayout)
|
||||
nsXULTreeGridAccessible::IsProbablyForLayout(bool *aIsProbablyForLayout)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsProbablyForLayout);
|
||||
*aIsProbablyForLayout = PR_FALSE;
|
||||
|
@ -923,7 +923,7 @@ nsXULTreeGridCellAccessible::GetBounds(PRInt32 *aX, PRInt32 *aY,
|
|||
PRUint8
|
||||
nsXULTreeGridCellAccessible::ActionCount()
|
||||
{
|
||||
PRBool isCycler = PR_FALSE;
|
||||
bool isCycler = false;
|
||||
mColumn->GetCycler(&isCycler);
|
||||
if (isCycler)
|
||||
return 1;
|
||||
|
@ -947,7 +947,7 @@ nsXULTreeGridCellAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRBool isCycler = PR_FALSE;
|
||||
bool isCycler = false;
|
||||
mColumn->GetCycler(&isCycler);
|
||||
if (isCycler) {
|
||||
aName.AssignLiteral("cycle");
|
||||
|
@ -979,7 +979,7 @@ nsXULTreeGridCellAccessible::DoAction(PRUint8 aIndex)
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRBool isCycler = PR_FALSE;
|
||||
bool isCycler = false;
|
||||
mColumn->GetCycler(&isCycler);
|
||||
if (isCycler) {
|
||||
DoCommand();
|
||||
|
@ -1107,7 +1107,7 @@ nsXULTreeGridCellAccessible::GetRowHeaderCells(nsIArray **aHeaderCells)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXULTreeGridCellAccessible::IsSelected(PRBool *aIsSelected)
|
||||
nsXULTreeGridCellAccessible::IsSelected(bool *aIsSelected)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsSelected);
|
||||
*aIsSelected = PR_FALSE;
|
||||
|
@ -1132,7 +1132,7 @@ nsXULTreeGridCellAccessible::IsDefunct() const
|
|||
!mColumn;
|
||||
}
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULTreeGridCellAccessible::Init()
|
||||
{
|
||||
if (!nsLeafAccessible::Init())
|
||||
|
@ -1187,7 +1187,7 @@ nsXULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAtt
|
|||
stringIdx);
|
||||
|
||||
// "cycles" attribute
|
||||
PRBool isCycler = PR_FALSE;
|
||||
bool isCycler = false;
|
||||
nsresult rv = mColumn->GetCycler(&isCycler);
|
||||
if (NS_SUCCEEDED(rv) && isCycler)
|
||||
nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::cycles,
|
||||
|
@ -1211,7 +1211,7 @@ nsXULTreeGridCellAccessible::NativeState()
|
|||
nsCOMPtr<nsITreeSelection> selection;
|
||||
mTreeView->GetSelection(getter_AddRefs(selection));
|
||||
if (selection) {
|
||||
PRBool isSelected = PR_FALSE;
|
||||
bool isSelected = false;
|
||||
selection->IsSelected(mRow, &isSelected);
|
||||
if (isSelected)
|
||||
states |= states::SELECTED;
|
||||
|
@ -1261,7 +1261,7 @@ nsXULTreeGridCellAccessible::CellInvalidated()
|
|||
if (type == nsITreeColumn::TYPE_CHECKBOX) {
|
||||
mTreeView->GetCellValue(mRow, mColumn, textEquiv);
|
||||
if (mCachedTextEquiv != textEquiv) {
|
||||
PRBool isEnabled = textEquiv.EqualsLiteral("true");
|
||||
bool isEnabled = textEquiv.EqualsLiteral("true");
|
||||
nsRefPtr<AccEvent> accEvent =
|
||||
new AccStateChangeEvent(this, states::CHECKED, isEnabled);
|
||||
nsEventShell::FireEvent(accEvent);
|
||||
|
@ -1322,12 +1322,12 @@ nsXULTreeGridCellAccessible::DispatchClickEvent(nsIContent *aContent,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsXULTreeGridCellAccessible: protected implementation
|
||||
|
||||
PRBool
|
||||
bool
|
||||
nsXULTreeGridCellAccessible::IsEditable() const
|
||||
{
|
||||
// XXX: logic corresponds to tree.xml, it's preferable to have interface
|
||||
// method to check it.
|
||||
PRBool isEditable = PR_FALSE;
|
||||
bool isEditable = false;
|
||||
nsresult rv = mTreeView->IsEditable(mRow, mColumn, &isEditable);
|
||||
if (NS_FAILED(rv) || !isEditable)
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -156,7 +156,7 @@ public:
|
|||
|
||||
// nsAccessNode
|
||||
virtual bool IsDefunct() const;
|
||||
virtual PRBool Init();
|
||||
virtual bool Init();
|
||||
virtual bool IsPrimaryForNode() const;
|
||||
|
||||
// nsAccessible
|
||||
|
@ -194,7 +194,7 @@ protected:
|
|||
/**
|
||||
* Return true if value of cell can be modified.
|
||||
*/
|
||||
PRBool IsEditable() const;
|
||||
bool IsEditable() const;
|
||||
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@
|
|||
<!-- no name from subtree because it holds whitespaces only -->
|
||||
<a id="from_label_ignore_ws_subtree" href="about:" title="about"> </a>
|
||||
|
||||
<!-- label element, label contains the button -->
|
||||
<!-- label element, label contains control -->
|
||||
<label>text<button id="btn_label_inside">10</button>text</label>
|
||||
<br/>
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче