Bug 690797: Replace PR_TRUE and PR_FALSE with true and false in cocoa widgets. r=smichaud
authorJosh Aas <joshmoz@gmail.com>
Fri, 30 Sep 2011 20:20:33 -0400
changeset 79564 325e330499b4d5dae317233d20907ecf49b2f60b
parent 79563 74f57aac5661bbf63272d9173738554f178dde8f
child 79565 f25928e4847d4b543697bbf5cdb3cbfbd023f275
child 79594 cc23e529907572939eda9bb5fc71dc86d15f8200
push id90
push userffxbld
push dateSun, 29 Jan 2012 07:46:52 +0000
treeherdermozilla-release@acddb6b6a01c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs690797
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 690797: Replace PR_TRUE and PR_FALSE with true and false in cocoa widgets. r=smichaud
widget/src/cocoa/GfxInfo.mm
widget/src/cocoa/TextInputHandler.h
widget/src/cocoa/TextInputHandler.mm
widget/src/cocoa/nsAppShell.mm
widget/src/cocoa/nsChildView.mm
widget/src/cocoa/nsClipboard.mm
widget/src/cocoa/nsCocoaUtils.mm
widget/src/cocoa/nsCocoaWindow.h
widget/src/cocoa/nsCocoaWindow.mm
widget/src/cocoa/nsDeviceContextSpecX.mm
widget/src/cocoa/nsDragService.mm
widget/src/cocoa/nsFilePicker.mm
widget/src/cocoa/nsMenuBarX.mm
widget/src/cocoa/nsMenuItemIconX.mm
widget/src/cocoa/nsMenuItemX.mm
widget/src/cocoa/nsMenuUtilsX.mm
widget/src/cocoa/nsMenuX.mm
widget/src/cocoa/nsNativeThemeCocoa.mm
widget/src/cocoa/nsPrintOptionsX.mm
widget/src/cocoa/nsStandaloneNativeMenu.mm
--- a/widget/src/cocoa/GfxInfo.mm
+++ b/widget/src/cocoa/GfxInfo.mm
@@ -329,17 +329,17 @@ GfxInfo::AddCrashReportAnnotations()
 
 nsresult
 GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32* aStatus,
                               nsAString& aSuggestedDriverVersion,
                               GfxDriverInfo* aDriverInfo /* = nsnull */)
 {
   NS_ENSURE_ARG_POINTER(aStatus);
 
-  aSuggestedDriverVersion.SetIsVoid(PR_TRUE);
+  aSuggestedDriverVersion.SetIsVoid(true);
 
   PRInt32 status = nsIGfxInfo::FEATURE_NO_INFO;
 
   // For now, we don't implement the downloaded blacklist.
   if (aDriverInfo) {
     *aStatus = status;
     return NS_OK;
   }
@@ -352,17 +352,17 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
   {
     status = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
   }
 
   if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS) {
     bool foundGoodDevice = false;
 
     if (!IsATIRadeonX1000(mAdapterVendorID, mAdapterDeviceID)) {
-      foundGoodDevice = PR_TRUE;
+      foundGoodDevice = true;
     }
 
 #if 0
     // CGL reports a list of renderers, some renderers are slow (e.g. software)
     // and AFAIK we can't decide which one will be used among them, so let's implement this by returning NO_INFO
     // if any not-known-to-be-bad renderer is found.
     // The assumption that we make here is that the system will spontaneously use the best/fastest renderer in the list.
     // Note that the presence of software renderer fallbacks means that slow software rendering may be automatically
@@ -387,17 +387,17 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aF
         case kCGLRendererVTBladeXP2ID: // Trident DX8 chip, assuming it's not GL2 capable
         case kCGLRendererMesa3DFXID: // non-programmable
         case kCGLRendererGenericFloatID: // software renderer
         case kCGLRendererGenericID: // software renderer
         case kCGLRendererAppleSWID: // software renderer
           break;
         default:
           if (mRendererIDs[i])
-            foundGoodDevice = PR_TRUE;
+            foundGoodDevice = true;
       }
     }
 #endif
     if (!foundGoodDevice)
       status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
   }
 
   if (aFeature == nsIGfxInfo::FEATURE_WEBGL_OPENGL) {
--- a/widget/src/cocoa/TextInputHandler.h
+++ b/widget/src/cocoa/TextInputHandler.h
@@ -201,75 +201,75 @@ public:
 
   const UCKeyboardLayout* GetUCKeyboardLayout();
 
   bool IsOpenedIMEMode();
   bool IsIMEMode();
 
   bool IsASCIICapable()
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetBoolProperty(kTISPropertyInputSourceIsASCIICapable);
   }
 
   bool IsEnabled()
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetBoolProperty(kTISPropertyInputSourceIsEnabled);
   }
 
   bool GetLanguageList(CFArrayRef &aLanguageList);
   bool GetPrimaryLanguage(CFStringRef &aPrimaryLanguage);
   bool GetPrimaryLanguage(nsAString &aPrimaryLanguage);
 
   bool GetLocalizedName(CFStringRef &aName)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyLocalizedName, aName);
   }
 
   bool GetLocalizedName(nsAString &aName)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyLocalizedName, aName);
   }
 
   bool GetInputSourceID(CFStringRef &aID)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyInputSourceID, aID);
   }
 
   bool GetInputSourceID(nsAString &aID)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyInputSourceID, aID);
   }
 
   bool GetBundleID(CFStringRef &aBundleID)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyBundleID, aBundleID);
   }
 
   bool GetBundleID(nsAString &aBundleID)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyBundleID, aBundleID);
   }
 
   bool GetInputSourceType(CFStringRef &aType)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyInputSourceType, aType);
   }
 
   bool GetInputSourceType(nsAString &aType)
   {
-    NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+    NS_ENSURE_TRUE(mInputSource, false);
     return GetStringProperty(kTISPropertyInputSourceType, aType);
   }
 
   bool IsForRTLLanguage();
   bool IsInitializedByCurrentKeyboardLayout();
 
   enum {
     // 40 is an actual result of the ::LMGetKbdType() when we connect an
@@ -513,20 +513,20 @@ protected:
     }
 
     void Clear()
     {
       if (mKeyEvent) {
         [mKeyEvent release];
         mKeyEvent = nsnull;
       }
-      mKeyDownHandled = PR_FALSE;
-      mKeyPressDispatched = PR_FALSE;
-      mKeyPressHandled = PR_FALSE;
-      mCausedOtherKeyEvents = PR_FALSE;
+      mKeyDownHandled = false;
+      mKeyPressDispatched = false;
+      mKeyPressHandled = false;
+      mCausedOtherKeyEvents = false;
     }
 
     bool KeyDownOrPressHandled()
     {
       return mKeyDownHandled || mKeyPressHandled;
     }
 
   protected:
@@ -567,17 +567,17 @@ protected:
    *
    */
   KeyEventState* PushKeyEvent(NSEvent* aNativeKeyEvent)
   {
     PRUint32 nestCount = mCurrentKeyEvents.Length();
     for (PRUint32 i = 0; i < nestCount; i++) {
       // When the key event is caused by another key event, all key events
       // which are being handled should be marked as "consumed".
-      mCurrentKeyEvents[i].mCausedOtherKeyEvents = PR_TRUE;
+      mCurrentKeyEvents[i].mCausedOtherKeyEvents = true;
     }
     KeyEventState keyEventState(aNativeKeyEvent);
     return mCurrentKeyEvents.InsertElementAt(0, keyEventState);
   }
 
   /**
    * GetCurrentKeyEvent() returns current processing key event.
    */
@@ -631,17 +631,17 @@ protected:
   static bool IsModifierKey(UInt32 aNativeKeyCode);
 
 private:
   struct KeyboardLayoutOverride {
     PRInt32 mKeyboardLayout;
     bool mOverrideEnabled;
 
     KeyboardLayoutOverride() :
-      mKeyboardLayout(0), mOverrideEnabled(PR_FALSE)
+      mKeyboardLayout(0), mOverrideEnabled(false)
     {
     }
   };
 
   KeyboardLayoutOverride mKeyboardOverride;
 };
 
 /**
@@ -654,17 +654,17 @@ public:
 
   /**
    * When starting complex text input for current event on plugin, this is
    * called.  See also the comment of StartComplexTextInputForCurrentEvent() of
    * nsIPluginWidget.
    */
   nsresult StartComplexTextInputForCurrentEvent()
   {
-    mPluginComplexTextInputRequested = PR_TRUE;
+    mPluginComplexTextInputRequested = true;
     return NS_OK;
   }
 
   /**
    * HandleKeyDownEventForPlugin() handles aNativeKeyEvent.
    *
    * @param aNativeKeyEvent       A native NSKeyDown event.
    */
--- a/widget/src/cocoa/TextInputHandler.mm
+++ b/widget/src/cocoa/TextInputHandler.mm
@@ -345,44 +345,44 @@ TISInputSourceWrapper::TranslateToString
      "aModifiers=0x%X, aKbType=0x%X UCKey=%p\n    "
      "Shift: %s, Ctrl: %s, Opt: %s, Cmd: %s, CapsLock: %s, NumLock: %s",
      this, aKeyCode, aModifiers, aKbType, UCKey,
      OnOrOff(aModifiers & shiftKey), OnOrOff(aModifiers & controlKey),
      OnOrOff(aModifiers & optionKey), OnOrOff(aModifiers & cmdKey),
      OnOrOff(aModifiers & alphaLock),
      OnOrOff(aModifiers & kEventKeyModifierNumLockMask)));
 
-  NS_ENSURE_TRUE(UCKey, PR_FALSE);
+  NS_ENSURE_TRUE(UCKey, false);
 
   UInt32 deadKeyState = 0;
   UniCharCount len;
   UniChar chars[5];
   OSStatus err = ::UCKeyTranslate(UCKey, aKeyCode,
                                   kUCKeyActionDown, aModifiers >> 8,
                                   aKbType, kUCKeyTranslateNoDeadKeysMask,
                                   &deadKeyState, 5, &len, chars);
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TISInputSourceWrapper::TranslateToString, err=0x%X, len=%llu",
      this, err, len));
 
-  NS_ENSURE_TRUE(err == noErr, PR_FALSE);
+  NS_ENSURE_TRUE(err == noErr, false);
   if (len == 0) {
-    return PR_TRUE;
+    return true;
   }
-  NS_ENSURE_TRUE(EnsureStringLength(aStr, len), PR_FALSE);
+  NS_ENSURE_TRUE(EnsureStringLength(aStr, len), false);
   NS_ASSERTION(sizeof(PRUnichar) == sizeof(UniChar),
                "size of PRUnichar and size of UniChar are different");
   memcpy(aStr.BeginWriting(), chars, len * sizeof(PRUnichar));
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TISInputSourceWrapper::TranslateToString, aStr=\"%s\"",
      this, NS_ConvertUTF16toUTF8(aStr).get()));
 
-  return PR_TRUE;
+  return true;
 }
 
 PRUint32
 TISInputSourceWrapper::TranslateToChar(UInt32 aKeyCode, UInt32 aModifiers,
                                        UInt32 aKbType)
 {
   nsAutoString str;
   if (!TranslateToString(aKeyCode, aModifiers, aKbType, str) ||
@@ -546,62 +546,62 @@ TISInputSourceWrapper::GetStringProperty
   GetStringProperty(aKey, str);
   nsCocoaUtils::GetStringForNSString((const NSString*)str, aStr);
   return !aStr.IsEmpty();
 }
 
 bool
 TISInputSourceWrapper::IsOpenedIMEMode()
 {
-  NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+  NS_ENSURE_TRUE(mInputSource, false);
   if (!IsIMEMode())
-    return PR_FALSE;
+    return false;
   return !IsASCIICapable();
 }
 
 bool
 TISInputSourceWrapper::IsIMEMode()
 {
-  NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+  NS_ENSURE_TRUE(mInputSource, false);
   CFStringRef str;
   GetInputSourceType(str);
-  NS_ENSURE_TRUE(str, PR_FALSE);
+  NS_ENSURE_TRUE(str, false);
   return ::CFStringCompare(kTISTypeKeyboardInputMode,
                            str, 0) == kCFCompareEqualTo;
 }
 
 bool
 TISInputSourceWrapper::GetLanguageList(CFArrayRef &aLanguageList)
 {
-  NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+  NS_ENSURE_TRUE(mInputSource, false);
   aLanguageList = static_cast<CFArrayRef>(
     ::TISGetInputSourceProperty(mInputSource,
                                 kTISPropertyInputSourceLanguages));
   return aLanguageList != nsnull;
 }
 
 bool
 TISInputSourceWrapper::GetPrimaryLanguage(CFStringRef &aPrimaryLanguage)
 {
-  NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+  NS_ENSURE_TRUE(mInputSource, false);
   CFArrayRef langList;
-  NS_ENSURE_TRUE(GetLanguageList(langList), PR_FALSE);
+  NS_ENSURE_TRUE(GetLanguageList(langList), false);
   if (::CFArrayGetCount(langList) == 0)
-    return PR_FALSE;
+    return false;
   aPrimaryLanguage =
     static_cast<CFStringRef>(::CFArrayGetValueAtIndex(langList, 0));
   return aPrimaryLanguage != nsnull;
 }
 
 bool
 TISInputSourceWrapper::GetPrimaryLanguage(nsAString &aPrimaryLanguage)
 {
-  NS_ENSURE_TRUE(mInputSource, PR_FALSE);
+  NS_ENSURE_TRUE(mInputSource, false);
   CFStringRef primaryLanguage;
-  NS_ENSURE_TRUE(GetPrimaryLanguage(primaryLanguage), PR_FALSE);
+  NS_ENSURE_TRUE(GetPrimaryLanguage(primaryLanguage), false);
   nsCocoaUtils::GetStringForNSString((const NSString*)primaryLanguage,
                                      aPrimaryLanguage);
   return !aPrimaryLanguage.IsEmpty();
 }
 
 bool
 TISInputSourceWrapper::IsForRTLLanguage()
 {
@@ -638,17 +638,17 @@ TISInputSourceWrapper::Clear()
 
   if (mInputSourceList) {
     ::CFRelease(mInputSourceList);
   }
   mInputSourceList = nsnull;
   mInputSource = nsnull;
   mIsRTL = -1;
   mUCKeyboardLayout = nsnull;
-  mOverrideKeyboard = PR_FALSE;
+  mOverrideKeyboard = false;
 }
 
 void
 TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
                                     nsKeyEvent& aKeyEvent)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
@@ -663,17 +663,17 @@ TISInputSourceWrapper::InitKeyEvent(NSEv
 
   NSUInteger modifiers = [aNativeKeyEvent modifierFlags];
   aKeyEvent.isShift   = ((modifiers & NSShiftKeyMask) != 0);
   aKeyEvent.isControl = ((modifiers & NSControlKeyMask) != 0);
   aKeyEvent.isAlt     = ((modifiers & NSAlternateKeyMask) != 0);
   aKeyEvent.isMeta    = ((modifiers & NSCommandKeyMask) != 0);
 
   aKeyEvent.refPoint = nsIntPoint(0, 0);
-  aKeyEvent.isChar = PR_FALSE; // XXX not used in XP level
+  aKeyEvent.isChar = false; // XXX not used in XP level
 
   NSString* str = nil;
   if ([aNativeKeyEvent type] != NSFlagsChanged) {
     str = [aNativeKeyEvent charactersIgnoringModifiers];
   }
   aKeyEvent.keyCode =
     TextInputHandler::ComputeGeckoKeyCode([aNativeKeyEvent keyCode], str);
 
@@ -705,17 +705,17 @@ TISInputSourceWrapper::InitKeyPressEvent
   NS_ASSERTION(aKeyEvent.message == NS_KEY_PRESS,
                "aKeyEvent must be NS_KEY_PRESS event");
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TISInputSourceWrapper::InitKeyPressEvent, aNativeKeyEvent=%p"
      "aKeyEvent.message=%s",
      this, aNativeKeyEvent, GetGeckoKeyEventType(aKeyEvent)));
 
-  aKeyEvent.isChar = PR_TRUE; // this is not a special key  XXX not used in XP
+  aKeyEvent.isChar = true; // this is not a special key  XXX not used in XP
 
   aKeyEvent.charCode = 0;
   NSString* chars = [aNativeKeyEvent characters];
   if ([chars length] > 0) {
     aKeyEvent.charCode = [chars characterAtIndex:0];
   }
 
   // convert control-modified charCode to raw charCode (with appropriate case)
@@ -978,17 +978,17 @@ bool
 TextInputHandler::HandleKeyDownEvent(NSEvent* aNativeEvent)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
 
   if (Destroyed()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p TextInputHandler::HandleKeyDownEvent, "
        "widget has been already destroyed", this));
-    return PR_FALSE;
+    return false;
   }
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TextInputHandler::HandleKeyDownEvent, aNativeEvent=%p, "
      "type=%s, keyCode=%lld (0x%X), modifierFlags=0x%X, characters=\"%s\", "
      "charactersIgnoringModifiers=\"%s\"",
      this, aNativeEvent, GetNativeKeyEventType(aNativeEvent),
      [aNativeEvent keyCode], [aNativeEvent keyCode],
@@ -999,23 +999,23 @@ TextInputHandler::HandleKeyDownEvent(NSE
 
   KeyEventState* currentKeyEvent = PushKeyEvent(aNativeEvent);
   AutoKeyEventStateCleaner remover(this);
 
   BOOL nonDeadKeyPress = [[aNativeEvent characters] length] > 0;
   if (nonDeadKeyPress && !IsIMEComposing()) {
     NSResponder* firstResponder = [[mView window] firstResponder];
 
-    nsKeyEvent keydownEvent(PR_TRUE, NS_KEY_DOWN, mWidget);
+    nsKeyEvent keydownEvent(true, NS_KEY_DOWN, mWidget);
     InitKeyEvent(aNativeEvent, keydownEvent);
 
 #ifndef NP_NO_CARBON
     EventRecord carbonEvent;
     if ([mView pluginEventModel] == NPEventModelCarbon) {
-      ConvertCocoaKeyEventToCarbonEvent(aNativeEvent, carbonEvent, PR_TRUE);
+      ConvertCocoaKeyEventToCarbonEvent(aNativeEvent, carbonEvent, true);
       keydownEvent.pluginEvent = &carbonEvent;
     }
 #endif // #ifndef NP_NO_CARBON
 
     currentKeyEvent->mKeyDownHandled = DispatchEvent(keydownEvent);
     if (Destroyed()) {
       PR_LOG(gLog, PR_LOG_ALWAYS,
         ("%p TextInputHandler::HandleKeyDownEvent, "
@@ -1033,21 +1033,21 @@ TextInputHandler::HandleKeyDownEvent(NSE
       return currentKeyEvent->KeyDownOrPressHandled();
     }
 
     // If this is the context menu key command, send a context menu key event.
     NSUInteger modifierFlags =
       [aNativeEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
     if (modifierFlags == NSControlKeyMask &&
         [[aNativeEvent charactersIgnoringModifiers] isEqualToString:@" "]) {
-      nsMouseEvent contextMenuEvent(PR_TRUE, NS_CONTEXTMENU,
+      nsMouseEvent contextMenuEvent(true, NS_CONTEXTMENU,
                                     [mView widget], nsMouseEvent::eReal,
                                     nsMouseEvent::eContextMenuKey);
       contextMenuEvent.isShift = contextMenuEvent.isControl =
-        contextMenuEvent.isAlt = contextMenuEvent.isMeta = PR_FALSE;
+        contextMenuEvent.isAlt = contextMenuEvent.isMeta = false;
 
       bool cmEventHandled = DispatchEvent(contextMenuEvent);
       PR_LOG(gLog, PR_LOG_ALWAYS,
         ("%p TextInputHandler::HandleKeyDownEvent, "
          "context menu event dispatched, handled=%s%s",
          this, TrueOrFalse(cmEventHandled),
          Destroyed() ? " and widget was destroyed" : ""));
       [mView maybeInitContextMenuTracking];
@@ -1059,17 +1059,17 @@ TextInputHandler::HandleKeyDownEvent(NSE
   // Let Cocoa interpret the key events, caching IsIMEComposing first.
   bool wasComposing = IsIMEComposing();
   bool interpretKeyEventsCalled = false;
   if (IsIMEEnabled() || IsASCIICapableOnly()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p TextInputHandler::HandleKeyDownEvent, calling interpretKeyEvents",
        this));
     [mView interpretKeyEvents:[NSArray arrayWithObject:aNativeEvent]];
-    interpretKeyEventsCalled = PR_TRUE;
+    interpretKeyEventsCalled = true;
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p TextInputHandler::HandleKeyDownEvent, called interpretKeyEvents",
        this));
   }
 
   if (Destroyed()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p TextInputHandler::HandleKeyDownEvent, widget was destroyed",
@@ -1079,17 +1079,17 @@ TextInputHandler::HandleKeyDownEvent(NSE
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TextInputHandler::HandleKeyDownEvent, wasComposing=%s, "
      "IsIMEComposing()=%s",
      this, TrueOrFalse(wasComposing), TrueOrFalse(IsIMEComposing())));
 
   if (!currentKeyEvent->mKeyPressDispatched && nonDeadKeyPress &&
       !wasComposing && !IsIMEComposing()) {
-    nsKeyEvent keypressEvent(PR_TRUE, NS_KEY_PRESS, mWidget);
+    nsKeyEvent keypressEvent(true, NS_KEY_PRESS, mWidget);
     InitKeyEvent(aNativeEvent, keypressEvent);
 
     // If we called interpretKeyEvents and this isn't normal character input
     // then IME probably ate the event for some reason. We do not want to
     // send a key press event in that case.
     // TODO:
     // There are some other cases which IME eats the current event.
     // 1. If key events were nested during calling interpretKeyEvents, it means
@@ -1115,17 +1115,17 @@ TextInputHandler::HandleKeyDownEvent(NSE
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TextInputHandler::HandleKeyDownEvent, "
      "keydown handled=%s, keypress handled=%s",
      this, TrueOrFalse(currentKeyEvent->mKeyDownHandled),
      TrueOrFalse(currentKeyEvent->mKeyPressHandled)));
   return currentKeyEvent->KeyDownOrPressHandled();
 
-  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
+  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
 }
 
 void
 TextInputHandler::HandleKeyUpEvent(NSEvent* aNativeEvent)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
@@ -1135,33 +1135,33 @@ TextInputHandler::HandleKeyUpEvent(NSEve
      "mIgnoreNextKeyUpEvent=%s, IsIMEComposing()=%s",
      this, aNativeEvent, GetNativeKeyEventType(aNativeEvent),
      [aNativeEvent keyCode], [aNativeEvent keyCode],
      [aNativeEvent modifierFlags], GetCharacters([aNativeEvent characters]),
      GetCharacters([aNativeEvent charactersIgnoringModifiers]),
      TrueOrFalse(mIgnoreNextKeyUpEvent), TrueOrFalse(IsIMEComposing())));
 
   if (mIgnoreNextKeyUpEvent) {
-    mIgnoreNextKeyUpEvent = PR_FALSE;
+    mIgnoreNextKeyUpEvent = false;
     return;
   }
 
   if (Destroyed()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p TextInputHandler::HandleKeyUpEvent, "
        "widget has been already destroyed", this));
     return;
   }
 
   // if we don't have any characters we can't generate a keyUp event
   if ([[aNativeEvent characters] length] == 0 || IsIMEComposing()) {
     return;
   }
 
-  nsKeyEvent keyupEvent(PR_TRUE, NS_KEY_UP, mWidget);
+  nsKeyEvent keyupEvent(true, NS_KEY_UP, mWidget);
   InitKeyEvent(aNativeEvent, keyupEvent);
 
   DispatchEvent(keyupEvent);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void
@@ -1185,17 +1185,17 @@ TextInputHandler::HandleFlagsChanged(NSE
      GetKeyNameForNativeKeyCode([aNativeEvent keyCode]), [aNativeEvent keyCode],
      sLastModifierState, TrueOrFalse(IsIMEComposing())));
 
   // CapsLock state and other modifier states are different:
   // CapsLock state does not revert when the CapsLock key goes up, as the
   // modifier state does for other modifier keys on key up.
   if ([aNativeEvent keyCode] == kCapsLockKeyCode) {
     // Fire key down event for caps lock.
-    DispatchKeyEventForFlagsChanged(aNativeEvent, PR_TRUE);
+    DispatchKeyEventForFlagsChanged(aNativeEvent, true);
     if (Destroyed()) {
       return;
     }
     // XXX should we fire keyup event too? The keyup event for CapsLock key
     // is never dispatched on Gecko.
   } else if ([aNativeEvent type] == NSFlagsChanged) {
     // Fire key up/down events for the modifier keys (shift, alt, ctrl, command)
     NSUInteger modifiers =
@@ -1252,17 +1252,17 @@ TextInputHandler::DispatchKeyEventForFla
   PRUint32 message = aDispatchKeyDown ? NS_KEY_DOWN : NS_KEY_UP;
 
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
 #endif // ifndef NP_NO_CARBON
   NPCocoaEvent cocoaEvent;
 
   // Fire a key event.
-  nsKeyEvent keyEvent(PR_TRUE, message, mWidget);
+  nsKeyEvent keyEvent(true, message, mWidget);
   InitKeyEvent(aNativeEvent, keyEvent);
 
   // create event for use by plugins
   if ([mView isPluginView]) {
 #ifndef NP_NO_CARBON
     if ([mView pluginEventModel] == NPEventModelCarbon) {
       ConvertCocoaKeyEventToCarbonEvent(aNativeEvent, carbonEvent,
                                         aDispatchKeyDown);
@@ -1320,21 +1320,21 @@ TextInputHandler::InsertText(NSAttribute
   // enter/return! (Bug 420502)
   if (currentKeyEvent && currentKeyEvent->mKeyPressDispatched) {
     return;
   }
 
   nsRefPtr<nsChildView> kungFuDeathGrip(mWidget);
 
   // Dispatch keypress event with char instead of textEvent
-  nsKeyEvent keypressEvent(PR_TRUE, NS_KEY_PRESS, mWidget);
+  nsKeyEvent keypressEvent(true, NS_KEY_PRESS, mWidget);
   keypressEvent.time      = PR_IntervalNow();
   keypressEvent.charCode  = str.CharAt(0);
   keypressEvent.keyCode   = 0;
-  keypressEvent.isChar    = PR_TRUE;
+  keypressEvent.isChar    = true;
 
   // Don't set other modifiers from the current event, because here in
   // -insertText: they've already been taken into account in creating
   // the input string.
 
   // create event for use by plugins
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
@@ -1344,17 +1344,17 @@ TextInputHandler::InsertText(NSAttribute
     NSEvent* keyEvent = currentKeyEvent->mKeyEvent;
 
     // XXX The ASCII characters inputting mode of egbridge (Japanese IME)
     // might send the keyDown event with wrong keyboard layout if other
     // keyboard layouts are already loaded. In that case, the native event
     // doesn't match to this gecko event...
 #ifndef NP_NO_CARBON
     if ([mView pluginEventModel] == NPEventModelCarbon) {
-      ConvertCocoaKeyEventToCarbonEvent(keyEvent, carbonEvent, PR_TRUE);
+      ConvertCocoaKeyEventToCarbonEvent(keyEvent, carbonEvent, true);
       keypressEvent.pluginEvent = &carbonEvent;
     }
 #endif // #ifndef NP_NO_CARBON
 
     if (currentKeyEvent->mKeyDownHandled) {
       keypressEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;
     }
 
@@ -1378,17 +1378,17 @@ TextInputHandler::InsertText(NSAttribute
   // If mCurrentKeyEvent.mKeyEvent is null and when we implement textInput
   // event of DOM3 Events, we should dispatch it instead of keypress event.
   bool keyPressHandled = DispatchEvent(keypressEvent);
 
   // Note: mWidget might have become null here. Don't count on it from here on.
 
   if (currentKeyEvent) {
     currentKeyEvent->mKeyPressHandled = keyPressHandled;
-    currentKeyEvent->mKeyPressDispatched = PR_TRUE;
+    currentKeyEvent->mKeyPressDispatched = true;
   }
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 bool
 TextInputHandler::DoCommandBySelector(const char* aSelector)
 {
@@ -1401,24 +1401,24 @@ TextInputHandler::DoCommandBySelector(co
      "Destroyed()=%s, keypressHandled=%s, causedOtherKeyEvents=%s",
      this, aSelector ? aSelector : "", TrueOrFalse(Destroyed()),
      currentKeyEvent ?
        TrueOrFalse(currentKeyEvent->mKeyPressHandled) : "N/A",
      currentKeyEvent ?
        TrueOrFalse(currentKeyEvent->mCausedOtherKeyEvents) : "N/A"));
 
   if (currentKeyEvent && !currentKeyEvent->mKeyPressDispatched) {
-    nsKeyEvent keypressEvent(PR_TRUE, NS_KEY_PRESS, mWidget);
+    nsKeyEvent keypressEvent(true, NS_KEY_PRESS, mWidget);
     InitKeyEvent(currentKeyEvent->mKeyEvent, keypressEvent);
     if (currentKeyEvent->mKeyDownHandled ||
         currentKeyEvent->mCausedOtherKeyEvents) {
       keypressEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;
     }
     currentKeyEvent->mKeyPressHandled = DispatchEvent(keypressEvent);
-    currentKeyEvent->mKeyPressDispatched = PR_TRUE;
+    currentKeyEvent->mKeyPressDispatched = true;
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p TextInputHandler::DoCommandBySelector, keypress event "
        "dispatched, Destroyed()=%s, keypressHandled=%s",
        this, TrueOrFalse(Destroyed()),
        TrueOrFalse(currentKeyEvent->mKeyPressHandled)));
   }
 
   return !Destroyed() && currentKeyEvent &&
@@ -1441,17 +1441,17 @@ CFStringRef IMEInputHandler::sLatestIMEO
 IMEInputHandler* IMEInputHandler::sFocusedIMEHandler = nsnull;
 
 // static
 void
 IMEInputHandler::InitStaticMembers()
 {
   if (sStaticMembersInitialized)
     return;
-  sStaticMembersInitialized = PR_TRUE;
+  sStaticMembersInitialized = true;
   // We need to check the keyboard layout changes on all applications.
   CFNotificationCenterRef center = ::CFNotificationCenterGetDistributedCenter();
   // XXX Don't we need to remove the observer at shut down?
   // Mac Dev Center's document doesn't say how to remove the observer if
   // the second parameter is NULL.
   ::CFNotificationCenterAddObserver(center, NULL,
       OnCurrentTextInputSourceChange,
       kTISNotifySelectedKeyboardInputSourceChanged, NULL,
@@ -1682,19 +1682,19 @@ IMEInputHandler::DiscardIMEComposition()
   if (!im) {
     // retry
     mPendingMethods |= kDiscardIMEComposition;
     NS_WARNING("Application is active but there is no currentInputManager");
     ResetTimer();
     return;
   }
 
-  mIgnoreIMECommit = PR_TRUE;
+  mIgnoreIMECommit = true;
   [im markedTextAbandoned: mView];
-  mIgnoreIMECommit = PR_FALSE;
+  mIgnoreIMECommit = false;
 
   NS_OBJC_END_TRY_ABORT_BLOCK
 }
 
 void
 IMEInputHandler::SyncASCIICapableOnly()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@@ -1761,34 +1761,34 @@ IMEInputHandler::ExecutePendingMethods()
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   if (mTimer) {
     mTimer->Cancel();
     mTimer = nsnull;
   }
 
   if (![[NSApplication sharedApplication] isActive]) {
-    mIsInFocusProcessing = PR_FALSE;
+    mIsInFocusProcessing = false;
     // If we're not active, we should retry at focus event
     return;
   }
 
   PRUint32 pendingMethods = mPendingMethods;
   // First, reset the pending method flags because if each methods cannot
   // run now, they can reentry to the pending flags by theirselves.
   mPendingMethods = 0;
 
   if (pendingMethods & kDiscardIMEComposition)
     DiscardIMEComposition();
   if (pendingMethods & kSyncASCIICapableOnly)
     SyncASCIICapableOnly();
   if (pendingMethods & kResetIMEWindowLevel)
     ResetIMEWindowLevel();
 
-  mIsInFocusProcessing = PR_FALSE;
+  mIsInFocusProcessing = false;
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 #pragma mark -
 
 
 /******************************************************************************
@@ -1928,44 +1928,44 @@ IMEInputHandler::DispatchTextEvent(const
      "aText=\"%s\", aAttrString=\"%s\", "
      "aSelectedRange={ location=%llu, length=%llu }, "
      "aDoCommit=%s, Destroyed()=%s",
      this, NS_ConvertUTF16toUTF8(aText).get(),
      GetCharacters([aAttrString string]),
      aSelectedRange.location, aSelectedRange.length,
      TrueOrFalse(aDoCommit), TrueOrFalse(Destroyed())));
 
-  NS_ENSURE_TRUE(!Destroyed(), PR_FALSE);
+  NS_ENSURE_TRUE(!Destroyed(), false);
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
-  nsTextEvent textEvent(PR_TRUE, NS_TEXT_TEXT, mWidget);
+  nsTextEvent textEvent(true, NS_TEXT_TEXT, mWidget);
   textEvent.time = PR_IntervalNow();
   textEvent.theText = aText;
   nsAutoTArray<nsTextRange, 4> textRanges;
   if (!aDoCommit) {
     SetTextRangeList(textRanges, aAttrString, aSelectedRange);
   }
   textEvent.rangeArray = textRanges.Elements();
   textEvent.rangeCount = textRanges.Length();
 
   if (textEvent.theText != mLastDispatchedCompositionString) {
-    nsCompositionEvent compositionUpdate(PR_TRUE, NS_COMPOSITION_UPDATE,
+    nsCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
                                          mWidget);
     compositionUpdate.time = textEvent.time;
     compositionUpdate.data = textEvent.theText;
     mLastDispatchedCompositionString = textEvent.theText;
     DispatchEvent(compositionUpdate);
     if (mIsInFocusProcessing || Destroyed()) {
       PR_LOG(gLog, PR_LOG_ALWAYS,
         ("%p IMEInputHandler::DispatchTextEvent, compositionupdate causes "
          "aborting the composition, mIsInFocusProcessing=%s, Destryoed()=%s",
          this, TrueOrFalse(mIsInFocusProcessing), TrueOrFalse(Destroyed())));
       if (Destroyed()) {
-        return PR_TRUE;
+        return true;
       }
     }
   }
 
   return DispatchEvent(textEvent);
 }
 
 void
@@ -1995,17 +1995,17 @@ IMEInputHandler::InsertTextAsCommittingC
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   nsString str;
   nsCocoaUtils::GetStringForNSString([aAttrString string], str);
 
   if (!IsIMEComposing()) {
     // XXXmnakano Probably, we shouldn't emulate composition in this case.
     // I think that we should just fire DOM3 textInput event if we implement it.
-    nsCompositionEvent compStart(PR_TRUE, NS_COMPOSITION_START, mWidget);
+    nsCompositionEvent compStart(true, NS_COMPOSITION_START, mWidget);
     InitCompositionEvent(compStart);
 
     DispatchEvent(compStart);
     if (Destroyed()) {
       PR_LOG(gLog, PR_LOG_ALWAYS,
         ("%p IMEInputHandler::InsertTextAsCommittingComposition, "
          "destroyed by compositionstart event", this));
       return;
@@ -2017,27 +2017,27 @@ IMEInputHandler::InsertTextAsCommittingC
   if (IgnoreIMECommit()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p IMEInputHandler::InsertTextAsCommittingComposition, "
        "IgnoreIMECommit()=%s", this, TrueOrFalse(IgnoreIMECommit())));
     str.Truncate();
   }
 
   NSRange range = NSMakeRange(0, str.Length());
-  DispatchTextEvent(str, aAttrString, range, PR_TRUE);
+  DispatchTextEvent(str, aAttrString, range, true);
   if (Destroyed()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p IMEInputHandler::InsertTextAsCommittingComposition, "
        "destroyed by text event", this));
     return;
   }
 
   OnUpdateIMEComposition([aAttrString string]);
 
-  nsCompositionEvent compEnd(PR_TRUE, NS_COMPOSITION_END, mWidget);
+  nsCompositionEvent compEnd(true, NS_COMPOSITION_END, mWidget);
   InitCompositionEvent(compEnd);
   compEnd.data = mLastDispatchedCompositionString;
   DispatchEvent(compEnd);
   if (Destroyed()) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p IMEInputHandler::InsertTextAsCommittingComposition, "
        "destroyed by compositionend event", this));
     return;
@@ -2073,22 +2073,22 @@ IMEInputHandler::SetMarkedText(NSAttribu
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   nsString str;
   nsCocoaUtils::GetStringForNSString([aAttrString string], str);
 
   mMarkedRange.length = str.Length();
 
   if (!IsIMEComposing() && !str.IsEmpty()) {
-    nsQueryContentEvent selection(PR_TRUE, NS_QUERY_SELECTED_TEXT,
+    nsQueryContentEvent selection(true, NS_QUERY_SELECTED_TEXT,
                                   mWidget);
     DispatchEvent(selection);
     mMarkedRange.location = selection.mSucceeded ? selection.mReply.mOffset : 0;
 
-    nsCompositionEvent compStart(PR_TRUE, NS_COMPOSITION_START, mWidget);
+    nsCompositionEvent compStart(true, NS_COMPOSITION_START, mWidget);
     InitCompositionEvent(compStart);
 
     DispatchEvent(compStart);
     if (Destroyed()) {
       PR_LOG(gLog, PR_LOG_ALWAYS,
         ("%p IMEInputHandler::SetMarkedText, "
          "destroyed by compositionstart event", this));
       return;
@@ -2105,17 +2105,17 @@ IMEInputHandler::SetMarkedText(NSAttribu
     if (Destroyed()) {
       PR_LOG(gLog, PR_LOG_ALWAYS,
         ("%p IMEInputHandler::SetMarkedText, "
          "destroyed by text event", this));
       return;
     }
 
     if (doCommit) {
-      nsCompositionEvent compEnd(PR_TRUE, NS_COMPOSITION_END, mWidget);
+      nsCompositionEvent compEnd(true, NS_COMPOSITION_END, mWidget);
       InitCompositionEvent(compEnd);
       compEnd.data = mLastDispatchedCompositionString;
       DispatchEvent(compEnd);
       if (Destroyed()) {
         PR_LOG(gLog, PR_LOG_ALWAYS,
           ("%p IMEInputHandler::SetMarkedText, "
            "destroyed by compositionend event", this));
         return;
@@ -2136,17 +2136,17 @@ IMEInputHandler::ConversationIdentifier(
 
   if (Destroyed()) {
     return reinterpret_cast<NSInteger>(mView);
   }
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   // NOTE: The size of NSInteger is same as pointer size.
-  nsQueryContentEvent textContent(PR_TRUE, NS_QUERY_TEXT_CONTENT, mWidget);
+  nsQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, mWidget);
   textContent.InitForQueryTextContent(0, 0);
   DispatchEvent(textContent);
   if (!textContent.mSucceeded) {
     PR_LOG(gLog, PR_LOG_ALWAYS,
       ("%p IMEInputHandler::ConversationIdentifier, Failed", this));
     return reinterpret_cast<NSInteger>(mView);
   }
   // XXX This might return same ID as a previously existing editor if the
@@ -2166,17 +2166,17 @@ IMEInputHandler::GetAttributedSubstringF
 
   if (Destroyed() || aRange.location == NSNotFound || aRange.length == 0) {
     return nil;
   }
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   nsAutoString str;
-  nsQueryContentEvent textContent(PR_TRUE, NS_QUERY_TEXT_CONTENT, mWidget);
+  nsQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, mWidget);
   textContent.InitForQueryTextContent(aRange.location, aRange.length);
   DispatchEvent(textContent);
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::GetAttributedSubstringFromRange, "
      "textContent={ mSucceeded=%s, mReply.mString=\"%s\"",
      this, TrueOrFalse(textContent.mSucceeded),
      NS_ConvertUTF16toUTF8(textContent.mReply.mString).get()));
@@ -2230,17 +2230,17 @@ IMEInputHandler::SelectedRange()
 
   NSRange range = NSMakeRange(NSNotFound, 0);
   if (Destroyed()) {
     return range;
   }
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
-  nsQueryContentEvent selection(PR_TRUE, NS_QUERY_SELECTED_TEXT, mWidget);
+  nsQueryContentEvent selection(true, NS_QUERY_SELECTED_TEXT, mWidget);
   DispatchEvent(selection);
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::SelectedRange, selection={ mSucceeded=%s, "
      "mReply={ mOffset=%llu, mString.Length()=%llu } }",
      this, TrueOrFalse(selection.mSucceeded), selection.mReply.mOffset,
      selection.mReply.mString.Length()));
 
@@ -2273,28 +2273,28 @@ IMEInputHandler::FirstRectForCharacterRa
     return rect;
   }
 
   nsRefPtr<IMEInputHandler> kungFuDeathGrip(this);
 
   nsIntRect r;
   bool useCaretRect = (aRange.length == 0);
   if (!useCaretRect) {
-    nsQueryContentEvent charRect(PR_TRUE, NS_QUERY_TEXT_RECT, mWidget);
+    nsQueryContentEvent charRect(true, NS_QUERY_TEXT_RECT, mWidget);
     charRect.InitForQueryTextRect(aRange.location, 1);
     DispatchEvent(charRect);
     if (charRect.mSucceeded) {
       r = charRect.mReply.mRect;
     } else {
-      useCaretRect = PR_TRUE;
+      useCaretRect = true;
     }
   }
 
   if (useCaretRect) {
-    nsQueryContentEvent caretRect(PR_TRUE, NS_QUERY_CARET_RECT, mWidget);
+    nsQueryContentEvent caretRect(true, NS_QUERY_CARET_RECT, mWidget);
     caretRect.InitForQueryCaretRect(aRange.location);
     DispatchEvent(caretRect);
     if (!caretRect.mSucceeded) {
       return rect;
     }
     r = caretRect.mReply.mRect;
     r.width = 0;
   }
@@ -2365,19 +2365,19 @@ IMEInputHandler::GetValidAttributesForMa
  *  IMEInputHandler implementation #2
  *
  ******************************************************************************/
 
 IMEInputHandler::IMEInputHandler(nsChildView* aWidget,
                                  NSView<mozView> *aNativeView) :
   PluginTextInputHandler(aWidget, aNativeView),
   mPendingMethods(0), mIMECompositionString(nsnull),
-  mIsIMEComposing(PR_FALSE), mIsIMEEnabled(PR_TRUE),
-  mIsASCIICapableOnly(PR_FALSE), mIgnoreIMECommit(PR_FALSE),
-  mIsInFocusProcessing(PR_FALSE)
+  mIsIMEComposing(false), mIsIMEEnabled(true),
+  mIsASCIICapableOnly(false), mIgnoreIMECommit(false),
+  mIsInFocusProcessing(false)
 {
   InitStaticMembers();
 
   mMarkedRange.location = NSNotFound;
   mMarkedRange.length = 0;
 }
 
 IMEInputHandler::~IMEInputHandler()
@@ -2396,26 +2396,26 @@ IMEInputHandler::OnFocusChangeInGecko(bo
 {
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::OnFocusChangeInGecko, aFocus=%s, Destroyed()=%s, "
      "sFocusedIMEHandler=%p",
      this, TrueOrFalse(aFocus), TrueOrFalse(Destroyed()), sFocusedIMEHandler));
 
   // This is called when the native focus is changed and when the native focus
   // isn't changed but the focus is changed in Gecko.
-  // XXX currently, we're not called this method with PR_FALSE, we need to
+  // XXX currently, we're not called this method with false, we need to
   // improve the nsIMEStateManager implementation.
   if (!aFocus) {
     if (sFocusedIMEHandler == this)
       sFocusedIMEHandler = nsnull;
     return;
   }
 
   sFocusedIMEHandler = this;
-  mIsInFocusProcessing = PR_TRUE;
+  mIsInFocusProcessing = true;
 
   // We need to reset the IME's window level by the current focused view of
   // Gecko.  It may be different from mView.  However, we cannot get the
   // new focused view here because the focus change process in Gecko hasn't
   // been finished yet.  So, we should post the job to the todo list.
   mPendingMethods |= kResetIMEWindowLevel;
   ResetTimer();
 }
@@ -2431,41 +2431,41 @@ IMEInputHandler::OnDestroyWidget(nsChild
 
   // If we're not focused, the focused IMEInputHandler may have been
   // created by another widget/nsChildView.
   if (sFocusedIMEHandler && sFocusedIMEHandler != this) {
     sFocusedIMEHandler->OnDestroyWidget(aDestroyingWidget);
   }
 
   if (!PluginTextInputHandler::OnDestroyWidget(aDestroyingWidget)) {
-    return PR_FALSE;
+    return false;
   }
 
   if (IsIMEComposing()) {
     // If our view is in the composition, we should clean up it.
     CancelIMEComposition();
     OnEndIMEComposition();
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 void
 IMEInputHandler::OnStartIMEComposition()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::OnStartIMEComposition, mView=%p, mWidget=%p"
      "currentInputManager=%p, mIsIMEComposing=%s",
      this, mView, mWidget, [NSInputManager currentInputManager],
      TrueOrFalse(mIsIMEComposing)));
 
   NS_ASSERTION(!mIsIMEComposing, "There is a composition already");
-  mIsIMEComposing = PR_TRUE;
+  mIsIMEComposing = true;
 
   mLastDispatchedCompositionString.Truncate();
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void
 IMEInputHandler::OnUpdateIMEComposition(NSString* aIMECompositionString)
@@ -2495,17 +2495,17 @@ IMEInputHandler::OnEndIMEComposition()
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::OnEndIMEComposition, mView=%p, mWidget=%p, "
      "currentInputManager=%p, mIsIMEComposing=%s",
      this, mView, mWidget, [NSInputManager currentInputManager],
      TrueOrFalse(mIsIMEComposing)));
 
   NS_ASSERTION(mIsIMEComposing, "We're not in composition");
 
-  mIsIMEComposing = PR_FALSE;
+  mIsIMEComposing = false;
 
   if (mIMECompositionString) {
     [mIMECompositionString release];
     mIMECompositionString = nsnull;
   }
 
   mLastDispatchedCompositionString.Truncate();
 
@@ -2604,43 +2604,43 @@ IMEInputHandler::CancelIMEComposition()
     return;
 
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::CancelIMEComposition, mIMECompositionString=%s",
      this, GetCharacters(mIMECompositionString)));
 
   // For canceling the current composing, we need to ignore the param of
   // insertText.  But this code is ugly...
-  mIgnoreIMECommit = PR_TRUE;
+  mIgnoreIMECommit = true;
   KillIMEComposition();
-  mIgnoreIMECommit = PR_FALSE;
+  mIgnoreIMECommit = false;
 
   if (!IsIMEComposing())
     return;
 
   // If the composition is still there, KillIMEComposition only kills the
   // composition in TSM.  We also need to kill the our composition too.
   SendCommittedText(@"");
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 bool
 IMEInputHandler::IsFocused()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
-  NS_ENSURE_TRUE(!Destroyed(), PR_FALSE);
+  NS_ENSURE_TRUE(!Destroyed(), false);
   NSWindow* window = [mView window];
-  NS_ENSURE_TRUE(window, PR_FALSE);
+  NS_ENSURE_TRUE(window, false);
   return [window firstResponder] == mView &&
          ([window isMainWindow] || [window isSheet]) &&
          [[NSApplication sharedApplication] isActive];
 
-  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
+  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
 }
 
 bool
 IMEInputHandler::IsIMEOpened()
 {
   TISInputSourceWrapper tis;
   tis.InitByCurrentInputSource();
   return tis.IsOpenedIMEMode();
@@ -2692,17 +2692,17 @@ IMEInputHandler::SetIMEOpenState(bool aO
   // but we haven't found such way...
 
   // Finally, we should refer the system locale but this is a little expensive,
   // we shouldn't retry this (if it was succeeded, we already set
   // sLatestIMEOpenedModeInputSourceID at that time).
   static bool sIsPrefferredIMESearched = false;
   if (sIsPrefferredIMESearched)
     return;
-  sIsPrefferredIMESearched = PR_TRUE;
+  sIsPrefferredIMESearched = true;
   OpenSystemPreferredLanguageIME();
 }
 
 void
 IMEInputHandler::OpenSystemPreferredLanguageIME()
 {
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p IMEInputHandler::OpenSystemPreferredLanguageIME", this));
@@ -2737,17 +2737,17 @@ IMEInputHandler::OpenSystemPreferredLang
           tis.GetInputSourceID(foundTIS);
           PR_LOG(gLog, PR_LOG_ALWAYS,
             ("%p IMEInputHandler::OpenSystemPreferredLanguageIME, "
              "foundTIS=%s, lang=%s",
              this, GetCharacters(foundTIS), GetCharacters(lang)));
         }
 #endif // #ifdef PR_LOGGING
         tis.Select();
-        changed = PR_TRUE;
+        changed = true;
       }
     }
     ::CFRelease(locale);
     if (changed) {
       break;
     }
   }
   ::CFRelease(langList);
@@ -2761,21 +2761,21 @@ IMEInputHandler::OpenSystemPreferredLang
  *
  *  PluginTextInputHandler implementation
  *
  ******************************************************************************/
 
 PluginTextInputHandler::PluginTextInputHandler(nsChildView* aWidget,
                                                NSView<mozView> *aNativeView) :
   TextInputHandlerBase(aWidget, aNativeView),
-  mIgnoreNextKeyUpEvent(PR_FALSE),
+  mIgnoreNextKeyUpEvent(false),
 #ifndef NP_NO_CARBON
-  mPluginTSMDoc(0), mPluginTSMInComposition(PR_FALSE),
+  mPluginTSMDoc(0), mPluginTSMInComposition(false),
 #endif // #ifndef NP_NO_CARBON
-  mPluginComplexTextInputRequested(PR_FALSE)
+  mPluginComplexTextInputRequested(false)
 {
 }
 
 PluginTextInputHandler::~PluginTextInputHandler()
 {
 #ifndef NP_NO_CARBON
   if (mPluginTSMDoc) {
     ::DeleteTSMDocument(mPluginTSMDoc);
@@ -2830,30 +2830,30 @@ PluginTextInputHandler::ConvertUnicodeTo
   *aOutChar = nsnull;
 
   OSStatus err =
     ::UpgradeScriptInfoToTextEncoding(smSystemScript,
                                       kTextLanguageDontCare,
                                       kTextRegionDontCare,
                                       NULL,
                                       &systemEncoding);
-  NS_ENSURE_TRUE(err == noErr, PR_FALSE);
+  NS_ENSURE_TRUE(err == noErr, false);
 
   err = ::CreateUnicodeToTextInfoByEncoding(systemEncoding, &converterInfo);
-  NS_ENSURE_TRUE(err == noErr, PR_FALSE);
+  NS_ENSURE_TRUE(err == noErr, false);
 
   err = ::ConvertFromUnicodeToPString(converterInfo, sizeof(PRUnichar),
                                       &aUniChar, convertedString);
-  NS_ENSURE_TRUE(err == noErr, PR_FALSE);
+  NS_ENSURE_TRUE(err == noErr, false);
 
   *aOutChar = convertedString[1];
   ::DisposeUnicodeToTextInfo(&converterInfo);
-  return PR_TRUE;
-
-  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
+  return true;
+
+  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
 }
 
 /* static */ void
 PluginTextInputHandler::ConvertCocoaKeyEventToCarbonEvent(
                           NSEvent* aCocoaKeyEvent,
                           EventRecord& aCarbonKeyEvent,
                           bool aMakeKeyDownEventIfNSFlagsChanged)
 {
@@ -3029,17 +3029,17 @@ PluginTextInputHandler::HandleCarbonPlug
       return;
     }
 
     NPCocoaEvent cocoaTextEvent;
     nsCocoaUtils::InitNPCocoaEvent(&cocoaTextEvent);
     cocoaTextEvent.type = NPCocoaEventTextInput;
     cocoaTextEvent.data.text.text = (NPNSString*)text;
 
-    nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
+    nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
     nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaTextEvent);
     DispatchEvent(pluginEvent);
 
     ::CFRelease(text);
     free(chars);
 
     return;
   }
@@ -3071,28 +3071,28 @@ PluginTextInputHandler::HandleCarbonPlug
   EventRef cloneEvent = ::CopyEvent(aKeyEvent);
   for (PRUint32 i = 0; i < numCharCodes; ++i) {
     status = ::SetEventParameter(cloneEvent, kEventParamKeyMacCharCodes,
                                  typeChar, 1, charCodes.Elements() + i);
     NS_ENSURE_TRUE(status == noErr, );
 
     EventRecord eventRec;
     if (::ConvertEventRefToEventRecord(cloneEvent, &eventRec)) {
-      nsKeyEvent keydownEvent(PR_TRUE, NS_KEY_DOWN, mWidget);
+      nsKeyEvent keydownEvent(true, NS_KEY_DOWN, mWidget);
 
       PRUint32 keyCode = ComputeGeckoKeyCode(macKeyCode, @"");
       PRUint32 charCode(charCodes.ElementAt(i));
 
       keydownEvent.time = PR_IntervalNow();
       keydownEvent.pluginEvent = &eventRec;
       if (IsSpecialGeckoKey(macKeyCode)) {
         keydownEvent.keyCode = keyCode;
       } else {
         keydownEvent.charCode = charCode;
-        keydownEvent.isChar   = PR_TRUE;
+        keydownEvent.isChar   = true;
       }
       keydownEvent.isShift   = ((modifiers & shiftKey) != 0);
       keydownEvent.isControl = ((modifiers & controlKey) != 0);
       keydownEvent.isAlt     = ((modifiers & optionKey) != 0);
       keydownEvent.isMeta = ((modifiers & cmdKey) != 0); // Should never happen
       DispatchEvent(keydownEvent);
       if (Destroyed()) {
         break;
@@ -3146,82 +3146,82 @@ PluginTextInputHandler::HandleKeyDownEve
 
   ComplexTextInputPanel* ctiPanel =
     [ComplexTextInputPanel sharedComplexTextInputPanel];
 
   // If a composition is in progress then simply let the input panel continue
   // it.
   if (IsInPluginComposition()) {
     // Don't send key up events for key downs associated with compositions.
-    mIgnoreNextKeyUpEvent = PR_TRUE;
+    mIgnoreNextKeyUpEvent = true;
 
     NSString* textString = nil;
     [ctiPanel interpretKeyEvent:aNativeKeyEvent string:&textString];
     if (textString) {
       DispatchCocoaNPAPITextEvent(textString);
     }
 
     return;
   }
 
   // Reset complex text input request flag.
-  mPluginComplexTextInputRequested = PR_FALSE;
+  mPluginComplexTextInputRequested = false;
 
   // Send key down event to the plugin.
-  nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
+  nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
   NPCocoaEvent cocoaEvent;
   ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, cocoaEvent);
   nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
   DispatchEvent(pluginEvent);
   if (Destroyed()) {
     return;
   }
 
   // Start complex text composition if requested.
   if (mPluginComplexTextInputRequested) {
     // Don't send key up events for key downs associated with compositions.
-    mIgnoreNextKeyUpEvent = PR_TRUE;
+    mIgnoreNextKeyUpEvent = true;
 
     NSString* textString = nil;
     [ctiPanel interpretKeyEvent:aNativeKeyEvent string:&textString];
     if (textString) {
       DispatchCocoaNPAPITextEvent(textString);
     }
   }
 
 #else // #ifdef NP_NO_CARBON
 
   bool wasInComposition = false;
   if ([mView pluginEventModel] == NPEventModelCocoa) {
     if (IsInPluginComposition()) {
-      wasInComposition = PR_TRUE;
+      wasInComposition = true;
 
       // Don't send key up events for key downs associated with compositions.
-      mIgnoreNextKeyUpEvent = PR_TRUE;
+      mIgnoreNextKeyUpEvent = true;
     } else {
       // Reset complex text input request flag.
-      mPluginComplexTextInputRequested = PR_FALSE;
+      mPluginComplexTextInputRequested = false;
 
       // Send key down event to the plugin.
-      nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
+      nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
       NPCocoaEvent cocoaEvent;
       ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, cocoaEvent);
       nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
       DispatchEvent(pluginEvent);
       if (Destroyed()) {
         return;
       }
 
       // Only continue if plugin wants complex text input.
       if (!mPluginComplexTextInputRequested) {
         return;
       }
 
       // Don't send key up events for key downs associated with compositions.
-      mIgnoreNextKeyUpEvent = PR_TRUE;
+      mIgnoreNextKeyUpEvent = true;
     }
 
     // Don't send complex text input to a plugin in Cocoa event mode if
     // either the Control key or the Command key is pressed -- even if the
     // plugin has requested it, or we are already in IME composition.  This
     // conforms to our behavior in 64-bit mode and fixes bug 619217.
     NSUInteger modifierFlags = [aNativeKeyEvent modifierFlags];
     if ((modifierFlags & NSControlKeyMask) ||
@@ -3248,34 +3248,34 @@ PluginTextInputHandler::HandleKeyDownEve
 
 #endif // #ifdef NP_NO_CARBON else
 }
 
 void
 PluginTextInputHandler::HandleKeyUpEventForPlugin(NSEvent* aNativeKeyEvent)
 {
   if (mIgnoreNextKeyUpEvent) {
-    mIgnoreNextKeyUpEvent = PR_FALSE;
+    mIgnoreNextKeyUpEvent = false;
     return;
   }
 
   if (Destroyed()) {
     return;
   }
 
   NS_ASSERTION(mView, "mView must not be NULL");
 
   NPEventModel eventModel = [mView pluginEventModel];
   if (eventModel == NPEventModelCocoa) {
     // Don't send key up events to Cocoa plugins during composition.
     if (IsInPluginComposition()) {
       return;
     }
 
-    nsKeyEvent keyupEvent(PR_TRUE, NS_KEY_UP, mWidget);
+    nsKeyEvent keyupEvent(true, NS_KEY_UP, mWidget);
     InitKeyEvent(aNativeKeyEvent, keyupEvent);
     NPCocoaEvent pluginEvent;
     ConvertCocoaKeyEventToNPCocoaEvent(aNativeKeyEvent, pluginEvent);
     keyupEvent.pluginEvent = &pluginEvent;
     DispatchEvent(keyupEvent);
     return;
   }
 
@@ -3300,20 +3300,20 @@ PluginTextInputHandler::HandleKeyUpEvent
     // PluginKeyEventsHandler() never sends keyUp events to
     // HandleCarbonPluginKeyEvent(), so we need to send them to Gecko here.
     // (This means that when commiting text from IME, several keyDown events
     // may be sent to Gecko (in processPluginKeyEvent) for one keyUp event here.
     // But this is how the WebKit does it, and games expect a keyUp event to
     // be sent when it actually happens (they need to be able to detect how
     // long a key has been held down) -- which wouldn't be possible if we sent
     // them from processPluginKeyEvent.)
-    nsKeyEvent keyupEvent(PR_TRUE, NS_KEY_UP, mWidget);
+    nsKeyEvent keyupEvent(true, NS_KEY_UP, mWidget);
     InitKeyEvent(aNativeKeyEvent, keyupEvent);
     EventRecord pluginEvent;
-    ConvertCocoaKeyEventToCarbonEvent(aNativeKeyEvent, pluginEvent, PR_FALSE);
+    ConvertCocoaKeyEventToCarbonEvent(aNativeKeyEvent, pluginEvent, false);
     keyupEvent.pluginEvent = &pluginEvent;
     DispatchEvent(keyupEvent);
     return;
   }
 #endif // #ifndef NP_NO_CARBON
 
 }
 
@@ -3333,21 +3333,21 @@ PluginTextInputHandler::DispatchCocoaNPA
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
 
   NPCocoaEvent cocoaTextEvent;
   nsCocoaUtils::InitNPCocoaEvent(&cocoaTextEvent);
   cocoaTextEvent.type = NPCocoaEventTextInput;
   cocoaTextEvent.data.text.text = (NPNSString*)aString;
 
-  nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_INPUT_EVENT, mWidget);
+  nsPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, mWidget);
   nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaTextEvent);
   return DispatchEvent(pluginEvent);
 
-  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(PR_FALSE);
+  NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
 }
 
 
 #pragma mark -
 
 
 #ifndef NP_NO_CARBON
 
@@ -3412,17 +3412,17 @@ PluginTextInputHandler::DispatchCocoaNPA
   NSWindow *mainWindow = [NSApp mainWindow];
   NSResponder *firstResponder = [mainWindow firstResponder];
   if ([firstResponder isKindOfClass:[ChildView class]]) {
     nsIWidget* widget = [(ChildView*)firstResponder widget];
     if (widget) {
       TextInputHandler* handler =
         static_cast<nsChildView*>(widget)->GetTextInputHandler();
       if (handler) {
-        handler->SetPluginTSMInComposition(PR_FALSE);
+        handler->SetPluginTSMInComposition(false);
       }
     }
   }
   [self PluginTextInputHandler_IMKInputSession_commitComposition];
 }
 
 // This method is called just before we're deallocated.
 - (void)PluginTextInputHandler_IMKInputSession_finishSession
@@ -3430,17 +3430,17 @@ PluginTextInputHandler::DispatchCocoaNPA
   NSWindow *mainWindow = [NSApp mainWindow];
   NSResponder *firstResponder = [mainWindow firstResponder];
   if ([firstResponder isKindOfClass:[ChildView class]]) {
     nsIWidget* widget = [(ChildView*)firstResponder widget];
     if (widget) {
       TextInputHandler* handler =
         static_cast<nsChildView*>(widget)->GetTextInputHandler();
       if (handler) {
-        handler->SetPluginTSMInComposition(PR_FALSE);
+        handler->SetPluginTSMInComposition(false);
       }
     }
   }
   [self PluginTextInputHandler_IMKInputSession_finishSession];
 }
 
 @end
 
@@ -3476,21 +3476,21 @@ bool
 TextInputHandlerBase::OnDestroyWidget(nsChildView* aDestroyingWidget)
 {
   PR_LOG(gLog, PR_LOG_ALWAYS,
     ("%p TextInputHandlerBase::OnDestroyWidget, "
      "aDestroyingWidget=%p, mWidget=%p",
      this, aDestroyingWidget, mWidget));
 
   if (aDestroyingWidget != mWidget) {
-    return PR_FALSE;
+    return false;
   }
 
   mWidget = nsnull;
-  return PR_TRUE;
+  return true;
 }
 
 bool
 TextInputHandlerBase::DispatchEvent(nsGUIEvent& aEvent)
 {
   if (aEvent.message == NS_KEY_PRESS) {
     nsInputEvent& inputEvent = static_cast<nsInputEvent&>(aEvent);
     if (!inputEvent.isMeta) {
@@ -3505,17 +3505,17 @@ TextInputHandlerBase::DispatchEvent(nsGU
 void
 TextInputHandlerBase::InitKeyEvent(NSEvent *aNativeKeyEvent,
                                    nsKeyEvent& aKeyEvent)
 {
   NS_ASSERTION(aNativeKeyEvent, "aNativeKeyEvent must not be NULL");
 
   TISInputSourceWrapper tis;
   if (mKeyboardOverride.mOverrideEnabled) {
-    tis.InitByLayoutID(mKeyboardOverride.mKeyboardLayout, PR_TRUE);
+    tis.InitByLayoutID(mKeyboardOverride.mKeyboardLayout, true);
   } else {
     tis.InitByCurrentKeyboardLayout();
   }
   tis.InitKeyEvent(aNativeKeyEvent, aKeyEvent);
 }
 
 nsresult
 TextInputHandlerBase::SynthesizeNativeKeyEvent(
@@ -3565,17 +3565,17 @@ TextInputHandlerBase::SynthesizeNativeKe
                           keyCode:aNativeKeyCode];
 
   NSEvent* upEvent = sendFlagsChangedEvent ?
     nil : nsCocoaUtils::MakeNewCocoaEventWithType(NSKeyUp, downEvent);
 
   if (downEvent && (sendFlagsChangedEvent || upEvent)) {
     KeyboardLayoutOverride currentLayout = mKeyboardOverride;
     mKeyboardOverride.mKeyboardLayout = aNativeKeyboardLayout;
-    mKeyboardOverride.mOverrideEnabled = PR_TRUE;
+    mKeyboardOverride.mOverrideEnabled = true;
     [NSApp sendEvent:downEvent];
     if (upEvent) {
       [NSApp sendEvent:upEvent];
     }
     // processKeyDownEvent and keyUp block exceptions so we're sure to
     // reach here to restore mKeyboardOverride
     mKeyboardOverride = currentLayout;
   }
@@ -3789,32 +3789,32 @@ TextInputHandlerBase::IsSpecialGeckoKey(
     case kPageDownKeyCode:
     case kLeftArrowKeyCode:
     case kRightArrowKeyCode:
     case kUpArrowKeyCode:
     case kDownArrowKeyCode:
     case kReturnKeyCode:
     case kEnterKeyCode:
     case kPowerbookEnterKeyCode:
-      return PR_TRUE;
+      return true;
   }
-  return PR_FALSE;
+  return false;
 }
 
 /* static */ bool
 TextInputHandlerBase::IsNormalCharInputtingEvent(const nsKeyEvent& aKeyEvent)
 {
   // this is not character inputting event, simply.
   if (!aKeyEvent.isChar || !aKeyEvent.charCode || aKeyEvent.isMeta) {
-    return PR_FALSE;
+    return false;
   }
   // if this is unicode char inputting event, we don't need to check
   // ctrl/alt/command keys
   if (aKeyEvent.charCode > 0x7F) {
-    return PR_TRUE;
+    return true;
   }
   // ASCII chars should be inputted without ctrl/alt/command keys
   return !aKeyEvent.isControl && !aKeyEvent.isAlt;
 }
 
 /* static */ bool
 TextInputHandlerBase::IsModifierKey(UInt32 aNativeKeyCode)
 {
@@ -3823,12 +3823,12 @@ TextInputHandlerBase::IsModifierKey(UInt
     case kRCommandKeyCode:
     case kCommandKeyCode:
     case kShiftKeyCode:
     case kOptionkeyCode:
     case kControlKeyCode:
     case kRShiftKeyCode:
     case kROptionKeyCode:
     case kRControlKeyCode:
-      return PR_TRUE;
+      return true;
   }
-  return PR_FALSE;
+  return false;
 }
--- a/widget/src/cocoa/nsAppShell.mm
+++ b/widget/src/cocoa/nsAppShell.mm
@@ -161,17 +161,17 @@ NSModalSession nsCocoaAppModalWindowList
 
   return currentSession;
 }
 
 // Has a Gecko modal dialog popped up over a Cocoa app-modal dialog?
 bool nsCocoaAppModalWindowList::GeckoModalAboveCocoaModal()
 {
   if (mList.IsEmpty())
-    return PR_FALSE;
+    return false;
 
   nsCocoaAppModalWindowListItem &topItem = mList.ElementAt(mList.Length() - 1);
 
   return (topItem.mWidget != nsnull);
 }
 
 // GeckoNSApplication
 //
@@ -214,39 +214,39 @@ bool nsCocoaAppModalWindowList::GeckoMod
 
 NS_IMETHODIMP
 nsAppShell::ResumeNative(void)
 {
   nsresult retval = nsBaseAppShell::ResumeNative();
   if (NS_SUCCEEDED(retval) && (mSuspendNativeCount == 0) &&
       mSkippedNativeCallback)
   {
-    mSkippedNativeCallback = PR_FALSE;
+    mSkippedNativeCallback = false;
     ScheduleNativeEventCallback();
   }
   return retval;
 }
 
 nsAppShell::nsAppShell()
 : mAutoreleasePools(nsnull)
 , mDelegate(nsnull)
 , mCFRunLoop(NULL)
 , mCFRunLoopSource(NULL)
-, mRunningEventLoop(PR_FALSE)
-, mStarted(PR_FALSE)
-, mTerminated(PR_FALSE)
-, mSkippedNativeCallback(PR_FALSE)
+, mRunningEventLoop(false)
+, mStarted(false)
+, mTerminated(false)
+, mSkippedNativeCallback(false)
 , mHadMoreEventsCount(0)
 , mRecursionDepth(0)
 , mNativeEventCallbackDepth(0)
 , mNativeEventScheduledDepth(0)
 {
   // A Cocoa event loop is running here if (and only if) we've been embedded
   // by a Cocoa app (like Camino).
-  mRunningCocoaEmbedded = [NSApp isRunning] ? PR_TRUE : PR_FALSE;
+  mRunningCocoaEmbedded = [NSApp isRunning] ? true : false;
 }
 
 nsAppShell::~nsAppShell()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   if (mCFRunLoop) {
     if (mCFRunLoopSource) {
@@ -360,17 +360,17 @@ nsAppShell::Init()
       Class PDEPluginCallbackClass = ::NSClassFromString(@"PDEPluginCallback");
       nsresult rv1 = nsToolkit::SwizzleMethods(PDEPluginCallbackClass, @selector(initWithPrintWindowController:),
                                                @selector(nsAppShell_PDEPluginCallback_initWithPrintWindowController:));
       if (NS_SUCCEEDED(rv1)) {
         nsToolkit::SwizzleMethods(PDEPluginCallbackClass, @selector(dealloc),
                                   @selector(nsAppShell_PDEPluginCallback_dealloc));
       }
     }
-    gAppShellMethodsSwizzled = PR_TRUE;
+    gAppShellMethodsSwizzled = true;
   }
 
   [localPool release];
 
   return rv;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
@@ -388,17 +388,17 @@ nsAppShell::Init()
 void
 nsAppShell::ProcessGeckoEvents(void* aInfo)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   nsAppShell* self = static_cast<nsAppShell*> (aInfo);
 
   if (self->mRunningEventLoop) {
-    self->mRunningEventLoop = PR_FALSE;
+    self->mRunningEventLoop = false;
 
     // The run loop may be sleeping -- [NSRunLoop runMode:...]
     // won't return until it's given a reason to wake up.  Awaken it by
     // posting a bogus event.  There's no need to make the event
     // presentable.
     //
     // But _don't_ set windowNumber to '-1' -- that can lead to nasty
     // wierdness like bmo bug 397039 (a crash in [NSApp sendEvent:] on one of
@@ -419,17 +419,17 @@ nsAppShell::ProcessGeckoEvents(void* aIn
              atStart:NO];
   }
 
   if (self->mSuspendNativeCount <= 0) {
     ++self->mNativeEventCallbackDepth;
     self->NativeEventCallback();
     --self->mNativeEventCallbackDepth;
   } else {
-    self->mSkippedNativeCallback = PR_TRUE;
+    self->mSkippedNativeCallback = true;
   }
 
   // Still needed to fix bug 343033 ("5-10 second delay or hang or crash
   // when quitting Cocoa Firefox").
   [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined
                                       location:NSMakePoint(0,0)
                                  modifierFlags:0
                                      timestamp:0
@@ -442,17 +442,17 @@ nsAppShell::ProcessGeckoEvents(void* aIn
 
   // Normally every call to ScheduleNativeEventCallback() results in
   // exactly one call to ProcessGeckoEvents().  So each Release() here
   // normally balances exactly one AddRef() in ScheduleNativeEventCallback().
   // But if Exit() is called just after ScheduleNativeEventCallback(), the
   // corresponding call to ProcessGeckoEvents() will never happen.  We check
   // for this possibility in two different places -- here and in Exit()
   // itself.  If we find here that Exit() has been called (that mTerminated
-  // is PR_TRUE), it's because we've been called recursively, that Exit() was
+  // is true), it's because we've been called recursively, that Exit() was
   // called from self->NativeEventCallback() above, and that we're unwinding
   // the recursion.  In this case we'll never be called again, and we balance
   // here any extra calls to ScheduleNativeEventCallback().
   //
   // When ProcessGeckoEvents() is called recursively, it's because of a
   // call to ScheduleNativeEventCallback() from NativeEventCallback().  We
   // balance the "extra" AddRefs here (rather than always in Exit()) in order
   // to ensure that 'self' stays alive until the end of this method.  We also
@@ -497,17 +497,17 @@ nsAppShell::WillTerminate()
 {
   if (mTerminated)
     return;
 
   // Make sure that the nsAppExitEvent posted by nsAppStartup::Quit() (called
   // from [MacApplicationDelegate applicationShouldTerminate:]) gets run.
   NS_ProcessPendingEvents(NS_GetCurrentThread());
 
-  mTerminated = PR_TRUE;
+  mTerminated = true;
 }
 
 // ScheduleNativeEventCallback
 //
 // Called (possibly on a non-main thread) when Gecko has an event that
 // needs to be processed.  The Gecko event needs to be processed on the
 // main thread, so the native run loop must be interrupted.
 //
@@ -565,30 +565,30 @@ nsAppShell::ProcessNextNativeEvent(bool 
   bool moreEvents = false;
 
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   bool eventProcessed = false;
   NSString* currentMode = nil;
 
   if (mTerminated)
-    return PR_FALSE;
+    return false;
 
   // We don't want any native events to be processed here (via Gecko) while
   // Cocoa is displaying an app-modal dialog (as opposed to a window-modal
   // "sheet" or a Gecko-modal dialog).  Otherwise Cocoa event-processing loops
   // may be interrupted, and inappropriate events may get through to the
   // browser window(s) underneath.  This resolves bmo bugs 419668 and 420967.
   //
   // But we need more complex handling (we need to make an exception) if a
   // Gecko modal dialog is running above the Cocoa app-modal dialog -- for
   // which see below.
   if ([NSApp _isRunningAppModal] &&
       (!gCocoaAppModalWindowList || !gCocoaAppModalWindowList->GeckoModalAboveCocoaModal()))
-    return PR_FALSE;
+    return false;
 
   bool wasRunningEventLoop = mRunningEventLoop;
   mRunningEventLoop = aMayWait;
   NSDate* waitUntil = nil;
   if (aMayWait)
     waitUntil = [NSDate distantFuture];
 
   NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop];
@@ -623,18 +623,18 @@ nsAppShell::ProcessNextNativeEvent(bool 
 
     // We special-case timer events (events of type NSPeriodic) to avoid
     // starving them.  Apple's documentation is very scanty, and it's now
     // more scanty than it used to be.  But it appears that [NSRunLoop
     // acceptInputForMode:beforeDate:] doesn't process timer events at all,
     // that it is called from [NSRunLoop runMode:beforeDate:], and that
     // [NSRunLoop runMode:beforeDate:], though it does process timer events,
     // doesn't return after doing so.  To get around this, when aWait is
-    // PR_FALSE we check for timer events and process them using [NSApp
-    // sendEvent:].  When aWait is PR_TRUE [NSRunLoop runMode:beforeDate:]
+    // false we check for timer events and process them using [NSApp
+    // sendEvent:].  When aWait is true [NSRunLoop runMode:beforeDate:]
     // will only return on a "real" event.  But there's code in
     // ProcessGeckoEvents() that should (when need be) wake us up by sending
     // a "fake" "real" event.  (See Apple's current doc on [NSRunLoop
     // runMode:beforeDate:] and a quote from what appears to be an older
     // version of this doc at
     // http://lists.apple.com/archives/cocoa-dev/2001/May/msg00559.html.)
 
     // If the current mode is something else than NSDefaultRunLoopMode, look
@@ -666,34 +666,34 @@ nsAppShell::ProcessNextNativeEvent(bool 
         NSModalSession currentAppModalSession = nil;
         if (gCocoaAppModalWindowList)
           currentAppModalSession = gCocoaAppModalWindowList->CurrentSession();
         if (currentAppModalSession) {
           [NSApp _modalSession:currentAppModalSession sendEvent:nextEvent];
         } else {
           [NSApp sendEvent:nextEvent];
         }
-        eventProcessed = PR_TRUE;
+        eventProcessed = true;
       }
     } else {
       if (aMayWait ||
           (nextEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
                                           untilDate:nil
                                              inMode:currentMode
                                             dequeue:NO])) {
         if (nextEvent && ([nextEvent type] == NSPeriodic)) {
           nextEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
                                          untilDate:waitUntil
                                             inMode:currentMode
                                            dequeue:YES];
           [NSApp sendEvent:nextEvent];
         } else {
           [currentRunLoop runMode:currentMode beforeDate:waitUntil];
         }
-        eventProcessed = PR_TRUE;
+        eventProcessed = true;
       }
     }
   } while (mRunningEventLoop);
 
   if (eventProcessed && (mHadMoreEventsCount < kHadMoreEventsCountMax)) {
     moreEvents = ([NSApp nextEventMatchingMask:NSAnyEventMask
                                      untilDate:nil
                                         inMode:currentMode
@@ -714,18 +714,18 @@ nsAppShell::ProcessNextNativeEvent(bool 
 
   if (!moreEvents) {
     nsChildView::UpdateCurrentInputEventCount();
   }
 
   return moreEvents;
 }
 
-// Returns PR_TRUE if Gecko events are currently being processed in its "main"
-// event loop (or one of its "main" event loops).  Returns PR_FALSE if Gecko
+// Returns true if Gecko events are currently being processed in its "main"
+// event loop (or one of its "main" event loops).  Returns false if Gecko
 // events are being processed in a "nested" event loop, or if we're not
 // running in any sort of Gecko event loop.  How we process native events in
 // ProcessNextNativeEvent() turns on our decision (and if we make the wrong
 // choice, the result may be a hang).
 //
 // We define the "main" event loop(s) as the place (or places) where Gecko
 // event processing "normally" takes place, and all other Gecko event loops
 // as "nested".  The "nested" event loops are normally processed while a call
@@ -737,20 +737,20 @@ nsAppShell::ProcessNextNativeEvent(bool 
 // NS_ProcessNextEvent() or NS_ProcessPendingEvents()).  (In the current
 // nsAppShell implementation, what counts as the "main" event loop is what
 // nsBaseAppShell::NativeEventCallback() does to process Gecko events.  We
 // don't currently use nsBaseAppShell::Run().)
 bool
 nsAppShell::InGeckoMainEventLoop()
 {
   if ((gXULModalLevel > 0) || (mRecursionDepth > 0))
-    return PR_FALSE;
+    return false;
   if (mNativeEventCallbackDepth <= 0)
-    return PR_FALSE;
-  return PR_TRUE;
+    return false;
+  return true;
 }
 
 // Run
 //
 // Overrides the base class's Run() method to call [NSApp run] (which spins
 // the native run loop until the application quits).  Since (unlike the base
 // class's Run() method) we don't process any Gecko events here, they need
 // to be processed elsewhere (in NativeEventCallback(), called from
@@ -762,17 +762,17 @@ nsAppShell::InGeckoMainEventLoop()
 // public
 NS_IMETHODIMP
 nsAppShell::Run(void)
 {
   NS_ASSERTION(!mStarted, "nsAppShell::Run() called multiple times");
   if (mStarted)
     return NS_OK;
 
-  mStarted = PR_TRUE;
+  mStarted = true;
   NS_OBJC_TRY_ABORT([NSApp run]);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAppShell::Exit(void)
 {
@@ -783,17 +783,17 @@ nsAppShell::Exit(void)
   // XPCOM shutdown notification that nsBaseAppShell has registered to
   // receive.  So we need to ensure that multiple calls won't break anything.
   // But we should also complain about it (since it isn't quite kosher).
   if (mTerminated) {
     NS_WARNING("nsAppShell::Exit() called redundantly");
     return NS_OK;
   }
 
-  mTerminated = PR_TRUE;
+  mTerminated = true;
 
   delete gCocoaAppModalWindowList;
   gCocoaAppModalWindowList = NULL;
 
 #ifndef NP_NO_CARBON
   TextInputHandler::RemovePluginKeyEventsHandler();
 #endif
 
--- a/widget/src/cocoa/nsChildView.mm
+++ b/widget/src/cocoa/nsChildView.mm
@@ -235,20 +235,20 @@ void EnsureLogInitialized()
 }
 
 #pragma mark -
 
 nsChildView::nsChildView() : nsBaseWidget()
 , mView(nsnull)
 , mParentView(nsnull)
 , mParentWidget(nsnull)
-, mVisible(PR_FALSE)
-, mDrawing(PR_FALSE)
-, mPluginDrawing(PR_FALSE)
-, mIsDispatchPaint(PR_FALSE)
+, mVisible(false)
+, mDrawing(false)
+, mPluginDrawing(false)
+, mIsDispatchPaint(false)
 , mPluginInstanceOwner(nsnull)
 {
   EnsureLogInitialized();
 
   memset(&mPluginCGContext, 0, sizeof(mPluginCGContext));
 #ifndef NP_NO_QUICKDRAW
   memset(&mPluginQDPort, 0, sizeof(mPluginQDPort));
 #endif
@@ -305,25 +305,25 @@ nsresult nsChildView::Create(nsIWidget *
   // See NSView (MethodSwizzling) below.
   if (!gChildViewMethodsSwizzled) {
     nsToolkit::SwizzleMethods([NSView class], @selector(mouseDownCanMoveWindow),
                               @selector(nsChildView_NSView_mouseDownCanMoveWindow));
 #ifdef __LP64__
     if (nsToolkit::OnLionOrLater()) {
       nsToolkit::SwizzleMethods([NSEvent class], @selector(addLocalMonitorForEventsMatchingMask:handler:),
                                 @selector(nsChildView_NSEvent_addLocalMonitorForEventsMatchingMask:handler:),
-                                PR_TRUE);
+                                true);
       nsToolkit::SwizzleMethods([NSEvent class], @selector(removeMonitor:),
-                                @selector(nsChildView_NSEvent_removeMonitor:), PR_TRUE);
+                                @selector(nsChildView_NSEvent_removeMonitor:), true);
     }
 #endif
 #ifndef NP_NO_CARBON
     TextInputHandler::SwizzleMethods();
 #endif
-    gChildViewMethodsSwizzled = PR_TRUE;
+    gChildViewMethodsSwizzled = true;
   }
 
   mBounds = aRect;
 
   BaseCreate(aParent, aRect, aHandleEventFunction, 
              aContext, aAppShell, aToolkit, aInitData);
 
   // inherit things from the parent view and create our parallel 
@@ -356,17 +356,17 @@ nsresult nsChildView::Create(nsIWidget *
   [(ChildView*)mView setIsPluginView:(mWindowType == eWindowType_plugin)];
 
   // If this view was created in a Gecko view hierarchy, the initial state
   // is hidden.  If the view is attached only to a native NSView but has
   // no Gecko parent (as in embedding), the initial state is visible.
   if (mParentWidget)
     [mView setHidden:YES];
   else
-    mVisible = PR_TRUE;
+    mVisible = true;
 
   // Hook it up in the NSView hierarchy.
   if (mParentView) {
     [mParentView addSubview:mView];
   }
 
   // if this is a ChildView, make sure that our per-window data
   // is set up
@@ -442,17 +442,17 @@ nsChildView::GetXULWindowWidget()
 }
 
 NS_IMETHODIMP nsChildView::Destroy()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   if (mOnDestroyCalled)
     return NS_OK;
-  mOnDestroyCalled = PR_TRUE;
+  mOnDestroyCalled = true;
 
   [mView widgetDestroyed];
 
   nsBaseWidget::Destroy();
 
   ReportDestroyEvent(); 
   mParentWidget = nil;
 
@@ -567,17 +567,17 @@ NS_IMETHODIMP nsChildView::IsVisible(boo
     outState = mVisible;
   }
   else {
     // mVisible does not accurately reflect the state of a hidden tabbed view
     // so verify that the view has a window as well
     outState = ([mView window] != nil);
     // now check native widget hierarchy visibility
     if (outState && NSIsEmptyRect([mView visibleRect])) {
-      outState = PR_FALSE;
+      outState = false;
     }
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
@@ -782,17 +782,17 @@ NS_IMETHODIMP nsChildView::Enable(bool a
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsChildView::IsEnabled(bool *aState)
 {
   // unimplemented
   if (aState)
-   *aState = PR_TRUE;
+   *aState = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsChildView::SetFocus(bool aRaise)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   NSWindow* window = [mView window];
@@ -941,27 +941,27 @@ static const PRInt32 resizeIndicatorHeig
 bool nsChildView::ShowsResizeIndicator(nsIntRect* aResizerRect)
 {
   NSView *topLevelView = mView, *superView = nil;
   while ((superView = [topLevelView superview]))
     topLevelView = superView;
 
   if (![[topLevelView window] showsResizeIndicator] ||
       !([[topLevelView window] styleMask] & NSResizableWindowMask))
-    return PR_FALSE;
+    return false;
 
   if (aResizerRect) {
     NSSize bounds = [topLevelView bounds].size;
     NSPoint corner = NSMakePoint(bounds.width, [topLevelView isFlipped] ? bounds.height : 0);
     corner = [topLevelView convertPoint:corner toView:mView];
     aResizerRect->SetRect(NSToIntRound(corner.x) - resizeIndicatorWidth,
                           NSToIntRound(corner.y) - resizeIndicatorHeight,
                           resizeIndicatorWidth, resizeIndicatorHeight);
   }
-  return PR_TRUE;
+  return true;
 }
 
 // In QuickDraw mode the coordinate system used here should be that of the
 // browser window's content region (defined as everything but the 22-pixel
 // high titlebar).  But in CoreGraphics mode the coordinate system should be
 // that of the browser window as a whole (including its titlebar).  Both
 // coordinate systems have a top-left origin.  See bmo bug 474491.
 //
@@ -1012,22 +1012,22 @@ NS_IMETHODIMP nsChildView::GetPluginClip
       nsIntRect clipBounds;
       for (PRUint32 i = 0; i < mClipRectCount; ++i) {
         clipBounds.UnionRect(clipBounds, mClipRects[i]);
       }
       outClipRect.IntersectRect(outClipRect, clipBounds - outOrigin);
     }
 
     // XXXroc should this be !outClipRect.IsEmpty()?
-    outWidgetVisible = PR_TRUE;
+    outWidgetVisible = true;
   }
   else {
     outClipRect.width = 0;
     outClipRect.height = 0;
-    outWidgetVisible = PR_FALSE;
+    outWidgetVisible = false;
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 #ifndef NP_NO_CARBON
@@ -1149,29 +1149,29 @@ NS_IMETHODIMP nsChildView::StartDrawPlug
         ::SetGWorld(oldPort, oldDevice);
       }
     }
   } else {
     NS_WARNING("Cannot set plugin's visible region -- required QuickDraw APIs are missing!");
   }
 #endif
 
-  mPluginDrawing = PR_TRUE;
+  mPluginDrawing = true;
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP nsChildView::EndDrawPlugin()
 {
   NS_ASSERTION(mWindowType == eWindowType_plugin,
                "EndDrawPlugin must only be called on a plugin widget");
   if (mWindowType != eWindowType_plugin) return NS_ERROR_FAILURE;
 
-  mPluginDrawing = PR_FALSE;
+  mPluginDrawing = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsChildView::SetPluginInstanceOwner(nsIPluginInstanceOwner* aInstanceOwner)
 {
   mPluginInstanceOwner = aInstanceOwner;
 
   return NS_OK;
@@ -1421,17 +1421,17 @@ NS_IMETHODIMP nsChildView::Invalidate(co
 }
 
 bool
 nsChildView::GetShouldAccelerate()
 {
   // Don't use OpenGL for transparent windows or for popup windows.
   if (!mView || ![[mView window] isOpaque] ||
       [[mView window] isKindOfClass:[PopupWindow class]])
-    return PR_FALSE;
+    return false;
 
   return nsBaseWidget::GetShouldAccelerate();
 }
 
 inline PRUint16 COLOR8TOCOLOR16(PRUint8 color8)
 {
   // return (color8 == 0xFF ? 0xFFFF : (color8 << 8));
   return (color8 << 8) | color8;  /* (color8 * 257) == (color8 * 0x0101) */
@@ -1526,33 +1526,33 @@ bool nsChildView::DispatchWindowEvent(ns
   DispatchEvent(&event, status);
   return ConvertStatus(status);
 }
 
 #pragma mark -
 
 bool nsChildView::ReportDestroyEvent()
 {
-  nsGUIEvent event(PR_TRUE, NS_DESTROY, this);
+  nsGUIEvent event(true, NS_DESTROY, this);
   event.time = PR_IntervalNow();
   return DispatchWindowEvent(event);
 }
 
 bool nsChildView::ReportMoveEvent()
 {
-  nsGUIEvent moveEvent(PR_TRUE, NS_MOVE, this);
+  nsGUIEvent moveEvent(true, NS_MOVE, this);
   moveEvent.refPoint.x = mBounds.x;
   moveEvent.refPoint.y = mBounds.y;
   moveEvent.time       = PR_IntervalNow();
   return DispatchWindowEvent(moveEvent);
 }
 
 bool nsChildView::ReportSizeEvent()
 {
-  nsSizeEvent sizeEvent(PR_TRUE, NS_SIZE, this);
+  nsSizeEvent sizeEvent(true, NS_SIZE, this);
   sizeEvent.time        = PR_IntervalNow();
   sizeEvent.windowSize  = &mBounds;
   sizeEvent.mWinWidth   = mBounds.width;
   sizeEvent.mWinHeight  = mBounds.height;
   return DispatchWindowEvent(sizeEvent);
 }
 
 #pragma mark -
@@ -1687,26 +1687,26 @@ NS_IMETHODIMP nsChildView::GetIMEOpenSta
 
 NS_IMETHODIMP nsChildView::SetInputMode(const IMEContext& aContext)
 {
   NS_ENSURE_TRUE(mTextInputHandler, NS_ERROR_NOT_AVAILABLE);
   mIMEContext = aContext;
   switch (aContext.mStatus) {
     case nsIWidget::IME_STATUS_ENABLED:
     case nsIWidget::IME_STATUS_PLUGIN:
-      mTextInputHandler->SetASCIICapableOnly(PR_FALSE);
-      mTextInputHandler->EnableIME(PR_TRUE);
+      mTextInputHandler->SetASCIICapableOnly(false);
+      mTextInputHandler->EnableIME(true);
       break;
     case nsIWidget::IME_STATUS_DISABLED:
-      mTextInputHandler->SetASCIICapableOnly(PR_FALSE);
-      mTextInputHandler->EnableIME(PR_FALSE);
+      mTextInputHandler->SetASCIICapableOnly(false);
+      mTextInputHandler->EnableIME(false);
       break;
     case nsIWidget::IME_STATUS_PASSWORD:
-      mTextInputHandler->SetASCIICapableOnly(PR_TRUE);
-      mTextInputHandler->EnableIME(PR_FALSE);
+      mTextInputHandler->SetASCIICapableOnly(true);
+      mTextInputHandler->EnableIME(false);
       break;
     default:
       NS_ERROR("not implemented!");
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsChildView::GetInputMode(IMEContext& aContext)
@@ -1757,17 +1757,17 @@ NS_IMETHODIMP nsChildView::OnIMEFocusCha
 }
 
 NSView<mozView>* nsChildView::GetEditorView()
 {
   NSView<mozView>* editorView = mView;
   // We need to get editor's view. E.g., when the focus is in the bookmark
   // dialog, the view is <panel> element of the dialog.  At this time, the key
   // events are processed the parent window's view that has native focus.
-  nsQueryContentEvent textContent(PR_TRUE, NS_QUERY_TEXT_CONTENT, this);
+  nsQueryContentEvent textContent(true, NS_QUERY_TEXT_CONTENT, this);
   textContent.InitForQueryTextContent(0, 0);
   DispatchWindowEvent(textContent);
   if (textContent.mSucceeded && textContent.mReply.mFocusedWidget) {
     NSView<mozView>* view = static_cast<NSView<mozView>*>(
       textContent.mReply.mFocusedWidget->GetNativeData(NS_NATIVE_WIDGET));
     if (view)
       editorView = view;
   }
@@ -1830,17 +1830,17 @@ nsChildView::DrawOver(LayerManager* aMan
   if (!manager) {
     return;
   }
 
   if (!mResizerImage) {
     mResizerImage = manager->gl()->CreateTextureImage(nsIntSize(15, 15),
                                                       gfxASurface::CONTENT_COLOR_ALPHA,
                                                       LOCAL_GL_CLAMP_TO_EDGE,
-                                                      /* aUseNearestFilter = */ PR_TRUE);
+                                                      /* aUseNearestFilter = */ true);
 
     // Creation of texture images can fail.
     if (!mResizerImage)
       return;
 
     nsIntRegion update(nsIntRect(0, 0, 15, 15));
     gfxASurface *asurf = mResizerImage->BeginUpdate(update);
     if (!asurf) {
@@ -1935,17 +1935,17 @@ nsChildView::GetDocumentAccessible()
   nsAccessible *docAccessible = nsnull;
   if (mAccessible) {
     CallQueryReferent(mAccessible.get(), &docAccessible);
     return docAccessible;
   }
 
   // need to fetch the accessible anew, because it has gone away.
   nsEventStatus status;
-  nsAccessibleEvent event(PR_TRUE, NS_GETACCESSIBLE, this);
+  nsAccessibleEvent event(true, NS_GETACCESSIBLE, this);
   DispatchEvent(&event, status);
 
   // cache the accessible in our weak ptr
   mAccessible =
     do_GetWeakReference(static_cast<nsIAccessible*>(event.mAccessible));
 
   NS_IF_ADDREF(event.mAccessible);
   return event.mAccessible;
@@ -2128,17 +2128,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 - (void)updatePluginTopLevelWindowStatus:(BOOL)hasMain
 {
   if (!mGeckoChild)
     return;
 
-  nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
+  nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
   NPCocoaEvent cocoaEvent;
   nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
   cocoaEvent.type = NPCocoaEventWindowFocusChanged;
   cocoaEvent.data.focus.hasFocus = hasMain;
   nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
   mGeckoChild->DispatchWindowEvent(pluginEvent);
 }
 
@@ -2187,17 +2187,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   return static_cast<nsIWidget*>(mGeckoChild);
 }
 
 - (void)systemMetricsChanged
 {
   if (!mGeckoChild)
     return;
 
-  nsGUIEvent guiEvent(PR_TRUE, NS_THEMECHANGED, mGeckoChild);
+  nsGUIEvent guiEvent(true, NS_THEMECHANGED, mGeckoChild);
   mGeckoChild->DispatchWindowEvent(guiEvent);
 }
 
 - (void)setNeedsPendingDisplay
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   mPendingFullDisplay = YES;
@@ -2300,17 +2300,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   if (!mClickThroughMouseDownEvent ||
       [mClickThroughMouseDownEvent type] != NSLeftMouseDown)
     return NO;
 
   BOOL retval =
     !ChildViewMouseTracker::WindowAcceptsEvent([self window],
                                                mClickThroughMouseDownEvent,
-                                               self, PR_TRUE);
+                                               self, true);
 
   // If we return YES here, this will result in us not being focused,
   // which will stop us receiving mClickThroughMouseDownEvent in
   // [ChildView mouseDown:].  So we need to release and null-out
   // mClickThroughMouseDownEvent here.
   if (retval) {
     [mClickThroughMouseDownEvent release];
     mClickThroughMouseDownEvent = nil;
@@ -2340,17 +2340,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 }
 
 - (void)sendFocusEvent:(PRUint32)eventType
 {
   if (!mGeckoChild)
     return;
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  nsGUIEvent focusGuiEvent(PR_TRUE, eventType, mGeckoChild);
+  nsGUIEvent focusGuiEvent(true, eventType, mGeckoChild);
   focusGuiEvent.time = PR_IntervalNow();
   mGeckoChild->DispatchEvent(&focusGuiEvent, status);
 }
 
 // We accept key and mouse events, so don't keep passing them up the chain. Allow
 // this to be a 'focused' widget for event dispatch.
 - (BOOL)acceptsFirstResponder
 {
@@ -2508,17 +2508,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
            self, mGeckoChild,
            aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height, aContext,
            geckoBounds.x, geckoBounds.y, geckoBounds.width, geckoBounds.height);
 
   CGAffineTransform xform = CGContextGetCTM(aContext);
   fprintf (stderr, "  xform in: [%f %f %f %f %f %f]\n", xform.a, xform.b, xform.c, xform.d, xform.tx, xform.ty);
 #endif
   // Create the event so we can fill in its region
-  nsPaintEvent paintEvent(PR_TRUE, NS_PAINT, mGeckoChild);
+  nsPaintEvent paintEvent(true, NS_PAINT, mGeckoChild);
 
   nsIntRect boundingRect =
     nsIntRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
   const NSRect *rects;
   NSInteger count, i;
   [[NSView focusView] getRectsBeingDrawn:&rects count:&count];
   if (count < MAX_RECTS_IN_REGION) {
     for (i = 0; i < count; ++i) {
@@ -2566,17 +2566,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
     return;
   }
 
   // Create Cairo objects.
   NSSize bufferSize = [self bounds].size;
   nsRefPtr<gfxQuartzSurface> targetSurface =
     new gfxQuartzSurface(aContext, gfxSize(bufferSize.width, bufferSize.height));
-  targetSurface->SetAllowUseAsSource(PR_FALSE);
+  targetSurface->SetAllowUseAsSource(false);
 
   nsRefPtr<gfxContext> targetContext = new gfxContext(targetSurface);
 
   // Set up the clip region.
   nsIntRegionRectIterator iter(paintEvent.region);
   targetContext->NewPath();
   for (;;) {
     const nsIntRect* r = iter.Next();
@@ -2658,17 +2658,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
         parent = parent->GetParent();
       }
       NS_ADDREF(mGeckoChild);
       [widgetArray addObject:[NSNumber numberWithUnsignedInteger:(NSUInteger)mGeckoChild]];
       [self performSelector:@selector(releaseWidgets:)
                  withObject:widgetArray
                  afterDelay:0];
     }
-    nsPaintEvent paintEvent(PR_TRUE, NS_WILL_PAINT, mGeckoChild);
+    nsPaintEvent paintEvent(true, NS_WILL_PAINT, mGeckoChild);
     mGeckoChild->DispatchWindowEvent(paintEvent);
   }
   [super viewWillDraw];
 }
 
 // Allows us to turn off setting up the clip region
 // before each drawRect. We already clip within gecko.
 - (BOOL)wantsDefaultClipping
@@ -2773,17 +2773,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
           nsIWidget* widget = widgetChain[i];
           NSWindow* currWindow = (NSWindow*)widget->GetNativeData(NS_NATIVE_WINDOW);
           if (nsCocoaUtils::IsEventOverWindow(theEvent, currWindow)) {
             // don't roll up if the mouse event occurred within a menu of the
             // same type. If the mouse event occurred in a menu higher than
             // that, roll up, but pass the number of popups to Rollup so
             // that only those of the same type close up.
             if (i < sameTypeCount) {
-              shouldRollup = PR_FALSE;
+              shouldRollup = false;
             }
             else {
               popupsToRollup = sameTypeCount;
             }
             break;
           }
         }
       }
@@ -2819,17 +2819,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
     return;
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   float deltaX = [anEvent deltaX];  // left=1.0, right=-1.0
   float deltaY = [anEvent deltaY];  // up=1.0, down=-1.0
 
   // Setup the "swipe" event.
-  nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
+  nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
   [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
 
   // Record the left/right direction.
   if (deltaX > 0.0)
     geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_LEFT;
   else if (deltaX < 0.0)
     geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_RIGHT;
 
@@ -2881,17 +2881,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   case eGestureState_None:
   case eGestureState_RotateGesture:
   default:
     return;
   }
 
   // Setup the event.
-  nsSimpleGestureEvent geckoEvent(PR_TRUE, msg, mGeckoChild, 0, deltaZ);
+  nsSimpleGestureEvent geckoEvent(true, msg, mGeckoChild, 0, deltaZ);
   [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
 
   // Send the event.
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 
   // Keep track of the cumulative magnification for the final "magnify" event.
   mCumulativeMagnification += deltaZ;
   
@@ -2922,17 +2922,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   case eGestureState_None:
   case eGestureState_MagnifyGesture:
   default:
     return;
   }
 
   // Setup the event.
-  nsSimpleGestureEvent geckoEvent(PR_TRUE, msg, mGeckoChild, 0, 0.0);
+  nsSimpleGestureEvent geckoEvent(true, msg, mGeckoChild, 0, 0.0);
   [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
   geckoEvent.delta = -rotation;
   if (rotation > 0.0) {
     geckoEvent.direction = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
   } else {
     geckoEvent.direction = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
   }
 
@@ -2958,29 +2958,29 @@ NSEvent* gLastDragMouseDownEvent = nil;
   }
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   switch (mGestureState) {
   case eGestureState_MagnifyGesture:
     {
       // Setup the "magnify" event.
-      nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_MAGNIFY,
+      nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_MAGNIFY,
                                       mGeckoChild, 0, mCumulativeMagnification);
       [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
 
       // Send the event.
       mGeckoChild->DispatchWindowEvent(geckoEvent);
     }
     break;
 
   case eGestureState_RotateGesture:
     {
       // Setup the "rotate" event.
-      nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_ROTATE, mGeckoChild, 0, 0.0);
+      nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_ROTATE, mGeckoChild, 0, 0.0);
       [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
       geckoEvent.delta = -mCumulativeRotation;
       if (mCumulativeRotation > 0.0) {
         geckoEvent.direction = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
       } else {
         geckoEvent.direction = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
       }
 
@@ -3101,17 +3101,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
       // gestureAmount is negative when it will be '-1' at isComplete, and
       // positive when it will be '1'.  And phase is never equal to
       // NSEventPhaseEnded when gestureAmount will be '0' at isComplete.
       // Not waiting until isComplete is TRUE substantially reduces the
       // time it takes to change pages after a swipe, and helps resolve
       // bug 678891.
       if (phase == NSEventPhaseEnded) {
         if (gestureAmount) {
-          nsSimpleGestureEvent geckoEvent(PR_TRUE, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
+          nsSimpleGestureEvent geckoEvent(true, NS_SIMPLE_GESTURE_SWIPE, mGeckoChild, 0, 0.0);
           [self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoEvent];
           if (gestureAmount > 0) {
             geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_LEFT;
           } else {
             geckoEvent.direction |= nsIDOMSimpleGestureEvent::DIRECTION_RIGHT;
           }
           mGeckoChild->DispatchWindowEvent(geckoEvent);
         }
@@ -3188,17 +3188,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 #endif
 
   // in order to send gecko events we'll need a gecko widget
   if (!mGeckoChild)
     return;
 
   NSUInteger modifierFlags = [theEvent modifierFlags];
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
 
   NSInteger clickCount = [theEvent clickCount];
   if (mBlockedLastMouseDown && clickCount > 1) {
     // Don't send a double click if the first click of the double click was
     // blocked.
     clickCount--;
   }
@@ -3256,17 +3256,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
 #endif // ifndef NP_NO_CARBON
   NPCocoaEvent cocoaEvent;
 	
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   if ([theEvent modifierFlags] & NSControlKeyMask)
     geckoEvent.button = nsMouseEvent::eRightButton;
   else
     geckoEvent.button = nsMouseEvent::eLeftButton;
 
   // Create event for use by plugins.
   // This is going to our child view so we don't need to look up the destination
@@ -3305,17 +3305,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   // happen if it came at the end of a dragging operation), also send our
   // Gecko frame a mouse-exit event.
   if (mGeckoChild && mIsPluginView) {
 #ifndef NP_NO_CARBON
     if (mPluginEventModel == NPEventModelCocoa)
 #endif
     {
       if (ChildViewMouseTracker::ViewForEvent(theEvent) != self) {
-        nsMouseEvent geckoExitEvent(PR_TRUE, NS_MOUSE_EXIT, nsnull, nsMouseEvent::eReal);
+        nsMouseEvent geckoExitEvent(true, NS_MOUSE_EXIT, nsnull, nsMouseEvent::eReal);
         [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoExitEvent];
 
         NPCocoaEvent cocoaEvent;
         nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
         NSPoint point = [self convertPoint:[theEvent locationInWindow] fromView:nil];
         cocoaEvent.type = NPCocoaEventMouseExited;
         cocoaEvent.data.mouse.modifierFlags = [theEvent modifierFlags];
         cocoaEvent.data.mouse.pluginX = point.x;
@@ -3340,17 +3340,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 {
   if (!mGeckoChild)
     return;
 
   NSPoint windowEventLocation = nsCocoaUtils::EventLocationForWindow(aEvent, [self window]);
   NSPoint localEventLocation = [self convertPoint:windowEventLocation fromView:nil];
 
   PRUint32 msg = aEnter ? NS_MOUSE_ENTER : NS_MOUSE_EXIT;
-  nsMouseEvent event(PR_TRUE, msg, mGeckoChild, nsMouseEvent::eReal);
+  nsMouseEvent event(true, msg, mGeckoChild, nsMouseEvent::eReal);
   event.refPoint.x = nscoord((PRInt32)localEventLocation.x);
   event.refPoint.y = nscoord((PRInt32)localEventLocation.y);
 
   // Create event for use by plugins.
   // This is going to our child view so we don't need to look up the destination
   // event type.
 #ifndef NP_NO_CARBON  
   EventRecord carbonEvent;
@@ -3389,17 +3389,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
 - (void)handleMouseMoved:(NSEvent*)theEvent
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   if (!mGeckoChild)
     return;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
 
   // Create event for use by plugins.
   // This is going to our child view so we don't need to look up the destination
   // event type.
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
 #endif
@@ -3444,17 +3444,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   gLastDragView = self;
 
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
 #endif // ifndef NP_NO_CARBON
   NPCocoaEvent cocoaEvent;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
 
   // create event for use by plugins
   if (mIsPluginView) {
 #ifndef NP_NO_CARBON
     if (mPluginEventModel == NPEventModelCarbon) {
       carbonEvent.what = NPEventType_AdjustCursorEvent;
       carbonEvent.message = 0;
@@ -3497,17 +3497,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   [self maybeRollup:theEvent];
   if (!mGeckoChild)
     return;
 
   // The right mouse went down, fire off a right mouse down event to gecko
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eRightButton;
   geckoEvent.clickCount = [theEvent clickCount];
 
   // create event for use by plugins
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
   if (mPluginEventModel == NPEventModelCarbon) {
@@ -3552,17 +3552,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   if (!mGeckoChild)
     return;
 
 #ifndef NP_NO_CARBON
   EventRecord carbonEvent;
 #endif // ifndef NP_NO_CARBON
   NPCocoaEvent cocoaEvent;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eRightButton;
   geckoEvent.clickCount = [theEvent clickCount];
 
   // create event for use by plugins
   if (mIsPluginView) {
 #ifndef NP_NO_CARBON
     if (mPluginEventModel == NPEventModelCarbon) {
@@ -3596,17 +3596,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 - (void)rightMouseDragged:(NSEvent*)theEvent
 {
   if (!mGeckoChild)
     return;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eRightButton;
 
   // send event into Gecko by going directly to the
   // the widget.
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 }
 
@@ -3618,44 +3618,44 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   if ([self maybeRollup:theEvent] ||
       !ChildViewMouseTracker::WindowAcceptsEvent([self window], theEvent, self))
     return;
 
   if (!mGeckoChild)
     return;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_DOWN, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eMiddleButton;
   geckoEvent.clickCount = [theEvent clickCount];
 
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 - (void)otherMouseUp:(NSEvent *)theEvent
 {
   if (!mGeckoChild)
     return;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_BUTTON_UP, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eMiddleButton;
 
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 }
 
 - (void)otherMouseDragged:(NSEvent*)theEvent
 {
   if (!mGeckoChild)
     return;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eMiddleButton;
 
   // send event into Gecko by going directly to the
   // the widget.
   mGeckoChild->DispatchWindowEvent(geckoEvent);
 }
 
@@ -3665,28 +3665,28 @@ NSEvent* gLastDragMouseDownEvent = nil;
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   if (!mGeckoChild)
     return;
 
   float scrollDelta = 0;
   float scrollDeltaPixels = 0;
   bool checkPixels =
-    Preferences::GetBool("mousewheel.enable_pixel_scrolling", PR_TRUE);
+    Preferences::GetBool("mousewheel.enable_pixel_scrolling", true);
 
   // Calling deviceDeltaX or deviceDeltaY on theEvent will trigger a Cocoa
   // assertion and an Objective-C NSInternalInconsistencyException if the
   // underlying "Carbon" event doesn't contain pixel scrolling information.
   // For these events, carbonEventKind is kEventMouseWheelMoved instead of
   // kEventMouseScroll.
   if (checkPixels) {
     EventRef theCarbonEvent = [theEvent _eventRef];
     UInt32 carbonEventKind = theCarbonEvent ? ::GetEventKind(theCarbonEvent) : 0;
     if (carbonEventKind != kEventMouseScroll)
-      checkPixels = PR_FALSE;
+      checkPixels = false;
   }
 
   // Some scrolling devices supports pixel scrolling, e.g. a Macbook
   // touchpad or a Mighty Mouse. On those devices, [event deviceDeltaX/Y]
   // contains the amount of pixels to scroll. 
   if (inAxis & nsMouseScrollEvent::kIsVertical) {
     scrollDelta       = -[theEvent deltaY];
     if (checkPixels && (scrollDelta == 0 || scrollDelta != floor(scrollDelta))) {
@@ -3706,17 +3706,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   if (!hasPixels && scrollDelta == 0)
     // No sense in firing off a Gecko event.
      return;
 
   BOOL isMomentumScroll = nsCocoaUtils::IsMomentumScrollEvent(theEvent);
 
   if (scrollDelta != 0) {
     // Send the line scroll event.
-    nsMouseScrollEvent geckoEvent(PR_TRUE, NS_MOUSE_SCROLL, nsnull);
+    nsMouseScrollEvent geckoEvent(true, NS_MOUSE_SCROLL, nsnull);
     [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
     geckoEvent.scrollFlags |= inAxis;
 
     if (hasPixels)
       geckoEvent.scrollFlags |= nsMouseScrollEvent::kHasPixels;
 
     if (isMomentumScroll)
       geckoEvent.scrollFlags |= nsMouseScrollEvent::kIsMomentum;
@@ -3798,17 +3798,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
         ReleaseEvent(theEvent);
       }
     }
 #endif
   }
 
   if (hasPixels) {
     // Send the pixel scroll event.
-    nsMouseScrollEvent geckoEvent(PR_TRUE, NS_MOUSE_PIXEL_SCROLL, nsnull);
+    nsMouseScrollEvent geckoEvent(true, NS_MOUSE_PIXEL_SCROLL, nsnull);
     [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
     geckoEvent.scrollFlags |= inAxis;
     if (isMomentumScroll)
       geckoEvent.scrollFlags |= nsMouseScrollEvent::kIsMomentum;
     geckoEvent.delta = NSToIntRound(scrollDeltaPixels);
     nsAutoRetainCocoaObject kungFuDeathGrip(self);
     mGeckoChild->DispatchWindowEvent(geckoEvent);
 #ifdef __LP64__
@@ -3862,17 +3862,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
   // and expects the mouse down event before the context menu event, so
   // get that event sent first if this is a left mouse click.
   if ([theEvent type] == NSLeftMouseDown) {
     [self mouseDown:theEvent];
     if (!mGeckoChild)
       return nil;
   }
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_CONTEXTMENU, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_CONTEXTMENU, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
   geckoEvent.button = nsMouseEvent::eRightButton;
   mGeckoChild->DispatchWindowEvent(geckoEvent);
   if (!mGeckoChild)
     return nil;
 
   [self maybeInitContextMenuTracking];
 
@@ -4167,17 +4167,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 }
 
 - (BOOL)inactiveWindowAcceptsMouseEvent:(NSEvent*)aEvent
 {
   // If we're being destroyed assume the default -- return YES.
   if (!mGeckoChild)
     return YES;
 
-  nsMouseEvent geckoEvent(PR_TRUE, NS_MOUSE_ACTIVATE, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent geckoEvent(true, NS_MOUSE_ACTIVATE, nsnull, nsMouseEvent::eReal);
   [self convertCocoaMouseEvent:aEvent toGeckoEvent:&geckoEvent];
   return !mGeckoChild->DispatchWindowEvent(geckoEvent);
 }
 
 // Don't focus a plugin if the user has clicked on a DOM element above it.
 // In this case the user has actually clicked on the plugin's ChildView
 // (underneath the non-plugin DOM element).  But we shouldn't allow the
 // ChildView to be focused.  See bug 627649.
@@ -4192,17 +4192,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   nsAutoRetainCocoaObject kungFuDeathGrip(self);
 
   NSPoint eventLoc = nsCocoaUtils::ScreenLocationForEvent(currentEvent);
   eventLoc.y = nsCocoaUtils::FlippedScreenY(eventLoc.y);
   nsIntPoint widgetLoc(NSToIntRound(eventLoc.x), NSToIntRound(eventLoc.y));
   widgetLoc -= mGeckoChild->WidgetToScreenOffset();
 
-  nsQueryContentEvent hitTest(PR_TRUE, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild);
+  nsQueryContentEvent hitTest(true, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild);
   hitTest.InitForQueryDOMWidgetHittest(widgetLoc);
   // This might destroy our widget (and null out mGeckoChild).
   mGeckoChild->DispatchWindowEvent(hitTest);
   if (!mGeckoChild)
     return NO;
   if (hitTest.mSucceeded && !hitTest.mReply.mWidgetIsHit)
     return NO;
 
@@ -4231,17 +4231,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 {
   if (!mGeckoChild)
     return NO;
 
   if (![self shouldFocusPlugin:getFocus])
     return NO;
 
   if (mPluginEventModel == NPEventModelCocoa) {
-    nsPluginEvent pluginEvent(PR_TRUE, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
+    nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild);
     NPCocoaEvent cocoaEvent;
     nsCocoaUtils::InitNPCocoaEvent(&cocoaEvent);
     cocoaEvent.type = NPCocoaEventFocusChanged;
     cocoaEvent.data.focus.hasFocus = getFocus;
     nsCocoaUtils::InitPluginEvent(pluginEvent, cocoaEvent);
     mGeckoChild->DispatchWindowEvent(pluginEvent);
 
     if (getFocus)
@@ -4379,29 +4379,29 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   nsCOMPtr<nsIDragSession> dragSession;
   mDragService->GetCurrentSession(getter_AddRefs(dragSession));
   if (dragSession) {
     if (aMessage == NS_DRAGDROP_OVER) {
       // fire the drag event at the source. Just ignore whether it was
       // cancelled or not as there isn't actually a means to stop the drag
       mDragService->FireDragEventAtSource(NS_DRAGDROP_DRAG);
-      dragSession->SetCanDrop(PR_FALSE);
+      dragSession->SetCanDrop(false);
     }
     else if (aMessage == NS_DRAGDROP_DROP) {
       // We make the assumption that the dragOver handlers have correctly set
       // the |canDrop| property of the Drag Session.
       bool canDrop = false;
       if (!NS_SUCCEEDED(dragSession->GetCanDrop(&canDrop)) || !canDrop) {
         [self doDragAction:NS_DRAGDROP_EXIT sender:aSender];
 
         nsCOMPtr<nsIDOMNode> sourceNode;
         dragSession->GetSourceNode(getter_AddRefs(sourceNode));
         if (!sourceNode) {
-          mDragService->EndDragSession(PR_FALSE);
+          mDragService->EndDragSession(false);
         }
         return NSDragOperationNone;
       }
     }
     
     unsigned int modifierFlags = [[NSApp currentEvent] modifierFlags];
     PRUint32 action = nsIDragService::DRAGDROP_ACTION_MOVE;
     // force copy = option, alias = cmd-option, default is move
@@ -4410,17 +4410,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
         action = nsIDragService::DRAGDROP_ACTION_LINK;
       else
         action = nsIDragService::DRAGDROP_ACTION_COPY;
     }
     dragSession->SetDragAction(action);
   }
 
   // set up gecko event
-  nsDragEvent geckoEvent(PR_TRUE, aMessage, nsnull);
+  nsDragEvent geckoEvent(true, aMessage, nsnull);
   [self convertGenericCocoaEvent:[NSApp currentEvent] toGeckoEvent:&geckoEvent];
 
   // Use our own coordinates in the gecko event.
   // Convert event from gecko global coords to gecko view coords.
   NSPoint localPoint = [self convertPoint:[aSender draggingLocation] fromView:nil];
   geckoEvent.refPoint.x = static_cast<nscoord>(localPoint.x);
   geckoEvent.refPoint.y = static_cast<nscoord>(localPoint.y);
 
@@ -4438,17 +4438,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
       case NS_DRAGDROP_DROP: {
         nsCOMPtr<nsIDOMNode> sourceNode;
         dragSession->GetSourceNode(getter_AddRefs(sourceNode));
         if (!sourceNode) {
           // We're leaving a window while doing a drag that was
           // initiated in a different app. End the drag session,
           // since we're done with it for now (until the user
           // drags back into mozilla).
-          mDragService->EndDragSession(PR_FALSE);
+          mDragService->EndDragSession(false);
         }
       }
     }
   }
 
   return NSDragOperationGeneric;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(NSDragOperationNone);
@@ -4551,17 +4551,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
       dragService->GetDataTransfer(getter_AddRefs(dataTransfer));
       nsCOMPtr<nsIDOMNSDataTransfer> dataTransferNS =
         do_QueryInterface(dataTransfer);
 
       if (dataTransferNS)
         dataTransferNS->SetDropEffectInt(nsIDragService::DRAGDROP_ACTION_NONE);
     }
 
-    mDragService->EndDragSession(PR_TRUE);
+    mDragService->EndDragSession(true);
     NS_RELEASE(mDragService);
   }
 
   [globalDragPboard release];
   globalDragPboard = nil;
   [gLastDragMouseDownEvent release];
   gLastDragMouseDownEvent = nil;
 
@@ -4583,17 +4583,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
   nsresult rv;
 
   PR_LOG(sCocoaLog, PR_LOG_ALWAYS, ("ChildView namesOfPromisedFilesDroppedAtDestination: entering callback for promised files\n"));
 
   nsCOMPtr<nsILocalFile> targFile;
-  NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(targFile));
+  NS_NewLocalFile(EmptyString(), true, getter_AddRefs(targFile));
   nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(targFile);
   if (!macLocalFile) {
     NS_ERROR("No Mac local file");
     return nil;
   }
 
   if (!NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)dropDestination))) {
     NS_ERROR("failed InitWithCFURL");
@@ -4670,26 +4670,26 @@ NSEvent* gLastDragMouseDownEvent = nil;
       // Assume that this object will be able to handle this request.
       result = self;
 
       // Keep the ChildView alive during this operation.
       nsAutoRetainCocoaObject kungFuDeathGrip(self);
       
       // Determine if there is a selection (if sending to the service).
       if (sendType) {
-        nsQueryContentEvent event(PR_TRUE, NS_QUERY_CONTENT_STATE, mGeckoChild);
+        nsQueryContentEvent event(true, NS_QUERY_CONTENT_STATE, mGeckoChild);
         // This might destroy our widget (and null out mGeckoChild).
         mGeckoChild->DispatchWindowEvent(event);
         if (!mGeckoChild || !event.mSucceeded || !event.mReply.mHasSelection)
           result = nil;
       }
 
       // Determine if we can paste (if receiving data from the service).
       if (mGeckoChild && returnType) {
-        nsContentCommandEvent command(PR_TRUE, NS_CONTENT_COMMAND_PASTE_TRANSFERABLE, mGeckoChild, PR_TRUE);
+        nsContentCommandEvent command(true, NS_CONTENT_COMMAND_PASTE_TRANSFERABLE, mGeckoChild, true);
         // This might possibly destroy our widget (and null out mGeckoChild).
         mGeckoChild->DispatchWindowEvent(command);
         if (!mGeckoChild || !command.mSucceeded || !command.mIsEnabled)
           result = nil;
       }
     }
   }
 
@@ -4716,17 +4716,17 @@ NSEvent* gLastDragMouseDownEvent = nil;
       [types containsObject:NSHTMLPboardType] == NO)
     return NO;
 
   // Bail out if there is no Gecko object.
   if (!mGeckoChild)
     return NO;
 
   // Obtain the current selection.
-  nsQueryContentEvent event(PR_TRUE,
+  nsQueryContentEvent event(true,
                             NS_QUERY_SELECTION_AS_TRANSFERABLE,
                             mGeckoChild);
   mGeckoChild->DispatchWindowEvent(event);
   if (!event.mSucceeded || !event.mReply.mTransferable)
     return NO;
 
   // Transform the transferable to an NSDictionary.
   NSDictionary* pasteboardOutputDict = nsClipboard::PasteboardDictFromTransferable(event.mReply.mTransferable);
@@ -4773,19 +4773,19 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   trans->AddDataFlavor(kUnicodeMime);
   trans->AddDataFlavor(kHTMLMime);
 
   rv = nsClipboard::TransferableFromPasteboard(trans, pboard);
   if (NS_FAILED(rv))
     return NO;
 
-  NS_ENSURE_TRUE(mGeckoChild, PR_FALSE);
-
-  nsContentCommandEvent command(PR_TRUE,
+  NS_ENSURE_TRUE(mGeckoChild, false);
+
+  nsContentCommandEvent command(true,
                                 NS_CONTENT_COMMAND_PASTE_TRANSFERABLE,
                                 mGeckoChild);
   command.mTransferable = trans;
   mGeckoChild->DispatchWindowEvent(command);
   
   return command.mSucceeded && command.mIsEnabled;
 }
 
--- a/widget/src/cocoa/nsClipboard.mm
+++ b/widget/src/cocoa/nsClipboard.mm
@@ -96,17 +96,17 @@ GetDataFromPasteboard(NSPasteboard* aPas
 NS_IMETHODIMP
 nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   if ((aWhichClipboard != kGlobalClipboard) || !mTransferable)
     return NS_ERROR_FAILURE;
 
-  mIgnoreEmptyNotification = PR_TRUE;
+  mIgnoreEmptyNotification = true;
 
   NSDictionary* pasteboardOutputDict = PasteboardDictFromTransferable(mTransferable);
   if (!pasteboardOutputDict)
     return NS_ERROR_FAILURE;
 
   // write everything out to the general pasteboard
   unsigned int outputCount = [pasteboardOutputDict count];
   NSArray* outputKeys = [pasteboardOutputDict allKeys];
@@ -125,17 +125,17 @@ nsClipboard::SetNativeClipboardData(PRIn
                        forType:currentKey];
     } else {
       [generalPBoard setData:currentValue forType:currentKey];
     }
   }
 
   mChangeCount = [generalPBoard changeCount];
 
-  mIgnoreEmptyNotification = PR_FALSE;
+  mIgnoreEmptyNotification = false;
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 nsresult
 nsClipboard::TransferableFromPasteboard(nsITransferable *aTransferable, NSPasteboard *cocoaPasteboard)
@@ -323,17 +323,17 @@ nsClipboard::GetNativeClipboardData(nsIT
 
 // returns true if we have *any* of the passed in flavors available for pasting
 NS_IMETHODIMP
 nsClipboard::HasDataMatchingFlavors(const char** aFlavorList, PRUint32 aLength,
                                     PRInt32 aWhichClipboard, bool* outResult)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
-  *outResult = PR_FALSE;
+  *outResult = false;
 
   if ((aWhichClipboard != kGlobalClipboard) || !aFlavorList)
     return NS_OK;
 
   // first see if we have data for this in our cached transferable
   if (mTransferable) {    
     nsCOMPtr<nsISupportsArray> transferableFlavorList;
     nsresult rv = mTransferable->FlavorsTransferableCanImport(getter_AddRefs(transferableFlavorList));
@@ -346,43 +346,43 @@ nsClipboard::HasDataMatchingFlavors(cons
         nsCOMPtr<nsISupportsCString> currentTransferableFlavor(do_QueryInterface(transferableFlavorSupports));
         if (!currentTransferableFlavor)
           continue;
         nsXPIDLCString transferableFlavorStr;
         currentTransferableFlavor->ToString(getter_Copies(transferableFlavorStr));
 
         for (PRUint32 k = 0; k < aLength; k++) {
           if (transferableFlavorStr.Equals(aFlavorList[k])) {
-            *outResult = PR_TRUE;
+            *outResult = true;
             return NS_OK;
           }
         }
       }      
     }    
   }
 
   NSPasteboard* generalPBoard = [NSPasteboard generalPasteboard];
 
   for (PRUint32 i = 0; i < aLength; i++) {
     nsDependentCString mimeType(aFlavorList[i]);
     NSString *pboardType = nil;
 
     if (nsClipboard::IsStringType(mimeType, &pboardType)) {
       NSString* availableType = [generalPBoard availableTypeFromArray:[NSArray arrayWithObject:pboardType]];
       if (availableType && [availableType isEqualToString:pboardType]) {
-        *outResult = PR_TRUE;
+        *outResult = true;
         break;
       }
     } else if (!strcmp(aFlavorList[i], kJPEGImageMime) ||
                !strcmp(aFlavorList[i], kPNGImageMime) ||
                !strcmp(aFlavorList[i], kGIFImageMime)) {
       NSString* availableType = [generalPBoard availableTypeFromArray:
                                   [NSArray arrayWithObjects:IMAGE_PASTEBOARD_TYPES]];
       if (availableType) {
-        *outResult = PR_TRUE;
+        *outResult = true;
         break;
       }
     }
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
@@ -549,19 +549,19 @@ nsClipboard::PasteboardDictFromTransfera
 bool nsClipboard::IsStringType(const nsCString& aMIMEType, NSString** aPasteboardType)
 {
   if (aMIMEType.EqualsLiteral(kUnicodeMime) ||
       aMIMEType.EqualsLiteral(kHTMLMime)) {
     if (aMIMEType.EqualsLiteral(kUnicodeMime))
       *aPasteboardType = NSStringPboardType;
     else
       *aPasteboardType = NSHTMLPboardType;
-    return PR_TRUE;
+    return true;
   } else {
-    return PR_FALSE;
+    return false;
   }
 }
 
 NSString* nsClipboard::WrapHtmlForSystemPasteboard(NSString* aString)
 {
   NSString* wrapped =
     [NSString stringWithFormat:
       @"<html>"
--- a/widget/src/cocoa/nsCocoaUtils.mm
+++ b/widget/src/cocoa/nsCocoaUtils.mm
@@ -408,10 +408,10 @@ nsCocoaUtils::InitNPCocoaEvent(NPCocoaEv
 
 // static
 void
 nsCocoaUtils::InitPluginEvent(nsPluginEvent &aPluginEvent,
                               NPCocoaEvent &aCocoaEvent)
 {
   aPluginEvent.time = PR_IntervalNow();
   aPluginEvent.pluginEvent = (void*)&aCocoaEvent;
-  aPluginEvent.retargetToFocusedDocument = PR_FALSE;
+  aPluginEvent.retargetToFocusedDocument = false;
 }
--- a/widget/src/cocoa/nsCocoaWindow.h
+++ b/widget/src/cocoa/nsCocoaWindow.h
@@ -147,17 +147,17 @@ typedef struct _nsCocoaWindowList {
 @interface WindowDelegate : NSObject <NSWindowDelegate>
 #else
 @interface WindowDelegate : NSObject
 #endif
 {
   nsCocoaWindow* mGeckoWindow; // [WEAK] (we are owned by the window)
   // Used to avoid duplication when we send NS_ACTIVATE and
   // NS_DEACTIVATE to Gecko for toplevel widgets.  Starts out
-  // PR_FALSE.
+  // false.
   bool mToplevelActiveState;
   BOOL mHasEverBeenZoomed;
 }
 + (void)paintMenubarForWindow:(NSWindow*)aWindow;
 - (id)initWithGeckoWindow:(nsCocoaWindow*)geckoWind;
 - (void)windowDidResize:(NSNotification*)aNotification;
 - (void)sendFocusEvent:(PRUint32)eventType;
 - (nsCocoaWindow*)geckoWidget;
--- a/widget/src/cocoa/nsCocoaWindow.mm
+++ b/widget/src/cocoa/nsCocoaWindow.mm
@@ -133,20 +133,20 @@ static void RollUpPopups()
 nsCocoaWindow::nsCocoaWindow()
 : mParent(nsnull)
 , mWindow(nil)
 , mDelegate(nil)
 , mSheetWindowParent(nil)
 , mPopupContentView(nil)
 , mShadowStyle(NS_STYLE_WINDOW_SHADOW_DEFAULT)
 , mWindowFilter(0)
-, mWindowMadeHere(PR_FALSE)
-, mSheetNeedsShow(PR_FALSE)
-, mFullScreen(PR_FALSE)
-, mModal(PR_FALSE)
+, mWindowMadeHere(false)
+, mSheetNeedsShow(false)
+, mFullScreen(false)
+, mModal(false)
 , mNumModalDescendents(0)
 {
 
 }
 
 void nsCocoaWindow::DestroyNativeWindow()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@@ -231,19 +231,19 @@ static void FitRectToVisibleAreaForScree
   }
 }
 
 // Some applications like Camino use native popup windows
 // (native context menus, native tooltips)
 static bool UseNativePopupWindows()
 {
 #ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
-  return PR_TRUE;
+  return true;
 #else
-  return PR_FALSE;
+  return false;
 #endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */
 }
 
 nsresult nsCocoaWindow::Create(nsIWidget *aParent,
                                nsNativeWidget aNativeParent,
                                const nsIntRect &aRect,
                                EVENT_CALLBACK aHandleEventFunction,
                                nsDeviceContext *aContext,
@@ -290,17 +290,17 @@ nsresult nsCocoaWindow::Create(nsIWidget
 
   mParent = aParent;
 
   // Applications that use native popups don't want us to create popup windows.
   if ((mWindowType == eWindowType_popup) && UseNativePopupWindows())
     return NS_OK;
 
   nsresult rv = CreateNativeWindow(nsCocoaUtils::GeckoRectToCocoaRect(newBounds),
-                                   mBorderStyle, PR_FALSE);
+                                   mBorderStyle, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (mWindowType == eWindowType_popup) {
     if (aInitData->mIsDragPopup) {
       [mWindow setIgnoresMouseEvents:YES];
     }
     return CreatePopupContentView(newBounds, aHandleEventFunction, aContext, aAppShell, aToolkit);
   }
@@ -465,17 +465,17 @@ nsresult nsCocoaWindow::CreateNativeWind
   [mWindow setContentMinSize:NSMakeSize(60, 60)];
   [mWindow disableCursorRects];
 
   // setup our notification delegate. Note that setDelegate: does NOT retain.
   mDelegate = [[WindowDelegate alloc] initWithGeckoWindow:this];
   [mWindow setDelegate:mDelegate];
 
   [[WindowDataMap sharedWindowDataMap] ensureDataForWindow:mWindow];
-  mWindowMadeHere = PR_TRUE;
+  mWindowMadeHere = true;
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
                              EVENT_CALLBACK aHandleEventFunction,
@@ -508,17 +508,17 @@ NS_IMETHODIMP nsCocoaWindow::Destroy()
 {
   if (mPopupContentView)
     mPopupContentView->Destroy();
 
   nsBaseWidget::Destroy();
   nsBaseWidget::OnDestroy();
 
   if (mFullScreen) {
-    nsCocoaUtils::HideOSChromeOnScreen(PR_FALSE, [mWindow screen]);
+    nsCocoaUtils::HideOSChromeOnScreen(false, [mWindow screen]);
   }
 
   return NS_OK;
 }
 
 nsIWidget* nsCocoaWindow::GetSheetWindowParent(void)
 {
   if (mWindowType != eWindowType_sheet)
@@ -608,17 +608,17 @@ NS_IMETHODIMP nsCocoaWindow::SetModal(bo
         windowList->window = this; // Don't ADDREF
         windowList->prev = gGeckoAppModalWindowList;
         gGeckoAppModalWindowList = windowList;
       }
     }
   }
   else {
     --gXULModalLevel;
-    NS_ASSERTION(gXULModalLevel >= 0, "Mismatched call to nsCocoaWindow::SetModal(PR_FALSE)!");
+    NS_ASSERTION(gXULModalLevel >= 0, "Mismatched call to nsCocoaWindow::SetModal(false)!");
     if (gCocoaAppModalWindowList)
       gCocoaAppModalWindowList->PopGecko(mWindow, this);
     if (mWindowType != eWindowType_sheet) {
       while (aParent) {
         if (--aParent->mNumModalDescendents == 0) {
           NSWindow *aWindow = aParent->GetCocoaWindow();
           if (aParent->mWindowType != eWindowType_invisible) {
             [[aWindow standardWindowButton:NSWindowCloseButton] setEnabled:YES];
@@ -674,23 +674,23 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool b
       bool parentIsSheet = false;
       if (NS_SUCCEEDED(piParentWidget->GetIsSheet(&parentIsSheet)) &&
           parentIsSheet) {
         piParentWidget->GetSheetWindowParent(&topNonSheetWindow);
         [NSApp endSheet:nativeParentWindow];
       }
 
       nsCocoaWindow* sheetShown = nsnull;
-      if (NS_SUCCEEDED(piParentWidget->GetChildSheet(PR_TRUE, &sheetShown)) &&
+      if (NS_SUCCEEDED(piParentWidget->GetChildSheet(true, &sheetShown)) &&
           (!sheetShown || sheetShown == this)) {
         // If this sheet is already the sheet actually being shown, don't
         // tell it to show again. Otherwise the number of calls to
         // [NSApp beginSheet...] won't match up with [NSApp endSheet...].
         if (![mWindow isVisible]) {
-          mSheetNeedsShow = PR_FALSE;
+          mSheetNeedsShow = false;
           mSheetWindowParent = topNonSheetWindow;
           // Only set contextInfo if our parent isn't a sheet.
           NSWindow* contextInfo = parentIsSheet ? nil : mSheetWindowParent;
           [TopLevelWindowData deactivateInWindow:mSheetWindowParent];
           [NSApp beginSheet:mWindow
              modalForWindow:mSheetWindowParent
               modalDelegate:mDelegate
              didEndSelector:@selector(didEndSheet:returnCode:contextInfo:)
@@ -698,17 +698,17 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool b
           [TopLevelWindowData activateInWindow:mWindow];
           SendSetZLevelEvent();
         }
       }
       else {
         // A sibling of this sheet is active, don't show this sheet yet.
         // When the active sheet hides, its brothers and sisters that have
         // mSheetNeedsShow set will have their opportunities to display.
-        mSheetNeedsShow = PR_TRUE;
+        mSheetNeedsShow = true;
       }
     }
     else if (mWindowType == eWindowType_popup) {
       // If a popup window is shown after being hidden, it needs to be "reset"
       // for it to receive any mouse events aside from mouse-moved events
       // (because it was removed from the "window cache" when it was hidden
       // -- see below).  Setting the window number to -1 and then back to its
       // original value seems to accomplish this.  The idea was "borrowed"
@@ -759,35 +759,35 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool b
       RollUpPopups();
 
     // now get rid of the window/sheet
     if (mWindowType == eWindowType_sheet) {
       if (mSheetNeedsShow) {
         // This is an attempt to hide a sheet that never had a chance to
         // be shown. There's nothing to do other than make sure that it
         // won't show.
-        mSheetNeedsShow = PR_FALSE;
+        mSheetNeedsShow = false;
       }
       else {
         // get sheet's parent *before* hiding the sheet (which breaks the linkage)
         NSWindow* sheetParent = mSheetWindowParent;
         
         // hide the sheet
         [NSApp endSheet:mWindow];
         
         [TopLevelWindowData deactivateInWindow:mWindow];
 
         nsCocoaWindow* siblingSheetToShow = nsnull;
         bool parentIsSheet = false;
 
         if (nativeParentWindow && piParentWidget &&
-            NS_SUCCEEDED(piParentWidget->GetChildSheet(PR_FALSE, &siblingSheetToShow)) &&
+            NS_SUCCEEDED(piParentWidget->GetChildSheet(false, &siblingSheetToShow)) &&
             siblingSheetToShow) {
           // First, give sibling sheets an opportunity to show.
-          siblingSheetToShow->Show(PR_TRUE);
+          siblingSheetToShow->Show(true);
         }
         else if (nativeParentWindow && piParentWidget &&
                  NS_SUCCEEDED(piParentWidget->GetIsSheet(&parentIsSheet)) &&
                  parentIsSheet) {
           // Only set contextInfo if the parent of the parent sheet we're about
           // to restore isn't itself a sheet.
           NSWindow* contextInfo = sheetParent;
           nsIWidget* grandparentWidget = nil;
@@ -995,17 +995,17 @@ void nsCocoaWindow::SetTransparencyMode(
 NS_IMETHODIMP nsCocoaWindow::Enable(bool aState)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsCocoaWindow::IsEnabled(bool *aState)
 {
   if (aState)
-    *aState = PR_TRUE;
+    *aState = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsCocoaWindow::ConstrainPosition(bool aAllowSlop,
                                                PRInt32 *aX, PRInt32 *aY)
 {
   return NS_OK;
 }
@@ -1091,17 +1091,17 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowC
   [contentView removeFromSuperviewWithoutNeedingDisplay];
 
   // Save state (like window title).
   NSMutableDictionary* state = [mWindow exportState];
 
   // Recreate the window with the right border style.
   NSRect frameRect = [mWindow frame];
   DestroyNativeWindow();
-  nsresult rv = CreateNativeWindow(frameRect, aShouldHide ? eBorderStyle_none : mBorderStyle, PR_TRUE);
+  nsresult rv = CreateNativeWindow(frameRect, aShouldHide ? eBorderStyle_none : mBorderStyle, true);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Re-import state.
   [mWindow importState:state];
 
   // Reparent the content view.
   [mWindow setContentView:contentView];
   [contentView release];
@@ -1109,17 +1109,17 @@ NS_IMETHODIMP nsCocoaWindow::HideWindowC
   // Reparent child windows.
   enumerator = [childWindows objectEnumerator];
   while ((child = [enumerator nextObject])) {
     [mWindow addChildWindow:child ordered:NSWindowAbove];
   }
 
   // Show the new window.
   if (isVisible) {
-    rv = Show(PR_TRUE);
+    rv = Show(true);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
@@ -1267,28 +1267,28 @@ NS_IMETHODIMP nsCocoaWindow::Update()
 //
 // The drag manager has let us know that something related to a drag has
 // occurred in this window. It could be any number of things, ranging from 
 // a drop, to a drag enter/leave, or a drag over event. The actual event
 // is passed in |aMessage| and is passed along to our event hanlder so Gecko
 // knows about it.
 bool nsCocoaWindow::DragEvent(unsigned int aMessage, Point aMouseGlobal, UInt16 aKeyModifiers)
 {
-  return PR_FALSE;
+  return false;
 }
 
 NS_IMETHODIMP nsCocoaWindow::SendSetZLevelEvent()
 {
-  nsZLevelEvent event(PR_TRUE, NS_SETZLEVEL, this);
+  nsZLevelEvent event(true, NS_SETZLEVEL, this);
 
   event.refPoint.x = mBounds.x;
   event.refPoint.y = mBounds.y;
   event.time = PR_IntervalNow();
 
-  event.mImmediate = PR_TRUE;
+  event.mImmediate = true;
 
   nsEventStatus status = nsEventStatus_eIgnore;
   DispatchEvent(&event, status);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsCocoaWindow::GetChildSheet(bool aShown, nsCocoaWindow** _retval)
@@ -1317,17 +1317,17 @@ NS_IMETHODIMP nsCocoaWindow::GetChildShe
 NS_IMETHODIMP nsCocoaWindow::GetRealParent(nsIWidget** parent)
 {
   *parent = mParent;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsCocoaWindow::GetIsSheet(bool* isSheet)
 {
-  mWindowType == eWindowType_sheet ? *isSheet = PR_TRUE : *isSheet = PR_FALSE;
+  mWindowType == eWindowType_sheet ? *isSheet = true : *isSheet = false;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsCocoaWindow::GetSheetWindowParent(NSWindow** sheetWindowParent)
 {
   *sheetWindowParent = mSheetWindowParent;
   return NS_OK;
 }
@@ -1366,45 +1366,45 @@ GetWindowSizeMode(NSWindow* aWindow) {
 void
 nsCocoaWindow::ReportMoveEvent()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   UpdateBounds();
 
   // Dispatch the move event to Gecko
-  nsGUIEvent guiEvent(PR_TRUE, NS_MOVE, this);
+  nsGUIEvent guiEvent(true, NS_MOVE, this);
   guiEvent.refPoint.x = mBounds.x;
   guiEvent.refPoint.y = mBounds.y;
   guiEvent.time = PR_IntervalNow();
   nsEventStatus status = nsEventStatus_eIgnore;
   DispatchEvent(&guiEvent, status);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void
 nsCocoaWindow::DispatchSizeModeEvent()
 {
-  nsSizeModeEvent event(PR_TRUE, NS_SIZEMODE, this);
+  nsSizeModeEvent event(true, NS_SIZEMODE, this);
   event.mSizeMode = GetWindowSizeMode(mWindow);
   event.time = PR_IntervalNow();
 
   nsEventStatus status = nsEventStatus_eIgnore;
   DispatchEvent(&event, status);
 }
 
 void
 nsCocoaWindow::ReportSizeEvent()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   UpdateBounds();
 
-  nsSizeEvent sizeEvent(PR_TRUE, NS_SIZE, this);
+  nsSizeEvent sizeEvent(true, NS_SIZE, this);
   sizeEvent.time = PR_IntervalNow();
 
   nsIntRect innerBounds;
   GetClientBounds(innerBounds);
   sizeEvent.windowSize = &innerBounds;
   sizeEvent.mWinWidth  = mBounds.width;
   sizeEvent.mWinHeight = mBounds.height;
 
@@ -1683,39 +1683,39 @@ void nsCocoaWindow::SetPopupWindowLevel(
   }
 }
 
 bool nsCocoaWindow::IsChildInFailingLeftClickThrough(NSView *aChild)
 {
   if ([aChild isKindOfClass:[ChildView class]]) {
     ChildView* childView = (ChildView*) aChild;
     if ([childView isInFailingLeftClickThrough])
-      return PR_TRUE;
+      return true;
   }
   NSArray* subviews = [aChild subviews];
   if (subviews) {
     NSUInteger count = [subviews count];
     for (NSUInteger i = 0; i < count; ++i) {
       NSView* aView = (NSView*) [subviews objectAtIndex:i];
       if (IsChildInFailingLeftClickThrough(aView))
-        return PR_TRUE;
+        return true;
     }
   }
-  return PR_FALSE;
+  return false;
 }
 
 // Don't focus a plugin if we're in a left click-through that will
 // fail (see [ChildView isInFailingLeftClickThrough]).  Called from
 // [ChildView shouldFocusPlugin].
 bool nsCocoaWindow::ShouldFocusPlugin()
 {
   if (IsChildInFailingLeftClickThrough([mWindow contentView]))
-    return PR_FALSE;
-
-  return PR_TRUE;
+    return false;
+
+  return true;
 }
 
 @implementation WindowDelegate
 
 // We try to find a gecko menu bar to paint. If one does not exist, just paint
 // the application menu by itself so that a window doesn't have some other
 // window's menu bar.
 + (void)paintMenubarForWindow:(NSWindow*)aWindow
@@ -1763,18 +1763,18 @@ bool nsCocoaWindow::ShouldFocusPlugin()
 }
 
 - (id)initWithGeckoWindow:(nsCocoaWindow*)geckoWind
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
   [super init];
   mGeckoWindow = geckoWind;
-  mToplevelActiveState = PR_FALSE;
-  mHasEverBeenZoomed = PR_FALSE;
+  mToplevelActiveState = false;
+  mHasEverBeenZoomed = false;
   return self;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
 }
 
 - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize
 {
   RollUpPopups();
@@ -1868,17 +1868,17 @@ bool nsCocoaWindow::ShouldFocusPlugin()
 {
   if (mGeckoWindow)
     mGeckoWindow->ReportMoveEvent();
 }
 
 - (BOOL)windowShouldClose:(id)sender
 {
   // We only want to send NS_XUL_CLOSE and let gecko close the window
-  nsGUIEvent guiEvent(PR_TRUE, NS_XUL_CLOSE, mGeckoWindow);
+  nsGUIEvent guiEvent(true, NS_XUL_CLOSE, mGeckoWindow);
   guiEvent.time = PR_IntervalNow();
   nsEventStatus status = nsEventStatus_eIgnore;
   mGeckoWindow->DispatchEvent(&guiEvent, status);
   return NO; // gecko will do it
 }
 
 - (void)windowWillClose:(NSNotification *)aNotification
 {
@@ -1912,17 +1912,17 @@ bool nsCocoaWindow::ShouldFocusPlugin()
 }
 
 - (void)sendFocusEvent:(PRUint32)eventType
 {
   if (!mGeckoWindow)
     return;
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  nsGUIEvent focusGuiEvent(PR_TRUE, eventType, mGeckoWindow);
+  nsGUIEvent focusGuiEvent(true, eventType, mGeckoWindow);
   focusGuiEvent.time = PR_IntervalNow();
   mGeckoWindow->DispatchEvent(&focusGuiEvent, status);
 }
 
 - (void)didEndSheet:(NSWindow*)sheet returnCode:(int)returnCode contextInfo:(void*)contextInfo
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
@@ -1950,25 +1950,25 @@ bool nsCocoaWindow::ShouldFocusPlugin()
 {
   return mToplevelActiveState;
 }
 
 - (void)sendToplevelActivateEvents
 {
   if (!mToplevelActiveState) {
     [self sendFocusEvent:NS_ACTIVATE];
-    mToplevelActiveState = PR_TRUE;
+    mToplevelActiveState = true;
   }
 }
 
 - (void)sendToplevelDeactivateEvents
 {
   if (mToplevelActiveState) {
     [self sendFocusEvent:NS_DEACTIVATE];
-    mToplevelActiveState = PR_FALSE;
+    mToplevelActiveState = false;
   }
 }
 
 @end
 
 static float
 GetDPI(NSWindow* aWindow)
 {
@@ -2409,17 +2409,17 @@ static const NSString* kStateShowsToolba
   RollUpPopups();
 
   if ([[self delegate] isKindOfClass:[WindowDelegate class]]) {
     WindowDelegate *windowDelegate = (WindowDelegate *)[self delegate];
     nsCocoaWindow *geckoWindow = [windowDelegate geckoWidget];
     if (!geckoWindow)
       return;
     nsEventStatus status = nsEventStatus_eIgnore;
-    nsGUIEvent guiEvent(PR_TRUE, NS_OS_TOOLBAR, geckoWindow);
+    nsGUIEvent guiEvent(true, NS_OS_TOOLBAR, geckoWindow);
     guiEvent.time = PR_IntervalNow();
     geckoWindow->DispatchEvent(&guiEvent, status);
   }
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 // Retain and release "self" to avoid crashes when our widget (and its native
--- a/widget/src/cocoa/nsDeviceContextSpecX.mm
+++ b/widget/src/cocoa/nsDeviceContextSpecX.mm
@@ -182,19 +182,19 @@ NS_IMETHODIMP nsDeviceContextSpecX::GetS
 
     nsRefPtr<gfxASurface> newSurface;
 
     if (context) {
         // Initially, origin is at bottom-left corner of the paper.
         // Here, we translate it to top-left corner of the paper.
         CGContextTranslateCTM(context, 0, height);
         CGContextScaleCTM(context, 1.0, -1.0);
-        newSurface = new gfxQuartzSurface(context, gfxSize(width, height), PR_TRUE);
+        newSurface = new gfxQuartzSurface(context, gfxSize(width, height), true);
     } else {
-        newSurface = new gfxQuartzSurface(gfxSize((PRInt32)width, (PRInt32)height), gfxASurface::ImageFormatARGB32, PR_TRUE);
+        newSurface = new gfxQuartzSurface(gfxSize((PRInt32)width, (PRInt32)height), gfxASurface::ImageFormatARGB32, true);
     }
 
     if (!newSurface)
         return NS_ERROR_FAILURE;
 
     *surface = newSurface;
     NS_ADDREF(*surface);
 
--- a/widget/src/cocoa/nsDragService.mm
+++ b/widget/src/cocoa/nsDragService.mm
@@ -303,28 +303,28 @@ nsDragService::InvokeDragSession(nsIDOMN
 
   nsBaseDragService::StartDragSession();
   nsBaseDragService::OpenDragPopup();
 
   // We need to retain the view and the event during the drag in case either gets destroyed.
   mNativeDragView = [gLastDragView retain];
   mNativeDragEvent = [gLastDragMouseDownEvent retain];
 
-  gUserCancelledDrag = PR_FALSE;
+  gUserCancelledDrag = false;
   [mNativeDragView dragImage:image
                           at:localPoint
                       offset:NSZeroSize
                        event:mNativeDragEvent
                   pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard]
                       source:mNativeDragView
                    slideBack:YES];
-  gUserCancelledDrag = PR_FALSE;
+  gUserCancelledDrag = false;
 
   if (mDoingDrag)
-    nsBaseDragService::EndDragSession(PR_FALSE);
+    nsBaseDragService::EndDragSession(false);
   
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
 nsDragService::GetData(nsITransferable* aTransferable, PRUint32 aItemIndex)
@@ -399,17 +399,17 @@ nsDragService::GetData(nsITransferable* 
       unsigned int dataLength = (stringLength + 1) * sizeof(PRUnichar); // in bytes
       PRUnichar* clipboardDataPtr = (PRUnichar*)malloc(dataLength);
       if (!clipboardDataPtr)
         return NS_ERROR_OUT_OF_MEMORY;
       [filePath getCharacters:clipboardDataPtr];
       clipboardDataPtr[stringLength] = 0; // null terminate
 
       nsCOMPtr<nsILocalFile> file;
-      nsresult rv = NS_NewLocalFile(nsDependentString(clipboardDataPtr), PR_TRUE, getter_AddRefs(file));
+      nsresult rv = NS_NewLocalFile(nsDependentString(clipboardDataPtr), true, getter_AddRefs(file));
       free(clipboardDataPtr);
       if (NS_FAILED(rv))
         continue;
 
       nsCOMPtr<nsISupports> genericDataWrapper;
       genericDataWrapper = do_QueryInterface(file);
       aTransferable->SetTransferData(flavorStr, genericDataWrapper, dataLength);
       
@@ -469,17 +469,17 @@ nsDragService::GetData(nsITransferable* 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
 nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
-  *_retval = PR_FALSE;
+  *_retval = false;
 
   if (!globalDragPboard)
     return NS_ERROR_FAILURE;
 
   nsDependentCString dataFlavor(aDataFlavor);
 
   // first see if we have data for this in our cached transferable
   if (mDataItems) {
@@ -506,39 +506,39 @@ nsDragService::IsDataFlavorSupported(con
         nsCOMPtr<nsISupports> genericFlavor;
         flavorList->GetElementAt(j, getter_AddRefs(genericFlavor));
         nsCOMPtr<nsISupportsCString> currentFlavor(do_QueryInterface(genericFlavor));
         if (!currentFlavor)
           continue;
         nsXPIDLCString flavorStr;
         currentFlavor->ToString(getter_Copies(flavorStr));
         if (dataFlavor.Equals(flavorStr)) {
-          *_retval = PR_TRUE;
+          *_retval = true;
           return NS_OK;
         }
       }
     }
   }
 
   NSString *pboardType = nil;
 
   if (dataFlavor.EqualsLiteral(kFileMime)) {
     NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:NSFilenamesPboardType]];
     if (availableType && [availableType isEqualToString:NSFilenamesPboardType])
-      *_retval = PR_TRUE;
+      *_retval = true;
   }
   else if (dataFlavor.EqualsLiteral(kURLMime)) {
     NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:kCorePboardType_url]];
     if (availableType && [availableType isEqualToString:kCorePboardType_url])
-      *_retval = PR_TRUE;
+      *_retval = true;
   }
   else if (nsClipboard::IsStringType(dataFlavor, &pboardType)) {
     NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObject:pboardType]];
     if (availableType && [availableType isEqualToString:pboardType])
-      *_retval = PR_TRUE;
+      *_retval = true;
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
--- a/widget/src/cocoa/nsFilePicker.mm
+++ b/widget/src/cocoa/nsFilePicker.mm
@@ -88,17 +88,17 @@ NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFile
 // the pref. If the secret API was used once and things worked out it should
 // continue working for subsequent calls so the user is at no more risk.
 static void SetShowHiddenFileState(NSSavePanel* panel)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   bool show = false;
   if (NS_SUCCEEDED(Preferences::GetBool(kShowHiddenFilesPref, &show))) {
-    gCallSecretHiddenFileAPI = PR_TRUE;
+    gCallSecretHiddenFileAPI = true;
   }
 
   if (gCallSecretHiddenFileAPI) {
     // invoke a method to get a Cocoa-internal nav view
     SEL navViewSelector = @selector(_navView);
     NSMethodSignature* navViewSignature = [panel methodSignatureForSelector:navViewSelector];
     if (!navViewSignature)
       return;
@@ -247,21 +247,21 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16
 // make this look as much like Carbon nsFilePicker as possible.  
 
   mFiles.Clear();
   nsCOMPtr<nsILocalFile> theFile;
 
   switch (mMode)
   {
     case modeOpen:
-      userClicksOK = GetLocalFiles(mTitle, PR_FALSE, mFiles);
+      userClicksOK = GetLocalFiles(mTitle, false, mFiles);
       break;
     
     case modeOpenMultiple:
-      userClicksOK = GetLocalFiles(mTitle, PR_TRUE, mFiles);
+      userClicksOK = GetLocalFiles(mTitle, true, mFiles);
       break;
       
     case modeSave:
       userClicksOK = PutLocalFile(mTitle, mDefault, getter_AddRefs(theFile));
       break;
       
     case modeGetFolder:
       userClicksOK = GetLocalFolder(mTitle, getter_AddRefs(theFile));
@@ -400,17 +400,17 @@ nsFilePicker::GetLocalFiles(const nsStri
   // We are using Fast Enumeration, thus the NSURL array is created once then
   // iterated.
   for (NSURL* url in [thePanel URLs]) {
     if (!url) {
       continue;
     }
 
     nsCOMPtr<nsILocalFile> localFile;
-    NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile));
+    NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localFile));
     nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(localFile);
     if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)url))) {
       outFiles.AppendObject(localFile);
     }
   }
 
   if (outFiles.Count() > 0)
     retVal = returnOK;
@@ -452,17 +452,17 @@ nsFilePicker::GetLocalFolder(const nsStr
 
   if (result == NSFileHandlingPanelCancelButton)
     return retVal;
 
   // get the path for the folder (we allow just 1, so that's all we get)
   NSURL *theURL = [[thePanel URLs] objectAtIndex:0];
   if (theURL) {
     nsCOMPtr<nsILocalFile> localFile;
-    NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile));
+    NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localFile));
     nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(localFile);
     if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)theURL))) {
       *outFile = localFile;
       NS_ADDREF(*outFile);
       retVal = returnOK;
     }
   }
 
@@ -506,17 +506,17 @@ nsFilePicker::PutLocalFile(const nsStrin
   NSPopUpButton* popupButton = [accessoryView viewWithTag:kSaveTypeControlTag];
   if (popupButton) {
     mSelectedTypeIndex = [popupButton indexOfSelectedItem];
   }
 
   NSURL* fileURL = [thePanel URL];
   if (fileURL) { 
     nsCOMPtr<nsILocalFile> localFile;
-    NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile));
+    NS_NewLocalFile(EmptyString(), true, getter_AddRefs(localFile));
     nsCOMPtr<nsILocalFileMac> macLocalFile = do_QueryInterface(localFile);
     if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL((CFURLRef)fileURL))) {
       *outFile = localFile;
       NS_ADDREF(*outFile);
       // We tell if we are replacing or not by just looking to see if the file exists.
       // The user could not have hit OK and not meant to replace the file.
       if ([[NSFileManager defaultManager] fileExistsAtPath:[fileURL path]])
         retVal = returnReplace;
--- a/widget/src/cocoa/nsMenuBarX.mm
+++ b/widget/src/cocoa/nsMenuBarX.mm
@@ -448,17 +448,17 @@ char nsMenuBarX::GetLocalizedAccelKey(co
 // the caller can hang onto it if they so choose. It is acceptable to pass nsull
 // for |outHiddenNode| if the caller doesn't care about the hidden node.
 void nsMenuBarX::HideItem(nsIDOMDocument* inDoc, const nsAString & inID, nsIContent** outHiddenNode)
 {
   nsCOMPtr<nsIDOMElement> menuItem;
   inDoc->GetElementById(inID, getter_AddRefs(menuItem));  
   nsCOMPtr<nsIContent> menuContent(do_QueryInterface(menuItem));
   if (menuContent) {
-    menuContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::hidden, NS_LITERAL_STRING("true"), PR_FALSE);
+    menuContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::hidden, NS_LITERAL_STRING("true"), false);
     if (outHiddenNode) {
       *outHiddenNode = menuContent.get();
       NS_IF_ADDREF(*outHiddenNode);
     }
   }
 }
 
 // Do what is necessary to conform to the Aqua guidelines for menus.
--- a/widget/src/cocoa/nsMenuItemIconX.mm
+++ b/widget/src/cocoa/nsMenuItemIconX.mm
@@ -78,18 +78,18 @@ typedef NS_STDCALL_FUNCPROTO(nsresult, G
 
 NS_IMPL_ISUPPORTS2(nsMenuItemIconX, imgIContainerObserver, imgIDecoderObserver)
 
 nsMenuItemIconX::nsMenuItemIconX(nsMenuObjectX* aMenuItem,
                                  nsIContent*    aContent,
                                  NSMenuItem*    aNativeMenuItem)
 : mContent(aContent)
 , mMenuObject(aMenuItem)
-, mLoadedIcon(PR_FALSE)
-, mSetIcon(PR_FALSE)
+, mLoadedIcon(false)
+, mSetIcon(false)
 , mNativeMenuItem(aNativeMenuItem)
 {
   //  printf("Creating icon for menu item %d, menu %d, native item is %d\n", aMenuItem, aMenu, aNativeMenuItem);
 }
 
 nsMenuItemIconX::~nsMenuItemIconX()
 {
   if (mIconRequest)
@@ -298,17 +298,17 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconU
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   if (mIconRequest) {
     // Another icon request is already in flight.  Kill it.
     mIconRequest->Cancel(NS_BINDING_ABORTED);
     mIconRequest = nsnull;
   }
 
-  mLoadedIcon = PR_FALSE;
+  mLoadedIcon = false;
 
   if (!mContent) return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIDocument> document = mContent->GetOwnerDoc();
   if (!document) return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsILoadGroup> loadGroup = document->GetDocumentLoadGroup();
   if (!loadGroup) return NS_ERROR_FAILURE;
@@ -322,17 +322,17 @@ nsMenuItemIconX::LoadIcon(nsIURI* aIconU
     // Set a completely transparent 16x16 image as the icon on this menu item
     // as a placeholder.  This keeps the menu item text displayed in the same
     // position that it will be displayed when the real icon is loaded, and
     // prevents it from jumping around or looking misaligned.
 
     static bool sInitializedPlaceholder;
     static NSImage* sPlaceholderIconImage;
     if (!sInitializedPlaceholder) {
-      sInitializedPlaceholder = PR_TRUE;
+      sInitializedPlaceholder = true;
 
       // Note that we only create the one and reuse it forever, so this is not a leak.
       sPlaceholderIconImage = [[NSImage alloc] initWithSize:NSMakeSize(kIconWidth, kIconHeight)];
     }
 
     if (!sPlaceholderIconImage) return NS_ERROR_FAILURE;
 
     if (mNativeMenuItem)
@@ -516,18 +516,18 @@ nsMenuItemIconX::OnStopFrame(imgIRequest
     return NS_ERROR_FAILURE;
   }
 
   [mNativeMenuItem setImage:newImage];
   
   [newImage release];
   ::CGImageRelease(iconImage);
 
-  mLoadedIcon = PR_TRUE;
-  mSetIcon = PR_TRUE;
+  mLoadedIcon = true;
+  mSetIcon = true;
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
 nsMenuItemIconX::OnStopContainer(imgIRequest*   aRequest,
--- a/widget/src/cocoa/nsMenuItemX.mm
+++ b/widget/src/cocoa/nsMenuItemX.mm
@@ -57,17 +57,17 @@
 #include "nsIDOMElement.h"
 
 nsMenuItemX::nsMenuItemX()
 {
   mType           = eRegularMenuItemType;
   mNativeMenuItem = nil;
   mMenuParent     = nsnull;
   mMenuGroupOwner = nsnull;
-  mIsChecked      = PR_FALSE;
+  mIsChecked      = false;
 
   MOZ_COUNT_CTOR(nsMenuItemX);
 }
 
 nsMenuItemX::~nsMenuItemX()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
@@ -158,17 +158,17 @@ nsresult nsMenuItemX::SetChecked(bool aI
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   mIsChecked = aIsChecked;
   
   // update the content model. This will also handle unchecking our siblings
   // if we are a radiomenu
   mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, 
-                    mIsChecked ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false"), PR_TRUE);
+                    mIsChecked ? NS_LITERAL_STRING("true") : NS_LITERAL_STRING("false"), true);
   
   // update native menu item
   if (mIsChecked)
     [mNativeMenuItem setState:NSOnState];
   else
     [mNativeMenuItem setState:NSOffState];
 
   return NS_OK;
@@ -218,21 +218,21 @@ nsresult nsMenuItemX::DispatchDOMEvent(c
 
   // create DOM event
   nsCOMPtr<nsIDOMEvent> event;
   nsresult rv = domDoc->CreateEvent(NS_LITERAL_STRING("Events"), getter_AddRefs(event));
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to create nsIDOMEvent");
     return rv;
   }
-  event->InitEvent(eventName, PR_TRUE, PR_TRUE);
+  event->InitEvent(eventName, true, true);
 
   // mark DOM event as trusted
   nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(event));
-  privateEvent->SetTrusted(PR_TRUE);
+  privateEvent->SetTrusted(true);
 
   // send DOM event
   nsCOMPtr<nsIDOMEventTarget> eventTarget = do_QueryInterface(mContent);
   rv = eventTarget->DispatchEvent(event, preventDefaultCalled);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to send DOM event via nsIDOMEventTarget");
     return rv;
   }
@@ -257,17 +257,17 @@ void nsMenuItemX::UncheckRadioSiblings(n
   PRUint32 count = parent->GetChildCount();
   for (PRUint32 i = 0; i < count; i++) {
     nsIContent *sibling = parent->GetChildAt(i);
     if (sibling) {      
       if (sibling != inCheckedContent) { // skip this node
         // if the current sibling is in the same group, clear it
         if (sibling->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::name,
                                  myGroupName, eCaseMatters))
-          sibling->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, NS_LITERAL_STRING("false"), PR_TRUE);
+          sibling->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, NS_LITERAL_STRING("false"), true);
       }
     }    
   }
 }
 
 void nsMenuItemX::SetKeyEquiv()
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@@ -321,22 +321,22 @@ nsMenuItemX::ObserveAttributeChanged(nsI
     if (aAttribute == nsWidgetAtoms::checked) {
       // if we're a radio menu, uncheck our sibling radio items. No need to
       // do any of this if we're just a normal check menu.
       if (mType == eRadioMenuItemType) {
         if (mContent->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::checked,
                                   nsWidgetAtoms::_true, eCaseMatters))
           UncheckRadioSiblings(mContent);
       }
-      mMenuParent->SetRebuild(PR_TRUE);
+      mMenuParent->SetRebuild(true);
     }
     else if (aAttribute == nsWidgetAtoms::hidden ||
              aAttribute == nsWidgetAtoms::collapsed ||
              aAttribute == nsWidgetAtoms::label) {
-      mMenuParent->SetRebuild(PR_TRUE);
+      mMenuParent->SetRebuild(true);
     }
     else if (aAttribute == nsWidgetAtoms::key) {
       SetKeyEquiv();
     }
     else if (aAttribute == nsWidgetAtoms::image) {
       SetupIcon();
     }
     else if (aAttribute == nsWidgetAtoms::disabled) {
@@ -353,19 +353,19 @@ nsMenuItemX::ObserveAttributeChanged(nsI
       // first we sync our menu item DOM node with the command DOM node
       nsAutoString commandDisabled;
       nsAutoString menuDisabled;
       aContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled);
       mContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, menuDisabled);
       if (!commandDisabled.Equals(menuDisabled)) {
         // The menu's disabled state needs to be updated to match the command.
         if (commandDisabled.IsEmpty()) 
-          mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, PR_TRUE);
+          mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, true);
         else
-          mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, PR_TRUE);
+          mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, true);
       }
       // now we sync our native menu item with the command DOM node
       if (aContent->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::disabled, nsWidgetAtoms::_true, eCaseMatters))
         [mNativeMenuItem setEnabled:NO];
       else
         [mNativeMenuItem setEnabled:YES];
     }
   }
@@ -375,22 +375,22 @@ nsMenuItemX::ObserveAttributeChanged(nsI
 
 void nsMenuItemX::ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild, PRInt32 aIndexInContainer)
 {
   if (aChild == mCommandContent) {
     mMenuGroupOwner->UnregisterForContentChanges(mCommandContent);
     mCommandContent = nsnull;
   }
 
-  mMenuParent->SetRebuild(PR_TRUE);
+  mMenuParent->SetRebuild(true);
 }
 
 void nsMenuItemX::ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer,
                                          nsIContent *aChild)
 {
-  mMenuParent->SetRebuild(PR_TRUE);
+  mMenuParent->SetRebuild(true);
 }
 
 void nsMenuItemX::SetupIcon()
 {
   if (mIcon)
     mIcon->SetupIcon();
 }
--- a/widget/src/cocoa/nsMenuUtilsX.mm
+++ b/widget/src/cocoa/nsMenuUtilsX.mm
@@ -65,21 +65,21 @@ void nsMenuUtilsX::DispatchCommandTo(nsI
                         getter_AddRefs(event));
     nsCOMPtr<nsIDOMXULCommandEvent> command = do_QueryInterface(event);
     nsCOMPtr<nsIPrivateDOMEvent> pEvent = do_QueryInterface(command);
 
     // FIXME: Should probably figure out how to init this with the actual
     // pressed keys, but this is a big old edge case anyway. -dwh
     if (pEvent &&
         NS_SUCCEEDED(command->InitCommandEvent(NS_LITERAL_STRING("command"),
-                                               PR_TRUE, PR_TRUE,
+                                               true, true,
                                                doc->GetWindow(), 0,
-                                               PR_FALSE, PR_FALSE, PR_FALSE,
-                                               PR_FALSE, nsnull))) {
-      pEvent->SetTrusted(PR_TRUE);
+                                               false, false, false,
+                                               false, nsnull))) {
+      pEvent->SetTrusted(true);
       bool dummy;
       target->DispatchEvent(event, &dummy);
     }
   }
 }
 
 NSString* nsMenuUtilsX::GetTruncatedCocoaLabel(const nsString& itemLabel)
 {
--- a/widget/src/cocoa/nsMenuX.mm
+++ b/widget/src/cocoa/nsMenuX.mm
@@ -119,38 +119,38 @@ PRInt32 nsMenuX::sIndexingMenuLevel = 0;
 
 
 //
 // nsMenuX
 //
 
 nsMenuX::nsMenuX()
 : mVisibleItemsCount(0), mParent(nsnull), mMenuGroupOwner(nsnull),
-  mNativeMenu(nil), mNativeMenuItem(nil), mIsEnabled(PR_TRUE),
-  mDestroyHandlerCalled(PR_FALSE), mNeedsRebuild(PR_TRUE),
-  mConstructed(PR_FALSE), mVisible(PR_TRUE), mXBLAttached(PR_FALSE)
+  mNativeMenu(nil), mNativeMenuItem(nil), mIsEnabled(true),
+  mDestroyHandlerCalled(false), mNeedsRebuild(true),
+  mConstructed(false), mVisible(true), mXBLAttached(false)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   if (!gMenuMethodsSwizzled) {
     nsToolkit::SwizzleMethods([NSMenu class], @selector(_addItem:toTable:),
-                              @selector(nsMenuX_NSMenu_addItem:toTable:), PR_TRUE);
+                              @selector(nsMenuX_NSMenu_addItem:toTable:), true);
     nsToolkit::SwizzleMethods([NSMenu class], @selector(_removeItem:fromTable:),
-                              @selector(nsMenuX_NSMenu_removeItem:fromTable:), PR_TRUE);
+                              @selector(nsMenuX_NSMenu_removeItem:fromTable:), true);
     // On SnowLeopard the Shortcut framework (which contains the
     // SCTGRLIndex class) is loaded on demand, whenever the user first opens
     // a menu (which normally hasn't happened yet).  So we need to load it
     // here explicitly.
     if (nsToolkit::OnSnowLeopardOrLater())
       dlopen("/System/Library/PrivateFrameworks/Shortcut.framework/Shortcut", RTLD_LAZY);
     Class SCTGRLIndexClass = ::NSClassFromString(@"SCTGRLIndex");
     nsToolkit::SwizzleMethods(SCTGRLIndexClass, @selector(indexMenuBarDynamically),
                               @selector(nsMenuX_SCTGRLIndex_indexMenuBarDynamically));
 
-    gMenuMethodsSwizzled = PR_TRUE;
+    gMenuMethodsSwizzled = true;
   }
 
   mMenuDelegate = [[MenuDelegate alloc] initWithGeckoMenu:this];
     
   if (!nsMenuBarX::sNativeEventTarget)
     nsMenuBarX::sNativeEventTarget = [[NativeMenuItemTarget alloc] init];
 
   MOZ_COUNT_CTOR(nsMenuX);
@@ -203,19 +203,19 @@ nsresult nsMenuX::Create(nsMenuObjectX* 
 #ifdef DEBUG
   nsMenuObjectTypeX parentType =
 #endif
     mParent->MenuObjectType();
   NS_ASSERTION((parentType == eMenuBarObjectType || parentType == eSubmenuObjectType || parentType == eStandaloneNativeMenuObjectType),
                "Menu parent not a menu bar, menu, or native menu!");
 
   if (nsMenuUtilsX::NodeIsHiddenOrCollapsed(mContent))
-    mVisible = PR_FALSE;
+    mVisible = false;
   if (mContent->GetChildCount() == 0)
-    mVisible = PR_FALSE;
+    mVisible = false;
 
   NSString *newCocoaLabelString = nsMenuUtilsX::GetTruncatedCocoaLabel(mLabel);
   mNativeMenuItem = [[NSMenuItem alloc] initWithTitle:newCocoaLabelString action:nil keyEquivalent:@""];
   [mNativeMenuItem setSubmenu:mNativeMenu];
 
   SetEnabled(!mContent->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::disabled,
                                     nsWidgetAtoms::_true, eCaseMatters));
 
@@ -362,34 +362,34 @@ nsresult nsMenuX::RemoveAll()
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 nsEventStatus nsMenuX::MenuOpened()
 {
   // Open the node.
-  mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::open, NS_LITERAL_STRING("true"), PR_TRUE);
+  mContent->SetAttr(kNameSpaceID_None, nsWidgetAtoms::open, NS_LITERAL_STRING("true"), true);
 
   // Fire a handler. If we're told to stop, don't build the menu at all
   bool keepProcessing = OnOpen();
 
   if (!mNeedsRebuild || !keepProcessing)
     return nsEventStatus_eConsumeNoDefault;
 
   if (!mConstructed || mNeedsRebuild) {
     if (mNeedsRebuild)
       RemoveAll();
 
     MenuConstruct();
     mConstructed = true;
   }
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_SHOWN, nsnull, nsMouseEvent::eReal);
+  nsMouseEvent event(true, NS_XUL_POPUP_SHOWN, nsnull, nsMouseEvent::eReal);
 
   nsCOMPtr<nsIContent> popupContent;
   GetMenuPopupContent(getter_AddRefs(popupContent));
   nsIContent* dispatchTo = popupContent ? popupContent : mContent;
   dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
   
   return nsEventStatus_eConsumeNoDefault;
 }
@@ -399,46 +399,46 @@ void nsMenuX::MenuClosed()
   if (mConstructed) {
     // Don't close if a handler tells us to stop.
     if (!OnClose())
       return;
 
     if (mNeedsRebuild)
       mConstructed = false;
 
-    mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::open, PR_TRUE);
+    mContent->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::open, true);
 
     nsEventStatus status = nsEventStatus_eIgnore;
-    nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_HIDDEN, nsnull, nsMouseEvent::eReal);
+    nsMouseEvent event(true, NS_XUL_POPUP_HIDDEN, nsnull, nsMouseEvent::eReal);
 
     nsCOMPtr<nsIContent> popupContent;
     GetMenuPopupContent(getter_AddRefs(popupContent));
     nsIContent* dispatchTo = popupContent ? popupContent : mContent;
     dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
 
-    mDestroyHandlerCalled = PR_TRUE;
+    mDestroyHandlerCalled = true;
     mConstructed = false;
   }
 }
 
 void nsMenuX::MenuConstruct()
 {
   mConstructed = false;
-  gConstructingMenu = PR_TRUE;
+  gConstructingMenu = true;
   
   // reset destroy handler flag so that we'll know to fire it next time this menu goes away.
-  mDestroyHandlerCalled = PR_FALSE;
+  mDestroyHandlerCalled = false;
 
   //printf("nsMenuX::MenuConstruct called for %s = %d \n", NS_LossyConvertUTF16toASCII(mLabel).get(), mNativeMenu);
 
   // Retrieve our menupopup.
   nsCOMPtr<nsIContent> menuPopup;
   GetMenuPopupContent(getter_AddRefs(menuPopup));
   if (!menuPopup) {
-    gConstructingMenu = PR_FALSE;
+    gConstructingMenu = false;
     return;
   }
 
   // bug 365405: Manually wrap the menupopup node to make sure it's bounded
   if (!mXBLAttached) {
     nsresult rv;
     nsCOMPtr<nsIXPConnect> xpconnect =
       do_GetService(nsIXPConnect::GetCID(), &rv);
@@ -450,17 +450,17 @@ void nsMenuX::MenuConstruct()
         JSObject* global = sgo->GetGlobalJSObject();
         if (scriptContext && global) {
           JSContext* cx = (JSContext*)scriptContext->GetNativeContext();
           if (cx) {
             nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper;
             xpconnect->WrapNative(cx, global,
                                   menuPopup, NS_GET_IID(nsISupports),
                                   getter_AddRefs(wrapper));
-            mXBLAttached = PR_TRUE;
+            mXBLAttached = true;
           }
         }
       } 
     }
   }
 
   // Iterate over the kids
   PRUint32 count = menuPopup->GetChildCount();
@@ -471,18 +471,18 @@ void nsMenuX::MenuConstruct()
       nsIAtom *tag = child->Tag();
       if (tag == nsWidgetAtoms::menuitem || tag == nsWidgetAtoms::menuseparator)
         LoadMenuItem(child);
       else if (tag == nsWidgetAtoms::menu)
         LoadSubMenu(child);
     }
   } // for each menu item
 
-  gConstructingMenu = PR_FALSE;
-  mNeedsRebuild = PR_FALSE;
+  gConstructingMenu = false;
+  mNeedsRebuild = false;
   // printf("Done building, mMenuObjectsArray.Count() = %d \n", mMenuObjectsArray.Count());
 }
 
 void nsMenuX::SetRebuild(bool aNeedsRebuild)
 {
   if (!gConstructingMenu)
     mNeedsRebuild = aNeedsRebuild;
 }
@@ -587,41 +587,41 @@ void nsMenuX::LoadSubMenu(nsIContent* in
   menu.forget();
 }
 
 // This menu is about to open. Returns TRUE if we should keep processing the event,
 // FALSE if the handler wants to stop the opening of the menu.
 bool nsMenuX::OnOpen()
 {
   nsEventStatus status = nsEventStatus_eIgnore;
-  nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_SHOWING, nsnull,
+  nsMouseEvent event(true, NS_XUL_POPUP_SHOWING, nsnull,
                      nsMouseEvent::eReal);
   
   nsCOMPtr<nsIContent> popupContent;
   GetMenuPopupContent(getter_AddRefs(popupContent));
   
   nsresult rv = NS_OK;
   nsIContent* dispatchTo = popupContent ? popupContent : mContent;
   rv = dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
   if (NS_FAILED(rv) || status == nsEventStatus_eConsumeNoDefault)
-    return PR_FALSE;
+    return false;
 
   // If the open is going to succeed we need to walk our menu items, checking to
   // see if any of them have a command attribute. If so, several apptributes
   // must potentially be updated.
 
   // Get new popup content first since it might have changed as a result of the
   // NS_XUL_POPUP_SHOWING event above.
   GetMenuPopupContent(getter_AddRefs(popupContent));
   if (!popupContent)
-    return PR_TRUE;
+    return true;
 
   nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(popupContent->GetDocument()));
   if (!domDoc)
-    return PR_TRUE;
+    return true;
 
   PRUint32 count = popupContent->GetChildCount();
   for (PRUint32 i = 0; i < count; i++) {
     nsIContent *grandChild = popupContent->GetChildAt(i);
     if (grandChild->Tag() == nsWidgetAtoms::menuitem) {
       // See if we have a command attribute.
       nsAutoString command;
       grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::command, command);
@@ -633,71 +633,71 @@ bool nsMenuX::OnOpen()
         
         if (commandContent) {
           nsAutoString commandDisabled, menuDisabled;
           commandContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled);
           grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, menuDisabled);
           if (!commandDisabled.Equals(menuDisabled)) {
             // The menu's disabled state needs to be updated to match the command.
             if (commandDisabled.IsEmpty()) 
-              grandChild->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, PR_TRUE);
+              grandChild->UnsetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, true);
             else
-              grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, PR_TRUE);
+              grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::disabled, commandDisabled, true);
           }
           
           // The menu's value and checked states need to be updated to match the command.
           // Note that (unlike the disabled state) if the command has *no* value for either, we
           // assume the menu is supplying its own.
           nsAutoString commandChecked, menuChecked;
           commandContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, commandChecked);
           grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, menuChecked);
           if (!commandChecked.Equals(menuChecked)) {
             if (!commandChecked.IsEmpty()) 
-              grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, commandChecked, PR_TRUE);
+              grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::checked, commandChecked, true);
           }
           
           nsAutoString commandValue, menuValue;
           commandContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, commandValue);
           grandChild->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, menuValue);
           if (!commandValue.Equals(menuValue)) {
             if (!commandValue.IsEmpty()) 
-              grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::label, commandValue, PR_TRUE);
+              grandChild->SetAttr(kNameSpaceID_None, nsWidgetAtoms::label, commandValue, true);
           }
         }
       }
     }
   }
 
-  return PR_TRUE;
+  return true;
 }
 
 // Returns TRUE if we should keep processing the event, FALSE if the handler
 // wants to stop the closing of the menu.
 bool nsMenuX::OnClose()
 {
   if (mDestroyHandlerCalled)
-    return PR_TRUE;
+    return true;
 
   nsEventStatus status = nsEventStatus_eIgnore;
-  nsMouseEvent event(PR_TRUE, NS_XUL_POPUP_HIDING, nsnull,
+  nsMouseEvent event(true, NS_XUL_POPUP_HIDING, nsnull,
                      nsMouseEvent::eReal);
 
   nsCOMPtr<nsIContent> popupContent;
   GetMenuPopupContent(getter_AddRefs(popupContent));
 
   nsresult rv = NS_OK;
   nsIContent* dispatchTo = popupContent ? popupContent : mContent;
   rv = dispatchTo->DispatchDOMEvent(&event, nsnull, nsnull, &status);
   
-  mDestroyHandlerCalled = PR_TRUE;
+  mDestroyHandlerCalled = true;
   
   if (NS_FAILED(rv) || status == nsEventStatus_eConsumeNoDefault)
-    return PR_FALSE;
+    return false;
   
-  return PR_TRUE;
+  return true;
 }
 
 // Find the |menupopup| child in the |popup| representing this menu. It should be one
 // of a very few children so we won't be iterating over a bazillion menu items to find
 // it (so the strcmp won't kill us).
 void nsMenuX::GetMenuPopupContent(nsIContent** aResult)
 {
   if (!aResult)
@@ -745,17 +745,17 @@ NSMenuItem* nsMenuX::NativeMenuItem()
 
 bool nsMenuX::IsXULHelpMenu(nsIContent* aMenuContent)
 {
   bool retval = false;
   if (aMenuContent) {
     nsAutoString id;
     aMenuContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::id, id);
     if (id.Equals(NS_LITERAL_STRING("helpMenu")))
-      retval = PR_TRUE;
+      retval = true;
   }
   return retval;
 }
 
 //
 // nsChangeObserver
 //
 
@@ -782,41 +782,41 @@ void nsMenuX::ObserveAttributeChanged(ns
     // a regular menu, just change the title and redraw the menubar.
     if (parentType == eMenuBarObjectType) {
       // reuse the existing menu, to avoid rebuilding the root menu bar.
       NS_ASSERTION(mNativeMenu, "nsMenuX::AttributeChanged: invalid menu handle.");
       NSString *newCocoaLabelString = nsMenuUtilsX::GetTruncatedCocoaLabel(mLabel);
       [mNativeMenu setTitle:newCocoaLabelString];
     }
     else if (parentType == eSubmenuObjectType) {
-      static_cast<nsMenuX*>(mParent)->SetRebuild(PR_TRUE);
+      static_cast<nsMenuX*>(mParent)->SetRebuild(true);
     }    
     else if (parentType == eStandaloneNativeMenuObjectType) {
-      static_cast<nsStandaloneNativeMenu*>(mParent)->GetMenuXObject()->SetRebuild(PR_TRUE);
+      static_cast<nsStandaloneNativeMenu*>(mParent)->GetMenuXObject()->SetRebuild(true);
     }
   }
   else if (aAttribute == nsWidgetAtoms::hidden || aAttribute == nsWidgetAtoms::collapsed) {
-    SetRebuild(PR_TRUE);
+    SetRebuild(true);
 
     bool contentIsHiddenOrCollapsed = nsMenuUtilsX::NodeIsHiddenOrCollapsed(mContent);
 
     // don't do anything if the state is correct already
     if (contentIsHiddenOrCollapsed != mVisible)
       return;
 
     if (contentIsHiddenOrCollapsed) {
       if (parentType == eMenuBarObjectType ||
           parentType == eSubmenuObjectType ||
           parentType == eStandaloneNativeMenuObjectType) {
         NSMenu* parentMenu = (NSMenu*)mParent->NativeData();
         // An exception will get thrown if we try to remove an item that isn't
         // in the menu.
         if ([parentMenu indexOfItem:mNativeMenuItem] != -1)
           [parentMenu removeItem:mNativeMenuItem];
-        mVisible = PR_FALSE;
+        mVisible = false;
       }
     }
     else {
       if (parentType == eMenuBarObjectType ||
           parentType == eSubmenuObjectType ||
           parentType == eStandaloneNativeMenuObjectType) {
         int insertionIndex = nsMenuUtilsX::CalculateNativeInsertionPoint(mParent, this);
         if (parentType == eMenuBarObjectType) {
@@ -824,44 +824,44 @@ void nsMenuX::ObserveAttributeChanged(ns
           // application menu into account.
           nsMenuBarX* mb = static_cast<nsMenuBarX*>(mParent);
           if (mb->MenuContainsAppMenu())
             insertionIndex++;
         }
         NSMenu* parentMenu = (NSMenu*)mParent->NativeData();
         [parentMenu insertItem:mNativeMenuItem atIndex:insertionIndex];
         [mNativeMenuItem setSubmenu:mNativeMenu];
-        mVisible = PR_TRUE;
+        mVisible = true;
       }
     }
   }
   else if (aAttribute == nsWidgetAtoms::image) {
     SetupIcon();
   }
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void nsMenuX::ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild,
                                     PRInt32 aIndexInContainer)
 {
   if (gConstructingMenu)
     return;
 
-  SetRebuild(PR_TRUE);
+  SetRebuild(true);
   mMenuGroupOwner->UnregisterForContentChanges(aChild);
 }
 
 void nsMenuX::ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer,
                                      nsIContent *aChild)
 {
   if (gConstructingMenu)
     return;
 
-  SetRebuild(PR_TRUE);
+  SetRebuild(true);
 }
 
 nsresult nsMenuX::SetupIcon()
 {
   // In addition to out-of-memory, menus that are children of the menu bar
   // will not have mIcon set.
   if (!mIcon)
     return NS_ERROR_OUT_OF_MEMORY;
--- a/widget/src/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/src/cocoa/nsNativeThemeCocoa.mm
@@ -1655,17 +1655,17 @@ RenderScrollbar(CGContextRef cgContext, 
 }
 
 void
 nsNativeThemeCocoa::DrawScrollbar(CGContextRef aCGContext, const HIRect& aBoxRect, nsIFrame *aFrame)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   HIThemeTrackDrawInfo tdi;
-  GetScrollbarDrawInfo(tdi, aFrame, aBoxRect.size, PR_TRUE); // True means we want the press states
+  GetScrollbarDrawInfo(tdi, aFrame, aBoxRect.size, true); // True means we want the press states
   RenderTransformedHIThemeControl(aCGContext, aBoxRect, RenderScrollbar, &tdi);
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 nsIFrame*
 nsNativeThemeCocoa::GetParentScrollbarFrame(nsIFrame *aFrame)
 {
@@ -1679,17 +1679,17 @@ nsNativeThemeCocoa::GetParentScrollbarFr
   return scrollbarFrame;
 }
 
 static bool
 ToolbarCanBeUnified(CGContextRef cgContext, const HIRect& inBoxRect, NSWindow* aWindow)
 {
   if (![aWindow isKindOfClass:[ToolbarWindow class]] ||
       [(ToolbarWindow*)aWindow drawsContentsIntoWindowFrame])
-    return PR_FALSE;
+    return false;
 
   float unifiedToolbarHeight = [(ToolbarWindow*)aWindow unifiedToolbarHeight];
   return inBoxRect.origin.x == 0 &&
          inBoxRect.size.width >= [aWindow frame].size.width &&
          inBoxRect.origin.y <= 0.0 &&
          inBoxRect.origin.y + inBoxRect.size.height <= unifiedToolbarHeight;
 }
 
@@ -2010,17 +2010,17 @@ nsNativeThemeCocoa::DrawWidgetBackground
       break;
 
     case NS_THEME_DROPDOWN:
     case NS_THEME_DROPDOWN_TEXTFIELD:
       DrawDropdown(cgContext, macRect, eventState, aWidgetType, aFrame);
       break;
 
     case NS_THEME_DROPDOWN_BUTTON:
-      DrawButton(cgContext, kThemeArrowButton, macRect, PR_FALSE, kThemeButtonOn,
+      DrawButton(cgContext, kThemeArrowButton, macRect, false, kThemeButtonOn,
                  kThemeAdornmentArrowDownArrow, eventState, aFrame);
       break;
 
     case NS_THEME_GROUPBOX: {
       HIThemeGroupBoxDrawInfo gdi = { 0, kThemeStateActive, kHIThemeGroupBoxKindPrimary };
       HIThemeDrawGroupBox(&macRect, &gdi, cgContext, HITHEME_ORIENTATION);
       break;
     }
@@ -2053,38 +2053,38 @@ nsNativeThemeCocoa::DrawWidgetBackground
       }
       DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame, eventState),
                    aFrame->GetStyleDisplay()->mOrient != NS_STYLE_ORIENT_VERTICAL,
 		   GetProgressValue(aFrame), GetProgressMaxValue(aFrame), aFrame);
       break;
 
     case NS_THEME_PROGRESSBAR_VERTICAL:
       DrawProgress(cgContext, macRect, IsIndeterminateProgress(aFrame, eventState),
-                   PR_FALSE, GetProgressValue(aFrame),
+                   false, GetProgressValue(aFrame),
                    GetProgressMaxValue(aFrame), aFrame);
       break;
 
     case NS_THEME_PROGRESSBAR_CHUNK:
     case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
       // do nothing, covered by the progress bar cases above
       break;
 
     case NS_THEME_TREEVIEW_TWISTY:
-      DrawButton(cgContext, kThemeDisclosureButton, macRect, PR_FALSE,
+      DrawButton(cgContext, kThemeDisclosureButton, macRect, false,
                  kThemeDisclosureRight, kThemeAdornmentNone, eventState, aFrame);
       break;
 
     case NS_THEME_TREEVIEW_TWISTY_OPEN:
-      DrawButton(cgContext, kThemeDisclosureButton, macRect, PR_FALSE,
+      DrawButton(cgContext, kThemeDisclosureButton, macRect, false,
                  kThemeDisclosureDown, kThemeAdornmentNone, eventState, aFrame);
       break;
 
     case NS_THEME_TREEVIEW_HEADER_CELL: {
       TreeSortDirection sortDirection = GetTreeSortDirection(aFrame);
-      DrawButton(cgContext, kThemeListHeaderButton, macRect, PR_FALSE,
+      DrawButton(cgContext, kThemeListHeaderButton, macRect, false,
                  sortDirection == eTreeSortDirection_Natural ? kThemeButtonOff : kThemeButtonOn,
                  sortDirection == eTreeSortDirection_Ascending ?
                  kThemeAdornmentHeaderButtonSortUp : kThemeAdornmentNone, eventState, aFrame);
     }
       break;
 
     case NS_THEME_TREEVIEW_TREEITEM:
     case NS_THEME_TREEVIEW:
@@ -2350,19 +2350,19 @@ nsNativeThemeCocoa::GetWidgetBorder(nsDe
       break;
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
-// Return PR_FALSE here to indicate that CSS padding values should be used. There is
+// Return false here to indicate that CSS padding values should be used. There is
 // no reason to make a distinction between padding and border values, just specify
-// whatever values you want in GetWidgetBorder and only use this to return PR_TRUE
+// whatever values you want in GetWidgetBorder and only use this to return true
 // if you want to override CSS padding values.
 bool
 nsNativeThemeCocoa::GetWidgetPadding(nsDeviceContext* aContext, 
                                      nsIFrame* aFrame,
                                      PRUint8 aWidgetType,
                                      nsIntMargin* aResult)
 {
   // We don't want CSS padding being used for certain widgets.
@@ -2370,19 +2370,19 @@ nsNativeThemeCocoa::GetWidgetPadding(nsD
   switch (aWidgetType) {
     case NS_THEME_BUTTON:
     // Radios and checkboxes return a fixed size in GetMinimumWidgetSize
     // and have a meaningful baseline, so they can't have
     // author-specified padding.
     case NS_THEME_CHECKBOX:
     case NS_THEME_RADIO:
       aResult->SizeTo(0, 0, 0, 0);
-      return PR_TRUE;
+      return true;
   }
-  return PR_FALSE;
+  return false;
 }
 
 bool
 nsNativeThemeCocoa::GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFrame,
                                       PRUint8 aWidgetType, nsRect* aOverflowRect)
 {
   switch (aWidgetType) {
     case NS_THEME_BUTTON:
@@ -2402,37 +2402,37 @@ nsNativeThemeCocoa::GetWidgetOverflow(ns
       // or equal to 4 pixels thick.
       nsIntMargin extraSize = nsIntMargin(MAX_FOCUS_RING_WIDTH, MAX_FOCUS_RING_WIDTH, MAX_FOCUS_RING_WIDTH, MAX_FOCUS_RING_WIDTH);
       PRInt32 p2a = aContext->AppUnitsPerDevPixel();
       nsMargin m(NSIntPixelsToAppUnits(extraSize.left, p2a),
                  NSIntPixelsToAppUnits(extraSize.top, p2a),
                  NSIntPixelsToAppUnits(extraSize.right, p2a),
                  NSIntPixelsToAppUnits(extraSize.bottom, p2a));
       aOverflowRect->Inflate(m);
-      return PR_TRUE;
+      return true;
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 static const PRInt32 kRegularScrollbarThumbMinSize = 22;
 static const PRInt32 kSmallScrollbarThumbMinSize = 19;
 
 NS_IMETHODIMP
 nsNativeThemeCocoa::GetMinimumWidgetSize(nsRenderingContext* aContext,
                                          nsIFrame* aFrame,
                                          PRUint8 aWidgetType,
                                          nsIntSize* aResult,
                                          bool* aIsOverridable)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   aResult->SizeTo(0,0);
-  *aIsOverridable = PR_TRUE;
+  *aIsOverridable = true;
 
   switch (aWidgetType) {
     case NS_THEME_BUTTON:
     {
       aResult->SizeTo(pushButtonSettings.minimumSizes[miniControlSize].width,
                       pushButtonSettings.naturalSizes[miniControlSize].height);
       break;
     }
@@ -2444,17 +2444,17 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
     }
 
     case NS_THEME_SPINNER:
     {
       SInt32 buttonHeight = 0, buttonWidth = 0;
       ::GetThemeMetric(kThemeMetricLittleArrowsWidth, &buttonWidth);
       ::GetThemeMetric(kThemeMetricLittleArrowsHeight, &buttonHeight);
       aResult->SizeTo(buttonWidth, buttonHeight);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
 
     case NS_THEME_DROPDOWN:
     case NS_THEME_DROPDOWN_BUTTON:
     {
       SInt32 popupHeight = 0;
       ::GetThemeMetric(kThemeMetricPopupButtonHeight, &popupHeight);
@@ -2483,17 +2483,17 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
 
     case NS_THEME_TREEVIEW_TWISTY:
     case NS_THEME_TREEVIEW_TWISTY_OPEN:   
     {
       SInt32 twistyHeight = 0, twistyWidth = 0;
       ::GetThemeMetric(kThemeMetricDisclosureButtonWidth, &twistyWidth);
       ::GetThemeMetric(kThemeMetricDisclosureButtonHeight, &twistyHeight);
       aResult->SizeTo(twistyWidth, twistyHeight);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
     
     case NS_THEME_TREEVIEW_HEADER:
     case NS_THEME_TREEVIEW_HEADER_CELL:
     {
       SInt32 headerHeight = 0;
       ::GetThemeMetric(kThemeMetricListHeaderHeight, &headerHeight);
@@ -2507,35 +2507,35 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
       break;
     }
 
     case NS_THEME_SCALE_HORIZONTAL:
     {
       SInt32 scaleHeight = 0;
       ::GetThemeMetric(kThemeMetricHSliderHeight, &scaleHeight);
       aResult->SizeTo(scaleHeight, scaleHeight);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
 
     case NS_THEME_SCALE_VERTICAL:
     {
       SInt32 scaleWidth = 0;
       ::GetThemeMetric(kThemeMetricVSliderWidth, &scaleWidth);
       aResult->SizeTo(scaleWidth, scaleWidth);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
       
     case NS_THEME_SCROLLBAR_SMALL:
     {
       SInt32 scrollbarWidth = 0;
       ::GetThemeMetric(kThemeMetricSmallScrollBarWidth, &scrollbarWidth);
       aResult->SizeTo(scrollbarWidth, scrollbarWidth);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
 
     case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
     case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
     {
       // Find our parent scrollbar frame in order to find out whether we're in
       // a small or a large scrollbar.
@@ -2563,17 +2563,17 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
       if (!scrollbarFrame) return NS_ERROR_FAILURE;
 
       PRInt32 themeMetric = (scrollbarFrame->GetStyleDisplay()->mAppearance == NS_THEME_SCROLLBAR_SMALL) ?
                             kThemeMetricSmallScrollBarWidth :
                             kThemeMetricScrollBarWidth;
       SInt32 scrollbarWidth = 0;
       ::GetThemeMetric(themeMetric, &scrollbarWidth);
       aResult->SizeTo(scrollbarWidth, scrollbarWidth);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
 
     case NS_THEME_SCROLLBAR_BUTTON_UP:
     case NS_THEME_SCROLLBAR_BUTTON_DOWN:
     case NS_THEME_SCROLLBAR_BUTTON_LEFT:
     case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
     {
@@ -2588,32 +2588,32 @@ nsNativeThemeCocoa::GetMinimumWidgetSize
       ::GetThemeMetric(themeMetric, &scrollbarWidth);
 
       // It seems that for both sizes of scrollbar, the buttons are one pixel "longer".
       if (aWidgetType == NS_THEME_SCROLLBAR_BUTTON_LEFT || aWidgetType == NS_THEME_SCROLLBAR_BUTTON_RIGHT)
         aResult->SizeTo(scrollbarWidth+1, scrollbarWidth);
       else
         aResult->SizeTo(scrollbarWidth, scrollbarWidth+1);
  
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
       break;
     }
     case NS_THEME_RESIZER:
     {
       HIThemeGrowBoxDrawInfo drawInfo;
       drawInfo.version = 0;
       drawInfo.state = kThemeStateActive;
       drawInfo.kind = kHIThemeGrowBoxKindNormal;
       drawInfo.direction = kThemeGrowRight | kThemeGrowDown;
       drawInfo.size = kHIThemeGrowBoxSizeNormal;
       HIPoint pnt = { 0, 0 };
       HIRect bounds;
       HIThemeGetGrowBoxBounds(&pnt, &drawInfo, &bounds);
       aResult->SizeTo(bounds.size.width, bounds.size.height);
-      *aIsOverridable = PR_FALSE;
+      *aIsOverridable = false;
     }
   }
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
@@ -2636,39 +2636,39 @@ nsNativeThemeCocoa::WidgetStateChanged(n
     case NS_THEME_TAB_PANEL:
     case NS_THEME_DIALOG:
     case NS_THEME_MENUPOPUP:
     case NS_THEME_GROUPBOX:
     case NS_THEME_PROGRESSBAR_CHUNK:
     case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
     case NS_THEME_PROGRESSBAR:
     case NS_THEME_PROGRESSBAR_VERTICAL:
-      *aShouldRepaint = PR_FALSE;
+      *aShouldRepaint = false;
       return NS_OK;
   }
 
   // XXXdwh Not sure what can really be done here.  Can at least guess for
   // specific widgets that they're highly unlikely to have certain states.
   // For example, a toolbar doesn't care about any states.
   if (!aAttribute) {
     // Hover/focus/active changed.  Always repaint.
-    *aShouldRepaint = PR_TRUE;
+    *aShouldRepaint = true;
   } else {
     // Check the attribute to see if it's relevant.  
     // disabled, checked, dlgtype, default, etc.
-    *aShouldRepaint = PR_FALSE;
+    *aShouldRepaint = false;
     if (aAttribute == nsWidgetAtoms::disabled ||
         aAttribute == nsWidgetAtoms::checked ||
         aAttribute == nsWidgetAtoms::selected ||
         aAttribute == nsWidgetAtoms::mozmenuactive ||
         aAttribute == nsWidgetAtoms::sortdirection ||
         aAttribute == nsWidgetAtoms::focused ||
         aAttribute == nsWidgetAtoms::_default ||
         aAttribute == nsWidgetAtoms::open)
-      *aShouldRepaint = PR_TRUE;
+      *aShouldRepaint = true;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNativeThemeCocoa::ThemeChanged()
 {
@@ -2680,23 +2680,23 @@ nsNativeThemeCocoa::ThemeChanged()
 bool 
 nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame,
                                       PRUint8 aWidgetType)
 {
   // We don't have CSS set up to render non-native scrollbars on Mac OS X so we
   // render natively even if native theme support is disabled.
   if (aWidgetType != NS_THEME_SCROLLBAR &&
       aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
-    return PR_FALSE;
+    return false;
 
   // if this is a dropdown button in a combobox the answer is always no
   if (aWidgetType == NS_THEME_DROPDOWN_BUTTON) {
     nsIFrame* parentFrame = aFrame->GetParent();
     if (parentFrame && (parentFrame->GetType() == nsWidgetAtoms::comboboxControlFrame))
-      return PR_FALSE;
+      return false;
   }
 
   switch (aWidgetType) {
     case NS_THEME_LISTBOX:
 
     case NS_THEME_DIALOG:
     case NS_THEME_WINDOW:
     case NS_THEME_MENUPOPUP:
@@ -2761,64 +2761,64 @@ nsNativeThemeCocoa::ThemeSupportsWidget(
     case NS_THEME_DROPDOWN_TEXTFIELD:
       return !IsWidgetStyled(aPresContext, aFrame, aWidgetType);
       break;
 
     case NS_THEME_RESIZER:
     {
       nsIFrame* parentFrame = aFrame->GetParent();
       if (!parentFrame || parentFrame->GetType() != nsWidgetAtoms::scrollFrame)
-        return PR_TRUE;
+        return true;
 
       // Note that IsWidgetStyled is not called for resizers on Mac. This is
       // because for scrollable containers, the native resizer looks better
       // when scrollbars are present even when the style is overriden, and the
       // custom transparent resizer looks better when scrollbars are not
       // present.
       nsIScrollableFrame* scrollFrame = do_QueryFrame(parentFrame);
       return (scrollFrame && scrollFrame->GetScrollbarVisibility());
       break;
     }
   }
 
-  return PR_FALSE;
+  return false;
 }
 
 bool
 nsNativeThemeCocoa::WidgetIsContainer(PRUint8 aWidgetType)
 {
   // flesh this out at some point
   switch (aWidgetType) {
    case NS_THEME_DROPDOWN_BUTTON:
    case NS_THEME_RADIO:
    case NS_THEME_CHECKBOX:
    case NS_THEME_PROGRESSBAR:
-    return PR_FALSE;
+    return false;
     break;
   }
-  return PR_TRUE;
+  return true;
 }
 
 bool
 nsNativeThemeCocoa::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, PRUint8 aWidgetType)
 {
   if (aWidgetType == NS_THEME_DROPDOWN ||
       aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD ||
       aWidgetType == NS_THEME_BUTTON ||
       aWidgetType == NS_THEME_RADIO ||
       aWidgetType == NS_THEME_CHECKBOX)
-    return PR_TRUE;
-
-  return PR_FALSE;
+    return true;
+
+  return false;
 }
 
 bool
 nsNativeThemeCocoa::ThemeNeedsComboboxDropmarker()
 {
-  return PR_FALSE;
+  return false;
 }
 
 nsITheme::Transparency
 nsNativeThemeCocoa::GetWidgetTransparency(nsIFrame* aFrame, PRUint8 aWidgetType)
 {
   switch (aWidgetType) {
   case NS_THEME_MENUPOPUP:
   case NS_THEME_TOOLTIP:
--- a/widget/src/cocoa/nsPrintOptionsX.mm
+++ b/widget/src/cocoa/nsPrintOptionsX.mm
@@ -75,17 +75,17 @@ nsresult nsPrintOptionsX::_CreatePrintSe
   NS_ADDREF(*_retval = printSettings);
 
   rv = printSettings->Init();
   if (NS_FAILED(rv)) {
     NS_RELEASE(*_retval);
     return rv;
   }
 
-  InitPrintSettingsFromPrefs(*_retval, PR_FALSE, nsIPrintSettings::kInitSaveAll);
+  InitPrintSettingsFromPrefs(*_retval, false, nsIPrintSettings::kInitSaveAll);
   return rv;
 }
 
 nsresult
 nsPrintOptionsX::WritePrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, PRUint32 aFlags)
 {
   nsresult rv;
 
--- a/widget/src/cocoa/nsStandaloneNativeMenu.mm
+++ b/widget/src/cocoa/nsStandaloneNativeMenu.mm
@@ -109,17 +109,17 @@ NS_IMETHODIMP
 nsStandaloneNativeMenu::MenuWillOpen(bool * aResult)
 {
   NS_ASSERTION(mMenu != nsnull, "nsStandaloneNativeMenu::OnOpen - mMenu is null!");
 
   // Force an update on the mMenu by faking an open/close on all of
   // its submenus.
   UpdateMenu(mMenu);
 
-  *aResult = PR_TRUE;
+  *aResult = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsStandaloneNativeMenu::GetNativeMenu(void ** aVoidPointer)
 {
   if (mMenu) {
     *aVoidPointer = mMenu->NativeData();