Skip to content

Commit

Permalink
Code hygiene: don't use PR_TRUE and PR_FALSE, and use stdint types in…
Browse files Browse the repository at this point in the history
…stead of PRInt types (no bug really, but you could say bug 579517)
  • Loading branch information
ehsan committed Oct 25, 2012
1 parent 2fa0808 commit f3c0ac7
Show file tree
Hide file tree
Showing 62 changed files with 175 additions and 175 deletions.
2 changes: 1 addition & 1 deletion accessible/public/nsIAccessibleEvent.idl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface nsIDOMNode;
* nsCOMPtr<nsIObserverService> observerService =
* do_GetService("@mozilla.org/observer-service;1", &rv);
* if (NS_SUCCEEDED(rv))
* rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
* rv = observerService->AddObserver(this, "accessible-event", true);
*/
[scriptable, uuid(7f66a33a-9ed7-4fd4-87a8-e431b0f43368)]
interface nsIAccessibleEvent : nsISupports
Expand Down
4 changes: 2 additions & 2 deletions content/base/public/nsIImageLoadingContent.idl
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ interface nsIImageLoadingContent : imgINotificationObserver
void forceReload();

/**
* Enables/disables image state forcing. When |aForce| is PR_TRUE, we force
* Enables/disables image state forcing. When |aForce| is true, we force
* nsImageLoadingContent::ImageState() to return |aState|. Call again with |aForce|
* as PR_FALSE to revert ImageState() to its original behaviour.
* as false to revert ImageState() to its original behaviour.
*/
void forceImageState(in boolean aForce, in unsigned long long aState);
};
8 changes: 4 additions & 4 deletions content/base/public/nsISelection.idl
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ interface nsISelection : nsISupports

/**
* Indicates whether the node is part of the selection. If partlyContained
* is set to PR_TRUE, the function returns true when some part of the node
* is part of the selection. If partlyContained is set to PR_FALSE, the
* is set to true, the function returns true when some part of the node
* is part of the selection. If partlyContained is set to false, the
* function only returns true when the entire node is part of the selection.
*/
boolean containsNode(in nsIDOMNode node, in boolean partlyContained);
Expand Down Expand Up @@ -127,8 +127,8 @@ interface nsISelection : nsISupports

/**
* Modifies the cursor Bidi level after a change in keyboard direction
* @param langRTL is PR_TRUE if the new language is right-to-left or
* PR_FALSE if the new language is left-to-right.
* @param langRTL is true if the new language is right-to-left or
* false if the new language is left-to-right.
*/
void selectionLanguageChange(in boolean langRTL);

Expand Down
34 changes: 17 additions & 17 deletions content/base/public/nsISelectionController.idl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ interface nsISelectionController : nsISelectionDisplay
* Set the caret as enabled or disabled. An enabled caret will
* draw or blink when made visible. A disabled caret will never show up.
* Can be called any time.
* @param aEnable PR_TRUE to enable caret. PR_FALSE to disable.
* @param aEnable true to enable caret. false to disable.
* @return always NS_OK
*/

Expand All @@ -108,7 +108,7 @@ interface nsISelectionController : nsISelectionDisplay
/**
* Set the caret readonly or not. An readonly caret will
* draw but not blink when made visible.
* @param aReadOnly PR_TRUE to enable caret. PR_FALSE to disable.
* @param aReadOnly true to enable caret. false to disable.
* @return always NS_OK
*/
void setCaretReadOnly(in boolean readOnly);
Expand All @@ -131,16 +131,16 @@ interface nsISelectionController : nsISelectionDisplay
/**
* Show the caret even in selections. By default the caret is hidden unless the
* selection is collapsed. Use this function to show the caret even in selections.
* @param aVisibility PR_TRUE to show the caret in selections. PR_FALSE to hide.
* @param aVisibility true to show the caret in selections. false to hide.
* @return always NS_OK
*/
void setCaretVisibilityDuringSelection(in boolean visibility);

/** CharacterMove will move the selection one character forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void characterMove(in boolean forward, in boolean extend);
Expand All @@ -161,59 +161,59 @@ interface nsISelectionController : nsISelectionDisplay
[noscript] void characterExtendForBackspace();

/** WordMove will move the selection one word forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/

void wordMove(in boolean forward, in boolean extend);

/** wordExtendForDelete will extend the selection one word forward/backward in the document.
* this method is used internally for handling ctrl[option]-backspace and ctrl[option]-del.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
*/
[noscript] void wordExtendForDelete(in boolean forward);

/** LineMove will move the selection one line forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void lineMove(in boolean forward, in boolean extend);

/** IntraLineMove will move the selection to the front of the line or end of the line
* in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void intraLineMove(in boolean forward, in boolean extend);

/** PageMove will move the selection one page forward/backward in the document.
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void pageMove(in boolean forward, in boolean extend);

/** CompleteScroll will move page view to the top or bottom of the document
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
*/
void completeScroll(in boolean forward);

/** CompleteMove will move page view to the top or bottom of the document
* this will also have the effect of collapsing the selection if the aExtend = PR_FALSE
* this will also have the effect of collapsing the selection if the aExtend = false
* the "point" of selection that is extended is considered the "focus" point.
* or the last point adjusted by the selection.
* @param aForward forward or backward if PR_FALSE
* @param aForward forward or backward if false
* @param aExtend should it collapse the selection of extend it?
*/
void completeMove(in boolean forward, in boolean extend);
Expand Down
2 changes: 1 addition & 1 deletion content/base/public/nsIXMLHttpRequest.idl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ interface nsIXMLHttpRequestUpload : nsIXMLHttpRequestEventTarget {
* nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(myxmlhttpreq));
*
* target->AddEventListener(NS_LITERAL_STRING("load"), mylistener,
* PR_FALSE)
* false)
*
* where mylistener is your event listener object that implements the
* interface nsIDOMEventListener.
Expand Down
6 changes: 3 additions & 3 deletions content/base/src/nsDOMMutationObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class nsDOMMutationRecord : public nsIDOMMutationRecord
public:
nsDOMMutationRecord(const nsAString& aType) : mType(aType)
{
mAttrName.SetIsVoid(PR_TRUE);
mAttrNamespace.SetIsVoid(PR_TRUE);
mPrevValue.SetIsVoid(PR_TRUE);
mAttrName.SetIsVoid(true);
mAttrNamespace.SetIsVoid(true);
mPrevValue.SetIsVoid(true);
}
virtual ~nsDOMMutationRecord() {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
Expand Down
2 changes: 1 addition & 1 deletion content/xtf/public/nsIXTFAttributeHandler.idl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface nsIXTFAttributeHandler : nsISupports

// If the attribute 'name' is unknown the implementation should mark
// the returned string as being 'null' (i.e. return 'null' in JS;
// call SetIsVoid(PR_TRUE) in C++) rather than throw an exception.
// call SetIsVoid(true) in C++) rather than throw an exception.
// A 'void' result will be translated into the attribute missing
// by the wrapper. An empty result will be translated into
// the attribute having no value.
Expand Down
4 changes: 2 additions & 2 deletions docshell/base/nsIDocShellTreeItem.idl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ interface nsIDocShellTreeItem : nsIDocShellTreeNode
* Compares the provided name against the item's name and
* returns the appropriate result.
*
* @return <CODE>PR_TRUE</CODE> if names match;
* <CODE>PR_FALSE</CODE> otherwise.
* @return <CODE>true</CODE> if names match;
* <CODE>false</CODE> otherwise.
*/
boolean nameEquals(in wstring name);

Expand Down
6 changes: 3 additions & 3 deletions dom/interfaces/events/nsIDOMEventTarget.idl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ interface nsIDOMEventTarget : nsISupports
* This is used to create the event target chain and implementations
* should set the necessary members of nsEventChainPreVisitor.
* At least aVisitor.mCanHandle must be set,
* usually also aVisitor.mParentTarget if mCanHandle is PR_TRUE.
* usually also aVisitor.mParentTarget if mCanHandle is true.
* First one tells that this object can handle the aVisitor.mEvent event and
* the latter one is the possible parent object for the event target chain.
* @see nsEventDispatcher.h for more documentation about aVisitor.
Expand All @@ -220,7 +220,7 @@ interface nsIDOMEventTarget : nsISupports
void PreHandleEvent(in nsEventChainPreVisitorRef aVisitor);

/**
* If nsEventChainPreVisitor.mWantsWillHandleEvent is set PR_TRUE,
* If nsEventChainPreVisitor.mWantsWillHandleEvent is set true,
* called just before possible event handlers on this object will be called.
*/
[noscript, nostdcall]
Expand Down Expand Up @@ -263,7 +263,7 @@ interface nsIDOMEventTarget : nsISupports
/**
* Get the event listener manager, the guy you talk to to register for events
* on this node.
* @param aMayCreate If PR_FALSE, returns a listener manager only if
* @param aMayCreate If false, returns a listener manager only if
* one already exists.
*/
[notxpcom, nostdcall]
Expand Down
16 changes: 8 additions & 8 deletions dom/ipc/PBrowser.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ parent:
* Notifies chrome that there is a focus change involving an editable
* object (input, textarea, document, contentEditable. etc.)
*
* focus PR_TRUE if editable object is receiving focus
* PR_FALSE if losing focus
* focus true if editable object is receiving focus
* false if losing focus
* preference Native widget preference for IME updates
* seqno Current seqno value on the chrome side
*/
Expand All @@ -114,7 +114,7 @@ parent:
/**
* Notifies chrome that there has been a change in text content
* One call can encompass both a delete and an insert operation
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
* Only called when NotifyIMEFocus returns true for mWantUpdates
*
* offset Starting offset of the change
* end Ending offset of the range deleted
Expand All @@ -127,7 +127,7 @@ parent:

/**
* Notifies chrome that there has been a change in selection
* Only called when NotifyIMEFocus returns PR_TRUE for mWantUpdates
* Only called when NotifyIMEFocus returns true for mWantUpdates
*
* seqno Current seqno value on the content side
* anchor Offset where the selection started
Expand All @@ -137,7 +137,7 @@ parent:

/**
* Notifies chrome to refresh its text cache
* Only called when NotifyIMEFocus returns PR_TRUE for mWantHints
* Only called when NotifyIMEFocus returns true for mWantHints
*
* text The entire content of the text field
*/
Expand All @@ -146,12 +146,12 @@ parent:
/**
* Instructs chrome to end any pending composition
*
* cancel PR_TRUE if composition should be cancelled
* cancel true if composition should be cancelled
* composition Text to commit before ending the composition
*
* if cancel is PR_TRUE,
* if cancel is true,
* widget should return empty string for composition
* if cancel is PR_FALSE,
* if cancel is false,
* widget should return the current composition text
*/
sync EndIMEComposition(bool cancel) returns (nsString composition);
Expand Down
4 changes: 2 additions & 2 deletions editor/composer/public/nsIEditingSession.idl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ interface nsIEditingSession : nsISupports
* Make this window editable
* @param aWindow nsIDOMWindow, the window the embedder needs to make editable
* @param aEditorType string, "html" "htmlsimple" "text" "textsimple"
* @param aMakeWholeDocumentEditable if PR_TRUE make the whole document in
* @param aMakeWholeDocumentEditable if true make the whole document in
* aWindow editable, otherwise it's the
* embedder who should make the document
* (or part of it) editable.
* @param aInteractive if PR_FALSE turn off scripting and plugins
* @param aInteractive if false turn off scripting and plugins
*/
void makeWindowEditable(in nsIDOMWindow window, in string aEditorType,
in boolean doAfterUriLoad,
Expand Down
4 changes: 2 additions & 2 deletions editor/idl/nsIContentFilter.idl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ interface nsIContentFilter : nsISupports
* The flag is true when the editor intends to delete the selection.
*
* Callers who want to cancel all insertion can simply set
* continueWithInsertion to PR_FALSE and return.
* continueWithInsertion to false and return.
* Note: If cancellation occurs during the "open" event, the editor will
* still be available but will be empty.
*
* Callers who want to allow insertion of the data with no changes
* can simply set continueWithInsertion to PR_TRUE and return.
* can simply set continueWithInsertion to true and return.
*
* Callers who want to modify the content (docFragment) being inserted are
* responsible for updating contentStartNode, contentStartOffset,
Expand Down
26 changes: 13 additions & 13 deletions editor/idl/nsIEditor.idl
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ interface nsIEditor : nsISupports


/** turn the undo system on or off
* @param aEnable if PR_TRUE, the undo system is turned on if available
* if PR_FALSE the undo system is turned off if it
* @param aEnable if true, the undo system is turned on if available
* if false the undo system is turned off if it
* was previously on
* @return if aEnable is PR_TRUE, returns NS_OK if
* @return if aEnable is true, returns NS_OK if
* the undo system could be initialized properly
* if aEnable is PR_FALSE, returns NS_OK.
* if aEnable is false, returns NS_OK.
*/
void enableUndo(in boolean enable);

Expand All @@ -208,8 +208,8 @@ interface nsIEditor : nsISupports
void undo(in unsigned long count);

/** returns state information about the undo system.
* @param aIsEnabled [OUT] PR_TRUE if undo is enabled
* @param aCanUndo [OUT] PR_TRUE if at least one transaction is
* @param aIsEnabled [OUT] true if undo is enabled
* @param aCanUndo [OUT] true if at least one transaction is
* currently ready to be undone.
*/
void canUndo(out boolean isEnabled, out boolean canUndo);
Expand All @@ -227,8 +227,8 @@ interface nsIEditor : nsISupports
void redo(in unsigned long count);

/** returns state information about the redo system.
* @param aIsEnabled [OUT] PR_TRUE if redo is enabled
* @param aCanRedo [OUT] PR_TRUE if at least one transaction is
* @param aIsEnabled [OUT] true if redo is enabled
* @param aCanRedo [OUT] true if at least one transaction is
currently ready to be redone.
*/
void canRedo(out boolean isEnabled, out boolean canRedo);
Expand Down Expand Up @@ -261,8 +261,8 @@ interface nsIEditor : nsISupports
* @param should Set false to suppress changing the selection;
* i.e., before using InsertElement() to insert
* under <head> element
* WARNING: You must be very careful to reset back to PR_TRUE after
* setting PR_FALSE, else selection/caret is trashed
* WARNING: You must be very careful to reset back to true after
* setting false, else selection/caret is trashed
* for further editing.
*/
void setShouldTxnSetSelection(in boolean should);
Expand Down Expand Up @@ -370,9 +370,9 @@ interface nsIEditor : nsISupports
* @param aElement the content element to operate on
* @param aAttribute the string representation of the attribute to get
* @param aResultValue [OUT] the value of aAttribute.
* Only valid if aResultIsSet is PR_TRUE
* @return PR_TRUE if aAttribute is set on the current node,
* PR_FALSE if it is not.
* Only valid if aResultIsSet is true
* @return true if aAttribute is set on the current node,
* false if it is not.
*/
boolean getAttributeValue(in nsIDOMElement aElement,
in AString attributestr,
Expand Down
8 changes: 4 additions & 4 deletions editor/idl/nsIHTMLEditor.idl
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ interface nsIHTMLEditor : nsISupports
* May be null.
* Example: aProperty="font", aAttribute="color",
* aValue="0x00FFFF"
* @param aFirst [OUT] PR_TRUE if the first text node in the
* @param aFirst [OUT] true if the first text node in the
* selection has the property
* @param aAny [OUT] PR_TRUE if any of the text nodes in the
* @param aAny [OUT] true if any of the text nodes in the
* selection have the property
* @param aAll [OUT] PR_TRUE if all of the text nodes in the
* @param aAll [OUT] true if all of the text nodes in the
* selection have the property
*/
void getInlineProperty(in nsIAtom aProperty,
Expand Down Expand Up @@ -230,7 +230,7 @@ interface nsIHTMLEditor : nsISupports
*
* @param aElement The element to insert
* @param aDeleteSelection Delete the selection before inserting
* If aDeleteSelection is PR_FALSE, then the element is inserted
* If aDeleteSelection is false, then the element is inserted
* after the end of the selection for all element except
* Named Anchors, which insert before the selection
*/
Expand Down
Loading

0 comments on commit f3c0ac7

Please sign in to comment.