Skip to content

Commit d2b7021

Browse files
committed
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG-- rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
1 parent d8b65e2 commit d2b7021

File tree

3,264 files changed

+30136
-30137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,264 files changed

+30136
-30137
lines changed

accessible/public/nsIAccessibilityService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class nsIAccessibilityService : public nsIAccessibleRetrieval
8383
* should be returned from the cache or can be created
8484
*/
8585
virtual nsAccessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
86-
PRBool aCanCreate) = 0;
86+
bool aCanCreate) = 0;
8787

8888
/**
8989
* Creates accessible for the given DOM node or frame.

accessible/src/atk/nsAccessibleWrap.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ nsAccessibleWrap::Shutdown()
320320
nsAccessible::Shutdown();
321321
}
322322

323-
MaiHyperlink* nsAccessibleWrap::GetMaiHyperlink(PRBool aCreate /* = PR_TRUE */)
323+
MaiHyperlink* nsAccessibleWrap::GetMaiHyperlink(bool aCreate /* = true */)
324324
{
325325
// make sure mAtkObject is created
326326
GetAtkObject();
@@ -550,7 +550,7 @@ GetUniqueMaiAtkTypeName(PRUint16 interfacesBits)
550550
return name;
551551
}
552552

553-
PRBool nsAccessibleWrap::IsValidObject()
553+
bool nsAccessibleWrap::IsValidObject()
554554
{
555555
// to ensure we are not shut down
556556
return !IsDefunct();
@@ -768,7 +768,7 @@ ConvertToAtkAttributeSet(nsIPersistentProperties* aAttributes)
768768
nsresult rv = aAttributes->Enumerate(getter_AddRefs(propEnum));
769769
NS_ENSURE_SUCCESS(rv, nsnull);
770770

771-
PRBool hasMore;
771+
bool hasMore;
772772
while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) {
773773
nsCOMPtr<nsISupports> sup;
774774
rv = propEnum->GetNext(getter_AddRefs(sup));
@@ -909,7 +909,7 @@ TranslateStates(PRUint64 aState, AtkStateSet* aStateSet)
909909
PRUint64 bitMask = 1;
910910
while (gAtkStateMap[stateIndex].stateMapEntryType != kNoSuchState) {
911911
if (gAtkStateMap[stateIndex].atkState) { // There's potentially an ATK state for this
912-
PRBool isStateOn = (aState & bitMask) != 0;
912+
bool isStateOn = (aState & bitMask) != 0;
913913
if (gAtkStateMap[stateIndex].stateMapEntryType == kMapOpposite) {
914914
isStateOn = !isStateOn;
915915
}
@@ -1319,7 +1319,7 @@ nsAccessibleWrap::FireAtkStateChangeEvent(AccEvent* aEvent,
13191319
AccStateChangeEvent* event = downcast_accEvent(aEvent);
13201320
NS_ENSURE_TRUE(event, NS_ERROR_FAILURE);
13211321

1322-
PRBool isEnabled = event->IsStateEnabled();
1322+
bool isEnabled = event->IsStateEnabled();
13231323
PRInt32 stateIndex = AtkStateMap::GetStateIndexFor(event->GetState());
13241324
if (stateIndex >= 0) {
13251325
NS_ASSERTION(gAtkStateMap[stateIndex].stateMapEntryType != kNoSuchState,
@@ -1353,8 +1353,8 @@ nsAccessibleWrap::FireAtkTextChangedEvent(AccEvent* aEvent,
13531353

13541354
PRInt32 start = event->GetStartOffset();
13551355
PRUint32 length = event->GetLength();
1356-
PRBool isInserted = event->IsTextInserted();
1357-
PRBool isFromUserInput = aEvent->IsFromUserInput();
1356+
bool isInserted = event->IsTextInserted();
1357+
bool isFromUserInput = aEvent->IsFromUserInput();
13581358
char* signal_name = nsnull;
13591359

13601360
if (gAvailableAtkSignals == eUnknown)
@@ -1384,7 +1384,7 @@ nsAccessibleWrap::FireAtkTextChangedEvent(AccEvent* aEvent,
13841384

13851385
nsresult
13861386
nsAccessibleWrap::FireAtkShowHideEvent(AccEvent* aEvent,
1387-
AtkObject *aObject, PRBool aIsAdded)
1387+
AtkObject *aObject, bool aIsAdded)
13881388
{
13891389
if (aIsAdded)
13901390
MAI_LOG_DEBUG(("\n\nReceived: Show event\n"));
@@ -1395,7 +1395,7 @@ nsAccessibleWrap::FireAtkShowHideEvent(AccEvent* aEvent,
13951395
AtkObject *parentObject = getParentCB(aObject);
13961396
NS_ENSURE_STATE(parentObject);
13971397

1398-
PRBool isFromUserInput = aEvent->IsFromUserInput();
1398+
bool isFromUserInput = aEvent->IsFromUserInput();
13991399
char *signal_name = g_strconcat(aIsAdded ? "children_changed::add" : "children_changed::remove",
14001400
isFromUserInput ? "" : kNonUserInputEvent, NULL);
14011401
g_signal_emit_by_name(parentObject, signal_name, indexInParent, aObject, NULL);

accessible/src/atk/nsAccessibleWrap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ class nsAccessibleWrap: public nsAccessible
104104
AtkObject * GetAtkObject(void);
105105
static AtkObject * GetAtkObject(nsIAccessible * acc);
106106

107-
PRBool IsValidObject();
107+
bool IsValidObject();
108108

109109
// get/set the MaiHyperlink object for this nsAccessibleWrap
110-
MaiHyperlink* GetMaiHyperlink(PRBool aCreate = PR_TRUE);
110+
MaiHyperlink* GetMaiHyperlink(bool aCreate = true);
111111
void SetMaiHyperlink(MaiHyperlink* aMaiHyperlink);
112112

113113
static const char * ReturnString(nsAString &aString) {
@@ -122,7 +122,7 @@ class nsAccessibleWrap: public nsAccessible
122122
nsresult FireAtkStateChangeEvent(AccEvent* aEvent, AtkObject *aObject);
123123
nsresult FireAtkTextChangedEvent(AccEvent* aEvent, AtkObject *aObject);
124124
nsresult FireAtkShowHideEvent(AccEvent* aEvent, AtkObject *aObject,
125-
PRBool aIsAdded);
125+
bool aIsAdded);
126126

127127
AtkObject *mAtkObject;
128128

accessible/src/atk/nsApplicationAccessibleWrap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,15 +611,15 @@ toplevel_event_watcher(GSignalInvocationHint* ihint,
611611
return TRUE;
612612
}
613613

614-
PRBool
614+
bool
615615
nsApplicationAccessibleWrap::Init()
616616
{
617617
// XXX following code is copied from widget/src/gtk2/nsWindow.cpp
618618
// we should put it to somewhere that can be used from both modules
619619
// see bug 390761
620620

621621
// check if accessibility enabled/disabled by environment variable
622-
PRBool isGnomeATEnabled = PR_FALSE;
622+
bool isGnomeATEnabled = false;
623623
const char *envValue = PR_GetEnv(sAccEnv);
624624
if (envValue) {
625625
isGnomeATEnabled = !!atoi(envValue);
@@ -752,7 +752,7 @@ gboolean fireRootAccessibleAddedCB(gpointer data)
752752
return FALSE;
753753
}
754754

755-
PRBool
755+
bool
756756
nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
757757
{
758758
if (!nsApplicationAccessible::AppendChild(aChild))
@@ -779,7 +779,7 @@ nsApplicationAccessibleWrap::AppendChild(nsAccessible *aChild)
779779
return PR_TRUE;
780780
}
781781

782-
PRBool
782+
bool
783783
nsApplicationAccessibleWrap::RemoveChild(nsAccessible* aChild)
784784
{
785785
PRInt32 index = aChild->IndexInParent();

accessible/src/atk/nsApplicationAccessibleWrap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class nsApplicationAccessibleWrap: public nsApplicationAccessible
5454
virtual ~nsApplicationAccessibleWrap();
5555

5656
// nsAccessNode
57-
virtual PRBool Init();
57+
virtual bool Init();
5858

5959
// nsAccessible
60-
virtual PRBool AppendChild(nsAccessible* aChild);
61-
virtual PRBool RemoveChild(nsAccessible* aChild);
60+
virtual bool AppendChild(nsAccessible* aChild);
61+
virtual bool RemoveChild(nsAccessible* aChild);
6262

6363
// return the atk object for app root accessible
6464
NS_IMETHOD GetNativeInterface(void **aOutAccessible);

accessible/src/atk/nsDocAccessibleWrap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class nsDocAccessibleWrap: public nsDocAccessible
5454
nsIWeakReference *aShell);
5555
virtual ~nsDocAccessibleWrap();
5656

57-
PRBool mActivated;
57+
bool mActivated;
5858
};
5959

6060
#endif

accessible/src/atk/nsMaiInterfaceTable.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ isColumnSelectedCB(AtkTable *aTable, gint aColumn)
464464
getter_AddRefs(accTable));
465465
NS_ENSURE_TRUE(accTable, FALSE);
466466

467-
PRBool outValue;
467+
bool outValue;
468468
nsresult rv = accTable->IsColumnSelected(aColumn, &outValue);
469469
return NS_FAILED(rv) ? FALSE : static_cast<gboolean>(outValue);
470470
}
@@ -481,7 +481,7 @@ isRowSelectedCB(AtkTable *aTable, gint aRow)
481481
getter_AddRefs(accTable));
482482
NS_ENSURE_TRUE(accTable, FALSE);
483483

484-
PRBool outValue;
484+
bool outValue;
485485
nsresult rv = accTable->IsRowSelected(aRow, &outValue);
486486
return NS_FAILED(rv) ? FALSE : static_cast<gboolean>(outValue);
487487
}
@@ -498,7 +498,7 @@ isCellSelectedCB(AtkTable *aTable, gint aRow, gint aColumn)
498498
getter_AddRefs(accTable));
499499
NS_ENSURE_TRUE(accTable, FALSE);
500500

501-
PRBool outValue;
501+
bool outValue;
502502
nsresult rv = accTable->IsCellSelected(aRow, aColumn, &outValue);
503503
return NS_FAILED(rv) ? FALSE : static_cast<gboolean>(outValue);
504504
}

accessible/src/base/AccEvent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ AccEvent::CaptureIsFromUserInput(EIsFromUserInput aIsFromUserInput)
193193
// decide how to coalesce events created via accessible (instead of node).
194194
AccStateChangeEvent::
195195
AccStateChangeEvent(nsAccessible* aAccessible, PRUint64 aState,
196-
PRBool aIsEnabled, EIsFromUserInput aIsFromUserInput):
196+
bool aIsEnabled, EIsFromUserInput aIsFromUserInput):
197197
AccEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, aAccessible,
198198
aIsFromUserInput, eAllowDupes),
199199
mState(aState), mIsEnabled(aIsEnabled)
200200
{
201201
}
202202

203203
AccStateChangeEvent::
204-
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, PRBool aIsEnabled):
204+
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, bool aIsEnabled):
205205
AccEvent(::nsIAccessibleEvent::EVENT_STATE_CHANGE, aNode,
206206
eAutoDetect, eAllowDupes),
207207
mState(aState), mIsEnabled(aIsEnabled)
@@ -244,7 +244,7 @@ AccStateChangeEvent::CreateXPCOMObject()
244244
// XXX revisit this when coalescence is faster (eCoalesceFromSameSubtree)
245245
AccTextChangeEvent::
246246
AccTextChangeEvent(nsAccessible* aAccessible, PRInt32 aStart,
247-
const nsAString& aModifiedText, PRBool aIsInserted,
247+
const nsAString& aModifiedText, bool aIsInserted,
248248
EIsFromUserInput aIsFromUserInput)
249249
: AccEvent(aIsInserted ?
250250
static_cast<PRUint32>(nsIAccessibleEvent::EVENT_TEXT_INSERTED) :

accessible/src/base/AccEvent.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class AccEvent
103103
// AccEvent
104104
PRUint32 GetEventType() const { return mEventType; }
105105
EEventRule GetEventRule() const { return mEventRule; }
106-
PRBool IsFromUserInput() const { return mIsFromUserInput; }
106+
bool IsFromUserInput() const { return mIsFromUserInput; }
107107

108108
nsAccessible *GetAccessible();
109109
nsDocAccessible* GetDocAccessible();
@@ -152,7 +152,7 @@ class AccEvent
152152
*/
153153
void CaptureIsFromUserInput(EIsFromUserInput aIsFromUserInput);
154154

155-
PRBool mIsFromUserInput;
155+
bool mIsFromUserInput;
156156
PRUint32 mEventType;
157157
EEventRule mEventRule;
158158
nsRefPtr<nsAccessible> mAccessible;
@@ -169,10 +169,10 @@ class AccStateChangeEvent: public AccEvent
169169
{
170170
public:
171171
AccStateChangeEvent(nsAccessible* aAccessible, PRUint64 aState,
172-
PRBool aIsEnabled,
172+
bool aIsEnabled,
173173
EIsFromUserInput aIsFromUserInput = eAutoDetect);
174174

175-
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, PRBool aIsEnabled);
175+
AccStateChangeEvent(nsINode* aNode, PRUint64 aState, bool aIsEnabled);
176176

177177
AccStateChangeEvent(nsINode* aNode, PRUint64 aState);
178178

@@ -187,11 +187,11 @@ class AccStateChangeEvent: public AccEvent
187187

188188
// AccStateChangeEvent
189189
PRUint64 GetState() const { return mState; }
190-
PRBool IsStateEnabled() const { return mIsEnabled; }
190+
bool IsStateEnabled() const { return mIsEnabled; }
191191

192192
private:
193193
PRUint64 mState;
194-
PRBool mIsEnabled;
194+
bool mIsEnabled;
195195
};
196196

197197

@@ -202,7 +202,7 @@ class AccTextChangeEvent: public AccEvent
202202
{
203203
public:
204204
AccTextChangeEvent(nsAccessible* aAccessible, PRInt32 aStart,
205-
const nsAString& aModifiedText, PRBool aIsInserted,
205+
const nsAString& aModifiedText, bool aIsInserted,
206206
EIsFromUserInput aIsFromUserInput = eAutoDetect);
207207

208208
// AccEvent
@@ -217,13 +217,13 @@ class AccTextChangeEvent: public AccEvent
217217
// AccTextChangeEvent
218218
PRInt32 GetStartOffset() const { return mStart; }
219219
PRUint32 GetLength() const { return mModifiedText.Length(); }
220-
PRBool IsTextInserted() const { return mIsInserted; }
220+
bool IsTextInserted() const { return mIsInserted; }
221221
void GetModifiedText(nsAString& aModifiedText)
222222
{ aModifiedText = mModifiedText; }
223223

224224
private:
225225
PRInt32 mStart;
226-
PRBool mIsInserted;
226+
bool mIsInserted;
227227
nsString mModifiedText;
228228

229229
friend class NotificationController;

accessible/src/base/AccIterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ AccIterator::Next()
7676
continue;
7777
}
7878

79-
PRBool isComplying = mFilterFunc(child);
79+
bool isComplying = mFilterFunc(child);
8080
if (isComplying)
8181
return child;
8282

0 commit comments

Comments
 (0)