Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg
authorMs2ger <ms2ger@gmail.com>
Thu, 09 Aug 2012 09:09:40 +0200
changeset 107318 4587cc2d01545d18cea6d650e725af5751f549ee
parent 107317 62d94d3c6affb5181a13e7dc4029dd18ac176c4e
child 107319 25378953c5843e7be9df9fb22e7dc6e9f90f87bd
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs780387
milestone17.0a1
Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg
caps/src/nsPrincipal.cpp
content/base/src/nsContentSink.h
content/base/src/nsNodeInfoManager.cpp
content/base/src/nsNodeInfoManager.h
content/xslt/src/base/txDouble.cpp
content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp
content/xslt/src/xpath/txNodeSet.cpp
content/xslt/src/xpath/txXPathTreeWalker.h
content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
content/xul/templates/src/nsRuleNetwork.cpp
content/xul/templates/src/nsRuleNetwork.h
gfx/src/nsColor.cpp
intl/locale/src/nsLocale.cpp
intl/locale/src/nsLocale.h
layout/base/nsCSSRendering.cpp
layout/base/nsCSSRendering.h
layout/base/nsCSSRenderingBorders.cpp
layout/base/nsCSSRenderingBorders.h
layout/base/nsFrameManager.cpp
layout/base/nsPresShell.cpp
layout/forms/nsFieldSetFrame.cpp
layout/forms/nsFileControlFrame.cpp
layout/forms/nsFileControlFrame.h
layout/forms/nsHTMLButtonControlFrame.cpp
layout/forms/nsHTMLButtonControlFrame.h
layout/forms/nsListControlFrame.cpp
layout/forms/nsListControlFrame.h
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsBulletFrame.cpp
layout/generic/nsCanvasFrame.cpp
layout/generic/nsCanvasFrame.h
layout/generic/nsColumnSetFrame.cpp
layout/generic/nsFirstLetterFrame.cpp
layout/generic/nsFirstLetterFrame.h
layout/generic/nsFrame.cpp
layout/generic/nsFrame.h
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsFrameSetFrame.h
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsGfxScrollFrame.h
layout/generic/nsIFrame.h
layout/generic/nsImageFrame.cpp
layout/generic/nsImageFrame.h
layout/generic/nsInlineFrame.cpp
layout/generic/nsInlineFrame.h
layout/generic/nsSubDocumentFrame.cpp
layout/generic/nsSubDocumentFrame.h
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLContainerFrame.h
layout/mathml/nsMathMLTokenFrame.h
layout/mathml/nsMathMLmactionFrame.h
layout/mathml/nsMathMLmfencedFrame.h
layout/mathml/nsMathMLmfracFrame.h
layout/mathml/nsMathMLmmultiscriptsFrame.h
layout/mathml/nsMathMLmoFrame.h
layout/mathml/nsMathMLmpaddedFrame.h
layout/mathml/nsMathMLmphantomFrame.h
layout/mathml/nsMathMLmrootFrame.h
layout/mathml/nsMathMLmrowFrame.h
layout/mathml/nsMathMLmspaceFrame.h
layout/mathml/nsMathMLmstyleFrame.h
layout/mathml/nsMathMLmsubFrame.h
layout/mathml/nsMathMLmsubsupFrame.h
layout/mathml/nsMathMLmsupFrame.h
layout/mathml/nsMathMLmtableFrame.h
layout/mathml/nsMathMLmunderoverFrame.h
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableCellFrame.h
layout/tables/nsTableColGroupFrame.cpp
layout/tables/nsTableColGroupFrame.h
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
layout/tables/nsTableOuterFrame.h
layout/tables/nsTableRowFrame.cpp
layout/tables/nsTableRowFrame.h
layout/tables/nsTableRowGroupFrame.cpp
layout/tables/nsTableRowGroupFrame.h
layout/xul/base/src/nsGroupBoxFrame.cpp
netwerk/cache/nsCacheEntryDescriptor.cpp
netwerk/cache/nsDiskCacheStreams.cpp
netwerk/cache/nsDiskCacheStreams.h
netwerk/dns/nsHostResolver.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/socket/nsSOCKSIOLayer.cpp
netwerk/test/TestSocketIO.cpp
parser/htmlparser/src/nsHTMLTags.cpp
security/manager/ssl/src/nsNSSCertHelper.cpp
security/manager/ssl/src/nsNSSComponent.cpp
security/manager/ssl/src/nsNSSIOLayer.cpp
security/manager/ssl/src/nsPKCS12Blob.cpp
testing/mochitest/ssltunnel/ssltunnel.cpp
toolkit/crashreporter/nsExceptionHandler.cpp
tools/trace-malloc/bloatblame.cpp
xpcom/base/VisualEventTracer.cpp
xpcom/base/nsDebugImpl.cpp
xpcom/base/nsTraceRefcntImpl.cpp
xpcom/ds/nsCRT.h
xpcom/glue/nsTextFormatter.cpp
xpcom/io/Base64.cpp
xpcom/io/nsLocalFileUnix.cpp
xpcom/io/nsLocalFileUnix.h
xpcom/io/nsLocalFileWin.cpp
xpcom/string/public/nsTSubstring.h
xpcom/string/src/nsTSubstring.cpp
xpcom/tests/TestCRT.cpp
--- a/caps/src/nsPrincipal.cpp
+++ b/caps/src/nsPrincipal.cpp
@@ -1038,17 +1038,17 @@ nsPrincipal::InitFromPersistent(const ch
     mTrusted = aTrusted;
   }
 
   //-- Save the preference name
   mPrefName = aPrefName;
 
   const char* ordinalBegin = PL_strpbrk(aPrefName, "1234567890");
   if (ordinalBegin) {
-    PRIntn n = atoi(ordinalBegin);
+    int n = atoi(ordinalBegin);
     if (sCapabilitiesOrdinal <= n) {
       sCapabilitiesOrdinal = n + 1;
     }
   }
 
   //-- Store the capabilities
   rv = NS_OK;
   if (aGrantedList) {
@@ -1117,17 +1117,17 @@ nsPrincipal::Read(nsIObjectInputStream* 
 
   rv = NS_ReadOptionalCString(aStream, mPrefName);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   const char* ordinalBegin = PL_strpbrk(mPrefName.get(), "1234567890");
   if (ordinalBegin) {
-    PRIntn n = atoi(ordinalBegin);
+    int n = atoi(ordinalBegin);
     if (sCapabilitiesOrdinal <= n) {
       sCapabilitiesOrdinal = n + 1;
     }
   }
 
   bool haveCert;
   rv = aStream->ReadBoolean(&haveCert);
   if (NS_FAILED(rv)) {
--- a/content/base/src/nsContentSink.h
+++ b/content/base/src/nsContentSink.h
@@ -48,17 +48,17 @@ class Loader;
 #ifdef DEBUG
 
 extern PRLogModuleInfo* gContentSinkLogModuleInfo;
 
 #define SINK_TRACE_CALLS              0x1
 #define SINK_TRACE_REFLOW             0x2
 #define SINK_ALWAYS_REFLOW            0x4
 
-#define SINK_LOG_TEST(_lm, _bit) (PRIntn((_lm)->level) & (_bit))
+#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->level) & (_bit))
 
 #define SINK_TRACE(_lm, _bit, _args) \
   PR_BEGIN_MACRO                     \
     if (SINK_LOG_TEST(_lm, _bit)) {  \
       PR_LogPrint _args;             \
     }                                \
   PR_END_MACRO
 
--- a/content/base/src/nsNodeInfoManager.cpp
+++ b/content/base/src/nsNodeInfoManager.cpp
@@ -49,17 +49,17 @@ nsNodeInfoManager::GetNodeInfoInnerHashV
     // the moment because node->mName->hash() is not the same as
     // HashString(*(node->mNameString)).  See bug 732815.
     return HashString(nsDependentAtomString(node->mName));
   }
   return HashString(*(node->mNameString));
 }
 
 
-PRIntn
+int
 nsNodeInfoManager::NodeInfoInnerKeyCompare(const void *key1, const void *key2)
 {
   NS_ASSERTION(key1 && key2, "Null key passed to NodeInfoInnerKeyCompare!");
 
   const nsINodeInfo::nsNodeInfoInner *node1 =
     reinterpret_cast<const nsINodeInfo::nsNodeInfoInner *>(key1);
   const nsINodeInfo::nsNodeInfoInner *node2 =
     reinterpret_cast<const nsINodeInfo::nsNodeInfoInner *>(key2);
@@ -178,18 +178,18 @@ nsNodeInfoManager::Init(nsIDocument *aDo
     PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
            ("NODEINFOMANAGER %p Init document=%p", this, aDocument));
 #endif
 
   return NS_OK;
 }
 
 // static
-PRIntn
-nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex, void *arg)
+int
+nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, int hashIndex, void *arg)
 {
   static_cast<nsINodeInfo*>(he->value)->mDocument = nullptr;
   return HT_ENUMERATE_NEXT;
 }
 
 void
 nsNodeInfoManager::DropDocumentReference()
 {
--- a/content/base/src/nsNodeInfoManager.h
+++ b/content/base/src/nsNodeInfoManager.h
@@ -111,19 +111,19 @@ protected:
                                         const nsAString& );
 
   /**
    * Sets the principal of the document this nodeinfo manager belongs to.
    */
   void SetDocumentPrincipal(nsIPrincipal *aPrincipal);
 
 private:
-  static PRIntn NodeInfoInnerKeyCompare(const void *key1, const void *key2);
+  static int NodeInfoInnerKeyCompare(const void *key1, const void *key2);
   static PLHashNumber GetNodeInfoInnerHashValue(const void *key);
-  static PRIntn DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex,
+  static int DropNodeInfoDocument(PLHashEntry *he, int hashIndex,
                                      void *arg);
 
   PLHashTable *mNodeInfoHash;
   nsIDocument *mDocument; // WEAK
   PRUint32 mNonDocumentNodeInfos;
   nsIPrincipal *mPrincipal; // STRONG, but not nsCOMPtr to avoid include hell
                             // while inlining DocumentPrincipal().  Never null
                             // after Init() succeeds.
--- a/content/xslt/src/base/txDouble.cpp
+++ b/content/xslt/src/base/txDouble.cpp
@@ -151,17 +151,17 @@ void txDouble::toString(double aValue, n
         aDest.AppendLiteral("Infinity");
         return;
     }
 
     // Mantissa length is 17, so this is plenty
     const int buflen = 20;
     char buf[buflen];
 
-    PRIntn intDigits, sign;
+    int intDigits, sign;
     char* endp;
     PR_dtoa(aValue, 0, 0, &intDigits, &sign, &endp, buf, buflen - 1);
 
     // compute length
     PRInt32 length = endp - buf;
     if (length > intDigits) {
         // decimal point needed
         ++length;
--- a/content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp
+++ b/content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp
@@ -567,17 +567,17 @@ txXPathNodeUtils::getXSLTId(const txXPat
 /* static */
 void
 txXPathNodeUtils::getBaseURI(const txXPathNode& aNode, nsAString& aURI)
 {
     aNode.mNode->GetDOMBaseURI(aURI);
 }
 
 /* static */
-PRIntn
+int
 txXPathNodeUtils::comparePosition(const txXPathNode& aNode,
                                   const txXPathNode& aOtherNode)
 {
     // First check for equal nodes or attribute-nodes on the same element.
     if (aNode.mNode == aOtherNode.mNode) {
         if (aNode.mIndex == aOtherNode.mIndex) {
             return 0;
         }
--- a/content/xslt/src/xpath/txNodeSet.cpp
+++ b/content/xslt/src/xpath/txNodeSet.cpp
@@ -562,33 +562,33 @@ txXPathNode*
 txNodeSet::findPosition(const txXPathNode& aNode, txXPathNode* aFirst,
                         txXPathNode* aLast, bool& aDupe) const
 {
     aDupe = false;
     if (aLast - aFirst <= 2) {
         // If we search 2 nodes or less there is no point in further divides
         txXPathNode* pos = aFirst;
         for (; pos < aLast; ++pos) {
-            PRIntn cmp = txXPathNodeUtils::comparePosition(aNode, *pos);
+            int cmp = txXPathNodeUtils::comparePosition(aNode, *pos);
             if (cmp < 0) {
                 return pos;
             }
 
             if (cmp == 0) {
                 aDupe = true;
 
                 return pos;
             }
         }
         return pos;
     }
 
     // (cannot add two pointers)
     txXPathNode* midpos = aFirst + (aLast - aFirst) / 2;
-    PRIntn cmp = txXPathNodeUtils::comparePosition(aNode, *midpos);
+    int cmp = txXPathNodeUtils::comparePosition(aNode, *midpos);
     if (cmp == 0) {
         aDupe = true;
 
         return midpos;
     }
 
     if (cmp > 0) {
         return findPosition(aNode, midpos + 1, aLast, aDupe);
--- a/content/xslt/src/xpath/txXPathTreeWalker.h
+++ b/content/xslt/src/xpath/txXPathTreeWalker.h
@@ -89,18 +89,18 @@ public:
     static void appendNodeValue(const txXPathNode& aNode, nsAString& aResult);
     static bool isWhitespace(const txXPathNode& aNode);
     static txXPathNode* getOwnerDocument(const txXPathNode& aNode);
     static PRInt32 getUniqueIdentifier(const txXPathNode& aNode);
     static nsresult getXSLTId(const txXPathNode& aNode,
                               const txXPathNode& aBase, nsAString& aResult);
     static void release(txXPathNode* aNode);
     static void getBaseURI(const txXPathNode& aNode, nsAString& aURI);
-    static PRIntn comparePosition(const txXPathNode& aNode,
-                                  const txXPathNode& aOtherNode);
+    static int comparePosition(const txXPathNode& aNode,
+                               const txXPathNode& aOtherNode);
     static bool localNameEquals(const txXPathNode& aNode,
                                   nsIAtom* aLocalName);
     static bool isRoot(const txXPathNode& aNode);
     static bool isElement(const txXPathNode& aNode);
     static bool isAttribute(const txXPathNode& aNode);
     static bool isProcessingInstruction(const txXPathNode& aNode);
     static bool isComment(const txXPathNode& aNode);
     static bool isText(const txXPathNode& aNode);
--- a/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
+++ b/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
@@ -272,17 +272,17 @@ txFormatNumberFunctionCall::evaluate(txI
     if (value > 1)
         bufsize = (int)log10(value) + 30;
     else
         bufsize = 1 + 30;
 
     char* buf = new char[bufsize];
     NS_ENSURE_TRUE(buf, NS_ERROR_OUT_OF_MEMORY);
 
-    PRIntn bufIntDigits, sign;
+    int bufIntDigits, sign;
     char* endp;
     PR_dtoa(value, 0, 0, &bufIntDigits, &sign, &endp, buf, bufsize-1);
 
     int buflen = endp - buf;
     int intDigits;
     intDigits = bufIntDigits > minIntegerSize ? bufIntDigits : minIntegerSize;
 
     if (groupSize < 0)
--- a/content/xul/templates/src/nsRuleNetwork.cpp
+++ b/content/xul/templates/src/nsRuleNetwork.cpp
@@ -200,17 +200,17 @@ Instantiation::Hash(const void* aKey)
     for (nsAssignmentSet::ConstIterator assignment = inst->mAssignments.First();
          assignment != last; ++assignment)
         result ^= assignment->Hash();
 
     return result;
 }
 
 
-PRIntn
+int
 Instantiation::Compare(const void* aLeft, const void* aRight)
 {
     const Instantiation* left  = static_cast<const Instantiation*>(aLeft);
     const Instantiation* right = static_cast<const Instantiation*>(aRight);
 
     return *left == *right;
 }
 
--- a/content/xul/templates/src/nsRuleNetwork.h
+++ b/content/xul/templates/src/nsRuleNetwork.h
@@ -461,17 +461,17 @@ public:
 
     bool operator==(const Instantiation& aInstantiation) const {
         return Equals(aInstantiation); }
 
     bool operator!=(const Instantiation& aInstantiation) const {
         return !Equals(aInstantiation); }
 
     static PLHashNumber Hash(const void* aKey);
-    static PRIntn Compare(const void* aLeft, const void* aRight);
+    static int Compare(const void* aLeft, const void* aRight);
 };
 
 
 //----------------------------------------------------------------------
 
 /**
  * A collection of intantiations
  */
--- a/gfx/src/nsColor.cpp
+++ b/gfx/src/nsColor.cpp
@@ -222,26 +222,26 @@ NS_GFX_(bool) NS_ColorNameToRGB(const ns
 // equivalent to target = (bg*(255-fgalpha) + fg*fgalpha)/255
 #define MOZ_BLEND(target, bg, fg, fgalpha)       \
   FAST_DIVIDE_BY_255(target, (bg)*(255-fgalpha) + (fg)*(fgalpha))
 
 NS_GFX_(nscolor)
 NS_ComposeColors(nscolor aBG, nscolor aFG)
 {
   // This function uses colors that are non premultiplied alpha.
-  PRIntn r, g, b, a;
+  int r, g, b, a;
 
-  PRIntn bgAlpha = NS_GET_A(aBG);
-  PRIntn fgAlpha = NS_GET_A(aFG);
+  int bgAlpha = NS_GET_A(aBG);
+  int fgAlpha = NS_GET_A(aFG);
 
   // Compute the final alpha of the blended color
   // a = fgAlpha + bgAlpha*(255 - fgAlpha)/255;
   FAST_DIVIDE_BY_255(a, bgAlpha*(255-fgAlpha));
   a = fgAlpha + a;
-  PRIntn blendAlpha;
+  int blendAlpha;
   if (a == 0) {
     // In this case the blended color is totally trasparent,
     // we preserve the color information of the foreground color.
     blendAlpha = 255;
   } else {
     blendAlpha = (fgAlpha*255)/a;
   }
   MOZ_BLEND(r, NS_GET_R(aBG), NS_GET_R(aFG), blendAlpha);
--- a/intl/locale/src/nsLocale.cpp
+++ b/intl/locale/src/nsLocale.cpp
@@ -89,25 +89,25 @@ nsLocale::Hash_HashFunction(const void* 
 
   while (*ptr)
     hash += (PLHashNumber) *ptr++;
 
   return hash;
 }
 
 
-PRIntn
+int
 nsLocale::Hash_CompareNSString(const void* s1, const void* s2)
 {
   return !nsCRT::strcmp((const PRUnichar *) s1, (const PRUnichar *) s2);
 }
 
 
-PRIntn
-nsLocale::Hash_EnumerateDelete(PLHashEntry *he, PRIntn hashIndex, void *arg)
+int
+nsLocale::Hash_EnumerateDelete(PLHashEntry *he, int hashIndex, void *arg)
 {
   // delete an entry
   nsMemory::Free((PRUnichar *)he->key);
   nsMemory::Free((PRUnichar *)he->value);
 
   return (HT_ENUMERATE_NEXT | HT_ENUMERATE_REMOVE);
 }
 
--- a/intl/locale/src/nsLocale.h
+++ b/intl/locale/src/nsLocale.h
@@ -36,18 +36,18 @@ public:
 	/* Declare methods from nsILocale */
 	NS_DECL_NSILOCALE
 
 protected:
 	
 	NS_IMETHOD AddCategory(const nsAString& category, const nsAString& value);
 
 	static PLHashNumber Hash_HashFunction(const void* key);
-	static PRIntn Hash_CompareNSString(const void* s1, const void* s2);
-	static PRIntn Hash_EnumerateDelete(PLHashEntry *he, PRIntn hashIndex, void *arg);
+	static int Hash_CompareNSString(const void* s1, const void* s2);
+	static int Hash_EnumerateDelete(PLHashEntry *he, int hashIndex, void *arg);
 
 	PLHashTable*	fHashtable;
 	PRUint32		fCategoryCount;
 
 };
 
 
 #endif
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -380,17 +380,17 @@ nsCSSRendering::ComputePixelRadii(const 
 
 void
 nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
                             nsRenderingContext& aRenderingContext,
                             nsIFrame* aForFrame,
                             const nsRect& aDirtyRect,
                             const nsRect& aBorderArea,
                             nsStyleContext* aStyleContext,
-                            PRIntn aSkipSides)
+                            int aSkipSides)
 {
   SAMPLE_LABEL("nsCSSRendering", "PaintBorder");
   nsStyleContext *styleIfVisited = aStyleContext->GetStyleIfVisited();
   const nsStyleBorder *styleBorder = aStyleContext->GetStyleBorder();
   // Don't check RelevantLinkVisited here, since we want to take the
   // same amount of time whether or not it's true.
   if (!styleIfVisited) {
     PaintBorderWithStyleBorder(aPresContext, aRenderingContext, aForFrame,
@@ -423,17 +423,17 @@ nsCSSRendering::PaintBorder(nsPresContex
 void
 nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
                                            nsRenderingContext& aRenderingContext,
                                            nsIFrame* aForFrame,
                                            const nsRect& aDirtyRect,
                                            const nsRect& aBorderArea,
                                            const nsStyleBorder& aStyleBorder,
                                            nsStyleContext* aStyleContext,
-                                           PRIntn aSkipSides)
+                                           int aSkipSides)
 {
   nsMargin            border;
   nscoord             twipsRadii[8];
   nsCompatibility     compatMode = aPresContext->CompatibilityMode();
 
   SN("++ PaintBorder");
 
   // Check to see if we have an appearance defined.  If so, we let the theme
@@ -2522,18 +2522,18 @@ nsCSSRendering::PrepareBackgroundLayer(n
   // determined.
   ComputeBackgroundAnchorPoint(aLayer, bgPositioningArea.Size(), imageSize,
                                &imageTopLeft, &state.mAnchor);
   imageTopLeft += bgPositioningArea.TopLeft();
   state.mAnchor += bgPositioningArea.TopLeft();
 
   state.mDestArea = nsRect(imageTopLeft + aBorderArea.TopLeft(), imageSize);
   state.mFillArea = state.mDestArea;
-  PRIntn repeatX = aLayer.mRepeat.mXRepeat;
-  PRIntn repeatY = aLayer.mRepeat.mYRepeat;
+  int repeatX = aLayer.mRepeat.mXRepeat;
+  int repeatY = aLayer.mRepeat.mYRepeat;
   if (repeatX == NS_STYLE_BG_REPEAT_REPEAT) {
     state.mFillArea.x = bgClipRect.x;
     state.mFillArea.width = bgClipRect.width;
   }
   if (repeatY == NS_STYLE_BG_REPEAT_REPEAT) {
     state.mFillArea.y = bgClipRect.y;
     state.mFillArea.height = bgClipRect.height;
   }
--- a/layout/base/nsCSSRendering.h
+++ b/layout/base/nsCSSRendering.h
@@ -168,30 +168,30 @@ struct nsCSSRendering {
    * when rendering. If 0 then no sides are skipped.
    */
   static void PaintBorder(nsPresContext* aPresContext,
                           nsRenderingContext& aRenderingContext,
                           nsIFrame* aForFrame,
                           const nsRect& aDirtyRect,
                           const nsRect& aBorderArea,
                           nsStyleContext* aStyleContext,
-                          PRIntn aSkipSides = 0);
+                          int aSkipSides = 0);
 
   /**
    * Like PaintBorder, but taking an nsStyleBorder argument instead of
    * getting it from aStyleContext.
    */
   static void PaintBorderWithStyleBorder(nsPresContext* aPresContext,
                                          nsRenderingContext& aRenderingContext,
                                          nsIFrame* aForFrame,
                                          const nsRect& aDirtyRect,
                                          const nsRect& aBorderArea,
                                          const nsStyleBorder& aBorderStyle,
                                          nsStyleContext* aStyleContext,
-                                         PRIntn aSkipSides = 0);
+                                         int aSkipSides = 0);
 
 
   /**
    * Render the outline for an element using css rendering rules
    * for borders. aSkipSides is a bitmask of the sides to skip
    * when rendering. If 0 then no sides are skipped.
    */
   static void PaintOutline(nsPresContext* aPresContext,
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -125,17 +125,17 @@ typedef enum {
 nsCSSBorderRenderer::nsCSSBorderRenderer(PRInt32 aAppUnitsPerPixel,
                                          gfxContext* aDestContext,
                                          gfxRect& aOuterRect,
                                          const PRUint8* aBorderStyles,
                                          const gfxFloat* aBorderWidths,
                                          gfxCornerSizes& aBorderRadii,
                                          const nscolor* aBorderColors,
                                          nsBorderColors* const* aCompositeColors,
-                                         PRIntn aSkipSides,
+                                         int aSkipSides,
                                          nscolor aBackgroundColor)
   : mContext(aDestContext),
     mOuterRect(aOuterRect),
     mBorderStyles(aBorderStyles),
     mBorderWidths(aBorderWidths),
     mBorderRadii(aBorderRadii),
     mBorderColors(aBorderColors),
     mCompositeColors(aCompositeColors),
@@ -518,17 +518,17 @@ nsCSSBorderRenderer::DoSideClipSubPath(m
   mContext->ClosePath();
 }
 
 void
 nsCSSBorderRenderer::FillSolidBorder(const gfxRect& aOuterRect,
                                      const gfxRect& aInnerRect,
                                      const gfxCornerSizes& aBorderRadii,
                                      const gfxFloat *aBorderSizes,
-                                     PRIntn aSides,
+                                     int aSides,
                                      const gfxRGBA& aColor)
 {
   mContext->SetColor(aColor);
   // Note that this function is allowed to draw more than just the
   // requested sides.
 
   // If we have a border radius, do full rounded rectangles
   // and fill, regardless of what sides we're asked to draw.
@@ -678,17 +678,17 @@ ComputeCompositeColorForLine(PRUint32 aL
 {
   while (aLineIndex-- && aBorderColors->mNext)
     aBorderColors = aBorderColors->mNext;
 
   return gfxRGBA(aBorderColors->mColor);
 }
 
 void
-nsCSSBorderRenderer::DrawBorderSidesCompositeColors(PRIntn aSides, const nsBorderColors *aCompositeColors)
+nsCSSBorderRenderer::DrawBorderSidesCompositeColors(int aSides, const nsBorderColors *aCompositeColors)
 {
   gfxCornerSizes radii = mBorderRadii;
 
   // the generic composite colors path; each border is 1px in size
   gfxRect soRect = mOuterRect;
   gfxFloat maxBorderWidth = 0;
   NS_FOR_CSS_SIDES (i) {
     maxBorderWidth = NS_MAX(maxBorderWidth, mBorderWidths[i]);
@@ -726,17 +726,17 @@ nsCSSBorderRenderer::DrawBorderSidesComp
 
     soRect = siRect;
 
     ComputeInnerRadii(radii, fakeBorderSizes, &radii);
   }
 }
 
 void
-nsCSSBorderRenderer::DrawBorderSides(PRIntn aSides)
+nsCSSBorderRenderer::DrawBorderSides(int aSides)
 {
   if (aSides == 0 || (aSides & ~SIDE_BITS_ALL) != 0) {
     NS_WARNING("DrawBorderSides: invalid sides!");
     return;
   }
 
   PRUint8 borderRenderStyle;
   nscolor borderRenderColor;
@@ -1538,17 +1538,17 @@ nsCSSBorderRenderer::DrawBorders()
 
   // if conditioning the outside rect failed, then bail -- the outside
   // rect is supposed to enclose the entire border
   mOuterRect.Condition();
   if (mOuterRect.IsEmpty())
     return;
 
   mInnerRect.Condition();
-  PRIntn dashedSides = 0;
+  int dashedSides = 0;
 
   NS_FOR_CSS_SIDES(i) {
     PRUint8 style = mBorderStyles[i];
     if (style == NS_STYLE_BORDER_STYLE_DASHED ||
         style == NS_STYLE_BORDER_STYLE_DOTTED)
     {
       // pretend that all borders aren't the same; we need to draw
       // things separately for dashed/dotting
@@ -1591,18 +1591,18 @@ nsCSSBorderRenderer::DrawBorders()
     }
 
     // First, the corners
     NS_FOR_CSS_CORNERS(corner) {
       // if there's no corner, don't do all this work for it
       if (IsZeroSize(mBorderCornerDimensions[corner]))
         continue;
 
-      const PRIntn sides[2] = { corner, PREV_SIDE(corner) };
-      PRIntn sideBits = (1 << sides[0]) | (1 << sides[1]);
+      const int sides[2] = { corner, PREV_SIDE(corner) };
+      int sideBits = (1 << sides[0]) | (1 << sides[1]);
 
       bool simpleCornerStyle = mCompositeColors[sides[0]] == NULL &&
                                  mCompositeColors[sides[1]] == NULL &&
                                  AreBorderSideFinalStylesSame(sideBits);
 
       // If we don't have anything complex going on in this corner,
       // then we can just fill the corner with a solid color, and avoid
       // the potentially expensive clip.
@@ -1667,17 +1667,17 @@ nsCSSBorderRenderer::DrawBorders()
 
     // in the case of a single-unit border, we already munged the
     // corners up above; so we can just draw the top left and bottom
     // right sides separately, if they're the same.
     //
     // We need to check for mNoBorderRadius, because when there is
     // one, FillSolidBorder always draws the full rounded rectangle
     // and expects there to be a clip in place.
-    PRIntn alreadyDrawnSides = 0;
+    int alreadyDrawnSides = 0;
     if (mOneUnitBorder &&
         mNoBorderRadius &&
         (dashedSides & (SIDE_BIT_TOP | SIDE_BIT_LEFT)) == 0)
     {
       if (tlBordersSame) {
         DrawBorderSides(SIDE_BIT_TOP | SIDE_BIT_LEFT);
         alreadyDrawnSides |= (SIDE_BIT_TOP | SIDE_BIT_LEFT);
       }
--- a/layout/base/nsCSSRenderingBorders.h
+++ b/layout/base/nsCSSRenderingBorders.h
@@ -66,17 +66,17 @@ struct nsCSSBorderRenderer {
   nsCSSBorderRenderer(PRInt32 aAppUnitsPerPixel,
                       gfxContext* aDestContext,
                       gfxRect& aOuterRect,
                       const PRUint8* aBorderStyles,
                       const gfxFloat* aBorderWidths,
                       gfxCornerSizes& aBorderRadii,
                       const nscolor* aBorderColors,
                       nsBorderColors* const* aCompositeColors,
-                      PRIntn aSkipSides,
+                      int aSkipSides,
                       nscolor aBackgroundColor);
 
   gfxCornerSizes mBorderCornerDimensions;
 
   // destination context
   gfxContext* mContext;
 
   // the rectangle of the outside and the inside of the border
@@ -93,17 +93,17 @@ struct nsCSSBorderRenderer {
   // colors
   const nscolor* mBorderColors;
   nsBorderColors* const* mCompositeColors;
 
   // core app units per pixel
   PRInt32 mAUPP;
 
   // misc -- which sides to skip, the background color
-  PRIntn mSkipSides;
+  int mSkipSides;
   nscolor mBackgroundColor;
 
   // calculated values
   bool mOneUnitBorder;
   bool mNoBorderRadius;
   bool mAvoidStroke;
 
   // For all the sides in the bitmask, would they be rendered
@@ -146,29 +146,29 @@ struct nsCSSBorderRenderer {
   // TL/BR paths.  Otherwise, we do the full path and fill.
   //
   // Calling code is expected to only set up a clip as necessary; no
   // clip is needed if we can render the entire border in 1 or 2 passes.
   void FillSolidBorder(const gfxRect& aOuterRect,
                        const gfxRect& aInnerRect,
                        const gfxCornerSizes& aBorderRadii,
                        const gfxFloat *aBorderSizes,
-                       PRIntn aSides,
+                       int aSides,
                        const gfxRGBA& aColor);
 
   //
   // core rendering
   //
 
   // draw the border for the given sides, using the style of the first side
   // present in the bitmask
-  void DrawBorderSides (PRIntn aSides);
+  void DrawBorderSides (int aSides);
 
   // function used by the above to handle -moz-border-colors
-  void DrawBorderSidesCompositeColors(PRIntn aSides, const nsBorderColors *compositeColors);
+  void DrawBorderSidesCompositeColors(int aSides, const nsBorderColors *compositeColors);
 
   // draw the given dashed side
   void DrawDashedSide (mozilla::css::Side aSide);
   
   // Setup the stroke style for a given side
   void SetupStrokeStyle(mozilla::css::Side aSize);
 
   // Analyze if all border sides have the same width.
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -1840,17 +1840,17 @@ nsFrameManager::RestoreFrameState(nsIFra
 //----------------------------------------------------------------------
 
 static PLHashNumber
 HashKey(void* key)
 {
   return NS_PTR_TO_INT32(key);
 }
 
-static PRIntn
+static int
 CompareKeys(void* key1, void* key2)
 {
   return key1 == key2;
 }
 
 //----------------------------------------------------------------------
 
 nsFrameManagerBase::UndisplayedMap::UndisplayedMap(PRUint32 aNumBuckets)
@@ -1973,18 +1973,18 @@ nsFrameManagerBase::UndisplayedMap::Remo
     UndisplayedNode*  node = (UndisplayedNode*)((*entry)->value);
     NS_ASSERTION(node, "null node for non-null entry in UndisplayedMap");
     delete node;
     PL_HashTableRawRemove(mTable, entry, *entry);
     mLastLookup = nullptr; // hashtable may have shifted bucket out from under us
   }
 }
 
-static PRIntn
-RemoveUndisplayedEntry(PLHashEntry* he, PRIntn i, void* arg)
+static int
+RemoveUndisplayedEntry(PLHashEntry* he, int i, void* arg)
 {
   UndisplayedNode*  node = (UndisplayedNode*)(he->value);
   delete node;
   // Remove and free this entry and continue enumerating
   return HT_ENUMERATE_REMOVE | HT_ENUMERATE_NEXT;
 }
 
 void
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -366,36 +366,36 @@ public:
   void SetPaintFrameCounts(bool aVal)        { mPaintFrameByFrameCounts = aVal; }
 
   bool IsPaintingFrameCounts() { return mPaintFrameByFrameCounts; }
 
 protected:
   void DisplayTotals(PRUint32 aTotal, PRUint32 * aDupArray, char * aTitle);
   void DisplayHTMLTotals(PRUint32 aTotal, PRUint32 * aDupArray, char * aTitle);
 
-  static PRIntn RemoveItems(PLHashEntry *he, PRIntn i, void *arg);
-  static PRIntn RemoveIndiItems(PLHashEntry *he, PRIntn i, void *arg);
+  static int RemoveItems(PLHashEntry *he, int i, void *arg);
+  static int RemoveIndiItems(PLHashEntry *he, int i, void *arg);
   void CleanUp();
 
   // stdout Output Methods
-  static PRIntn DoSingleTotal(PLHashEntry *he, PRIntn i, void *arg);
-  static PRIntn DoSingleIndi(PLHashEntry *he, PRIntn i, void *arg);
+  static int DoSingleTotal(PLHashEntry *he, int i, void *arg);
+  static int DoSingleIndi(PLHashEntry *he, int i, void *arg);
 
   void DoGrandTotals();
   void DoIndiTotalsTree();
 
   // HTML Output Methods
-  static PRIntn DoSingleHTMLTotal(PLHashEntry *he, PRIntn i, void *arg);
+  static int DoSingleHTMLTotal(PLHashEntry *he, int i, void *arg);
   void DoGrandHTMLTotals();
 
   // Zero Out the Totals
-  static PRIntn DoClearTotals(PLHashEntry *he, PRIntn i, void *arg);
+  static int DoClearTotals(PLHashEntry *he, int i, void *arg);
 
   // Displays the Diff Totals
-  static PRIntn DoDisplayDiffTotals(PLHashEntry *he, PRIntn i, void *arg);
+  static int DoDisplayDiffTotals(PLHashEntry *he, int i, void *arg);
 
   PLHashTable * mCounts;
   PLHashTable * mIndiFrameCounts;
   FILE * mFD;
   
   bool mDumpFrameCounts;
   bool mDumpFrameByFrameCounts;
   bool mPaintFrameByFrameCounts;
@@ -8593,28 +8593,28 @@ void ReflowCountMgr::PaintCount(const ch
       aRenderingContext->DrawString(buf, strlen(buf), x,y);
 
       aRenderingContext->PopState();
     }
   }
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::RemoveItems(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::RemoveItems(PLHashEntry *he, int i, void *arg)
 {
   char *str = (char *)he->key;
   ReflowCounter * counter = (ReflowCounter *)he->value;
   delete counter;
   NS_Free(str);
 
   return HT_ENUMERATE_REMOVE;
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::RemoveIndiItems(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::RemoveIndiItems(PLHashEntry *he, int i, void *arg)
 {
   char *str = (char *)he->key;
   IndiReflowCounter * counter = (IndiReflowCounter *)he->value;
   delete counter;
   NS_Free(str);
 
   return HT_ENUMERATE_REMOVE;
 }
@@ -8631,17 +8631,17 @@ void ReflowCountMgr::CleanUp()
   if (nullptr != mIndiFrameCounts) {
     PL_HashTableEnumerateEntries(mIndiFrameCounts, RemoveIndiItems, nullptr);
     PL_HashTableDestroy(mIndiFrameCounts);
     mIndiFrameCounts = nullptr;
   }
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::DoSingleTotal(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::DoSingleTotal(PLHashEntry *he, int i, void *arg)
 {
   char *str = (char *)he->key;
   ReflowCounter * counter = (ReflowCounter *)he->value;
 
   counter->DisplayTotals(str);
 
   return HT_ENUMERATE_NEXT;
 }
@@ -8693,17 +8693,17 @@ static void RecurseIndiTotals(nsPresCont
   while (child) {
     RecurseIndiTotals(aPresContext, aHT, child, aLevel+1);
     child = child->GetNextSibling();
   }
 
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::DoSingleIndi(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::DoSingleIndi(PLHashEntry *he, int i, void *arg)
 {
   IndiReflowCounter * counter = (IndiReflowCounter *)he->value;
   if (counter && !counter->mHasBeenOutput) {
     char * name = ToNewCString(counter->mName);
     printf("%s - %p   [%d][", name, (void*)counter->mFrame, counter->mCount);
     printf("%d", counter->mCounter.GetTotal());
     printf("]\n");
     nsMemory::Free(name);
@@ -8726,17 +8726,17 @@ void ReflowCountMgr::DoIndiTotalsTree()
       printf("-- Individual Counts of Frames not in Root Tree\n");
       printf("------------------------------------------------\n");
       PL_HashTableEnumerateEntries(mIndiFrameCounts, DoSingleIndi, this);
     }
   }
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::DoSingleHTMLTotal(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::DoSingleHTMLTotal(PLHashEntry *he, int i, void *arg)
 {
   char *str = (char *)he->key;
   ReflowCounter * counter = (ReflowCounter *)he->value;
 
   counter->DisplayHTMLTotals(str);
 
   return HT_ENUMERATE_NEXT;
 }
@@ -8803,17 +8803,17 @@ void ReflowCountMgr::DisplayHTMLTotals(c
     fprintf(mFD, "</body></html>\n");
     fclose(mFD);
     mFD = nullptr;
   }
 #endif // not XP!
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::DoClearTotals(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::DoClearTotals(PLHashEntry *he, int i, void *arg)
 {
   ReflowCounter * counter = (ReflowCounter *)he->value;
   counter->ClearTotals();
 
   return HT_ENUMERATE_NEXT;
 }
 
 //------------------------------------------------------------------
@@ -8833,17 +8833,17 @@ void ReflowCountMgr::ClearGrandTotals()
     } else {
       gTots->ClearTotals();
       gTots->SetTotalsCache();
     }
   }
 }
 
 //------------------------------------------------------------------
-PRIntn ReflowCountMgr::DoDisplayDiffTotals(PLHashEntry *he, PRIntn i, void *arg)
+int ReflowCountMgr::DoDisplayDiffTotals(PLHashEntry *he, int i, void *arg)
 {
   bool cycledOnce = (arg != 0);
 
   char *str = (char *)he->key;
   ReflowCounter * counter = (ReflowCounter *)he->value;
 
   if (cycledOnce) {
     counter->CalcDiffInTotals();
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -86,17 +86,17 @@ public:
 #ifdef DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const {
     return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
   }
 #endif
 
 protected:
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
   void ReparentFrameList(const nsFrameList& aFrameList);
 
   // mLegendFrame is a nsLegendFrame or a nsHTMLScrollFrame with the
   // nsLegendFrame as the scrolled frame (aka content insertion frame).
   nsIFrame* mLegendFrame;
   nsIFrame* mContentFrame;
   nsRect    mLegendRect;
   nscoord   mLegendSpace;
@@ -240,17 +240,17 @@ nsFieldSetFrame::BuildDisplayList(nsDisp
   contentDisplayItems.MoveTo(aLists);
   return NS_OK;
 }
 
 void
 nsFieldSetFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext,
     nsPoint aPt, const nsRect& aDirtyRect, PRUint32 aBGFlags)
 {
-  PRIntn skipSides = GetSkipSides();
+  int skipSides = GetSkipSides();
   const nsStyleBorder* borderStyle = GetStyleBorder();
        
   nscoord topBorder = borderStyle->GetComputedBorderWidth(NS_SIDE_TOP);
   nscoord yoff = 0;
   nsPresContext* presContext = PresContext();
      
   // if the border is smaller than the legend. Move the border down
   // to be centered on the legend. 
@@ -585,17 +585,17 @@ nsFieldSetFrame::Reflow(nsPresContext*  
   FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize, aReflowState, aStatus);
 
   Invalidate(aDesiredSize.VisualOverflow());
 
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
   return NS_OK;
 }
 
-PRIntn
+int
 nsFieldSetFrame::GetSkipSides() const
 {
   return 0;
 }
 
 NS_IMETHODIMP
 nsFieldSetFrame::AppendFrames(ChildListID    aListID,
                               nsFrameList&   aFrameList)
--- a/layout/forms/nsFileControlFrame.cpp
+++ b/layout/forms/nsFileControlFrame.cpp
@@ -472,17 +472,17 @@ nsFileControlFrame::GetMinWidth(nsRender
 
 nsTextControlFrame*
 nsFileControlFrame::GetTextControlFrame()
 {
   nsITextControlFrame* tc = do_QueryFrame(mTextContent->GetPrimaryFrame());
   return static_cast<nsTextControlFrame*>(tc);
 }
 
-PRIntn
+int
 nsFileControlFrame::GetSkipSides() const
 {
   return 0;
 }
 
 void
 nsFileControlFrame::SyncAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
                              PRInt32 aWhichControls)
--- a/layout/forms/nsFileControlFrame.h
+++ b/layout/forms/nsFileControlFrame.h
@@ -138,17 +138,17 @@ protected:
   };
 
   virtual bool IsFrameOfType(PRUint32 aFlags) const
   {
     return nsBlockFrame::IsFrameOfType(aFlags &
       ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
   }
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   /**
    * The text box input.
    * @see nsFileControlFrame::CreateAnonymousContent
    */
   nsCOMPtr<nsIContent> mTextContent;
   /**
    * The browse button input.
--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -323,17 +323,17 @@ nsHTMLButtonControlFrame::ReflowButtonCo
   if (aDesiredSize.ascent == nsHTMLReflowMetrics::ASK_FOR_BASELINE)
     aDesiredSize.ascent = aFirstKid->GetBaseline();
 
   // Adjust the baseline by our offset (since we moved the child's
   // baseline by that much).
   aDesiredSize.ascent += yoff;
 }
 
-PRIntn
+int
 nsHTMLButtonControlFrame::GetSkipSides() const
 {
   return 0;
 }
 
 nsresult nsHTMLButtonControlFrame::SetFormProperty(nsIAtom* aName, const nsAString& aValue)
 {
   if (nsGkAtoms::value == aName) {
--- a/layout/forms/nsHTMLButtonControlFrame.h
+++ b/layout/forms/nsHTMLButtonControlFrame.h
@@ -103,17 +103,17 @@ protected:
   virtual bool IsInput() { return false; }
   void ReflowButtonContents(nsPresContext* aPresContext,
                             nsHTMLReflowMetrics& aDesiredSize,
                             const nsHTMLReflowState& aReflowState,
                             nsIFrame* aFirstKid,
                             nsMargin aFocusPadding,
                             nsReflowStatus& aStatus);
 
-  PRIntn GetSkipSides() const;
+  int GetSkipSides() const;
   nsButtonFrameRenderer mRenderer;
 };
 
 #endif
 
 
 
 
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -1088,17 +1088,17 @@ NS_IMETHODIMP
 nsListControlFrame::OnOptionSelected(PRInt32 aIndex, bool aSelected)
 {
   if (aSelected) {
     ScrollToIndex(aIndex);
   }
   return NS_OK;
 }
 
-PRIntn
+int
 nsListControlFrame::GetSkipSides() const
 {    
     // Don't skip any sides during border rendering
   return 0;
 }
 
 void
 nsListControlFrame::OnContentReset()
--- a/layout/forms/nsListControlFrame.h
+++ b/layout/forms/nsListControlFrame.h
@@ -108,17 +108,17 @@ public:
   virtual bool ShouldPropagateComputedHeightToScrolledContent() const;
 
     // for accessibility purposes
 #ifdef ACCESSIBILITY
   virtual already_AddRefed<Accessible> CreateAccessible();
 #endif
 
     // nsContainerFrame
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
     // nsIListControlFrame
   virtual void SetComboboxFrame(nsIFrame* aComboboxFrame);
   virtual PRInt32 GetSelectedIndex();
   virtual already_AddRefed<nsIContent> GetCurrentOption();
 
   /**
    * Gets the text of the currently selected item.
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -202,17 +202,17 @@ DumpStyleGeneaology(nsIFrame* aFrame, co
 #ifdef REFLOW_STATUS_COVERAGE
 static void
 RecordReflowStatus(bool aChildIsBlock, nsReflowStatus aFrameReflowStatus)
 {
   static PRUint32 record[2];
 
   // 0: child-is-block
   // 1: child-is-inline
-  PRIntn index = 0;
+  int index = 0;
   if (!aChildIsBlock) index |= 1;
 
   // Compute new status
   PRUint32 newS = record[index];
   if (NS_INLINE_IS_BREAK(aFrameReflowStatus)) {
     if (NS_INLINE_IS_BREAK_BEFORE(aFrameReflowStatus)) {
       newS |= 1;
     }
@@ -6093,23 +6093,23 @@ nsBlockFrame::RecoverFloatsFor(nsIFrame*
     block->RecoverFloats(aFloatManager);
     aFloatManager.Translate(-pos.x, -pos.y);
   }
 }
 
 //////////////////////////////////////////////////////////////////////
 // Painting, event handling
 
-PRIntn
+int
 nsBlockFrame::GetSkipSides() const
 {
   if (IS_TRUE_OVERFLOW_CONTAINER(this))
     return (1 << NS_SIDE_TOP) | (1 << NS_SIDE_BOTTOM);
 
-  PRIntn skip = 0;
+  int skip = 0;
   if (GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   nsIFrame* nif = GetNextInFlow();
   if (nif && !IS_TRUE_OVERFLOW_CONTAINER(nif)) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -392,17 +392,17 @@ protected:
   }
 
   /** move the frames contained by aLine by aDY
     * if aLine is a block, its child floats are added to the state manager
     */
   void SlideLine(nsBlockReflowState& aState,
                  nsLineBox* aLine, nscoord aDY);
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   virtual void ComputeFinalSize(const nsHTMLReflowState& aReflowState,
                                 nsBlockReflowState&      aState,
                                 nsHTMLReflowMetrics&     aMetrics,
                                 nscoord*                 aBottomEdgeOfChildren);
 
   void ComputeOverflowAreas(const nsRect&         aBounds,
                             const nsStyleDisplay* aDisplay,
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -89,17 +89,17 @@ nsBlockReflowContext::ComputeCollapsedTo
 
   // iterate not just through the lines of 'block' but also its
   // overflow lines and the normal and overflow lines of its next in
   // flows. Note that this will traverse some frames more than once:
   // for example, if A contains B and A->nextinflow contains
   // B->nextinflow, we'll traverse B->nextinflow twice. But this is
   // OK because our traversal is idempotent.
   for ( ;block; block = static_cast<nsBlockFrame*>(block->GetNextInFlow())) {
-    for (PRIntn overflowLines = false; overflowLines <= true; ++overflowLines) {
+    for (int overflowLines = false; overflowLines <= true; ++overflowLines) {
       nsBlockFrame::line_iterator line;
       nsBlockFrame::line_iterator line_end;
       bool anyLines = true;
       if (overflowLines) {
         nsBlockFrame::FrameLines* frames = block->GetOverflowLines();
         nsLineList* lines = frames ? &frames->mLines : nullptr;
         if (!lines) {
           anyLines = false;
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -439,21 +439,21 @@ static const char gUpperRomanCharsB[] = 
 static bool RomanToText(PRInt32 ordinal, nsString& result, const char* achars, const char* bchars)
 {
   if (ordinal < 1 || ordinal > 3999) {
     DecimalToText(ordinal, result);
     return false;
   }
   nsAutoString addOn, decStr;
   decStr.AppendInt(ordinal, 10);
-  PRIntn len = decStr.Length();
+  int len = decStr.Length();
   const PRUnichar* dp = decStr.get();
   const PRUnichar* end = dp + len;
-  PRIntn romanPos = len;
-  PRIntn n;
+  int romanPos = len;
+  int n;
 
   for (; dp < end; dp++) {
     romanPos--;
     addOn.SetLength(0);
     switch(*dp) {
       case '3':
         addOn.Append(PRUnichar(achars[romanPos]));
         // FALLTHROUGH
--- a/layout/generic/nsCanvasFrame.cpp
+++ b/layout/generic/nsCanvasFrame.cpp
@@ -566,17 +566,17 @@ nsCanvasFrame::Reflow(nsPresContext*    
 
   FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize, aReflowState, aStatus);
 
   NS_FRAME_TRACE_REFLOW_OUT("nsCanvasFrame::Reflow", aStatus);
   NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
   return NS_OK;
 }
 
-PRIntn
+int
 nsCanvasFrame::GetSkipSides() const
 {
   return 0;
 }
 
 nsIAtom*
 nsCanvasFrame::GetType() const
 {
--- a/layout/generic/nsCanvasFrame.h
+++ b/layout/generic/nsCanvasFrame.h
@@ -103,17 +103,17 @@ public:
   NS_IMETHOD GetFrameName(nsAString& aResult) const;
 #endif
   NS_IMETHOD GetContentForEvent(nsEvent* aEvent,
                                 nsIContent** aContent);
 
   nsRect CanvasArea() const;
 
 protected:
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   // Data members
   bool                      mDoPaintFocus;
   bool                      mAddedScrollPositionListener;
 };
 
 /**
  * Override nsDisplayBackground methods so that we pass aBGClipRect to
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -79,17 +79,17 @@ public:
     return MakeFrameName(NS_LITERAL_STRING("ColumnSet"), aResult);
   }
 #endif
 
 protected:
   nscoord        mLastBalanceHeight;
   nsReflowStatus mLastFrameStatus;
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   /**
    * These are the parameters that control the layout of columns.
    */
   struct ReflowConfig {
     PRInt32 mBalanceColCount;
     nscoord mColWidth;
     nscoord mExpectedWidthLeftOver;
@@ -1119,17 +1119,17 @@ nsColumnSetFrame::BuildDisplayList(nsDis
   while (kid) {
     nsresult rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
     NS_ENSURE_SUCCESS(rv, rv);
     kid = kid->GetNextSibling();
   }
   return NS_OK;
 }
 
-PRIntn
+int
 nsColumnSetFrame::GetSkipSides() const
 {
   return 0;
 }
 
 NS_IMETHODIMP
 nsColumnSetFrame::AppendFrames(ChildListID     aListID,
                                nsFrameList&    aFrameList)
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -41,17 +41,17 @@ nsFirstLetterFrame::GetFrameName(nsAStri
 #endif
 
 nsIAtom*
 nsFirstLetterFrame::GetType() const
 {
   return nsGkAtoms::letterFrame;
 }
 
-PRIntn
+int
 nsFirstLetterFrame::GetSkipSides() const
 {
   return 0;
 }
 
 NS_IMETHODIMP
 nsFirstLetterFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                      const nsRect&           aDirtyRect,
--- a/layout/generic/nsFirstLetterFrame.h
+++ b/layout/generic/nsFirstLetterFrame.h
@@ -75,14 +75,14 @@ public:
   nsresult CreateContinuationForFloatingParent(nsPresContext* aPresContext,
                                                nsIFrame* aChild,
                                                nsIFrame** aContinuation,
                                                bool aIsFluid);
 
 protected:
   nscoord mBaseline;
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   void DrainOverflowFrames(nsPresContext* aPresContext);
 };
 
 #endif /* nsFirstLetterFrame_h__ */
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -906,17 +906,17 @@ nsIFrame::GetUsedPadding() const
     NS_ASSERTION(hasPadding, "We should have padding here! (out of memory?)");
   }
   return padding;
 }
 
 void
 nsIFrame::ApplySkipSides(nsMargin& aMargin) const
 {
-  PRIntn skipSides = GetSkipSides();
+  int skipSides = GetSkipSides();
   if (skipSides & (1 << NS_SIDE_TOP))
     aMargin.top = 0;
   if (skipSides & (1 << NS_SIDE_RIGHT))
     aMargin.right = 0;
   if (skipSides & (1 << NS_SIDE_BOTTOM))
     aMargin.bottom = 0;
   if (skipSides & (1 << NS_SIDE_LEFT))
     aMargin.left = 0;
@@ -1036,17 +1036,17 @@ nsIFrame::GetContentRect() const
 {
   return GetContentRectRelativeToSelf() + GetPosition();
 }
 
 bool
 nsIFrame::ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
                              const nsSize& aFrameSize,
                              const nsSize& aBorderArea,
-                             PRIntn aSkipSides,
+                             int aSkipSides,
                              nscoord aRadii[8])
 {
   // Percentages are relative to whichever side they're on.
   NS_FOR_CSS_HALF_CORNERS(i) {
     const nsStyleCoord c = aBorderRadius.Get(i);
     nscoord axis =
       NS_HALF_CORNER_IS_X(i) ? aFrameSize.width : aFrameSize.height;
 
@@ -8138,17 +8138,17 @@ void
 nsFrame::GetBoxName(nsAutoString& aName)
 {
   GetFrameName(aName);
 }
 #endif
 
 #ifdef DEBUG
 static void
-GetTagName(nsFrame* aFrame, nsIContent* aContent, PRIntn aResultSize,
+GetTagName(nsFrame* aFrame, nsIContent* aContent, int aResultSize,
            char* aResult)
 {
   if (aContent) {
     PR_snprintf(aResult, aResultSize, "%s@%p",
                 nsAtomCString(aContent->Tag()).get(), aFrame);
   }
   else {
     PR_snprintf(aResult, aResultSize, "@%p", aFrame);
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -25,17 +25,17 @@
  * specific type of logging. Each logging operation has associated
  * inline methods defined below.
  */
 #define NS_FRAME_TRACE_CALLS        0x1
 #define NS_FRAME_TRACE_PUSH_PULL    0x2
 #define NS_FRAME_TRACE_CHILD_REFLOW 0x4
 #define NS_FRAME_TRACE_NEW_FRAMES   0x8
 
-#define NS_FRAME_LOG_TEST(_lm,_bit) (PRIntn((_lm)->level) & (_bit))
+#define NS_FRAME_LOG_TEST(_lm,_bit) (int((_lm)->level) & (_bit))
 
 #ifdef DEBUG
 #define NS_FRAME_LOG(_bit,_args)                                \
   PR_BEGIN_MACRO                                                \
     if (NS_FRAME_LOG_TEST(nsFrame::GetLogModuleInfo(),_bit)) {  \
       PR_LogPrint _args;                                        \
     }                                                           \
   PR_END_MACRO
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -657,17 +657,17 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWi
       (mParentBorderWidth == 0 && !forcing)) {
     return mParentBorderWidth;
   }
 
   return nsPresContext::CSSPixelsToAppUnits(DEFAULT_BORDER_WIDTH_PX);
 }
 
 
-PRIntn
+int
 nsHTMLFramesetFrame::GetSkipSides() const
 {
   return 0;
 }
 
 void 
 nsHTMLFramesetFrame::GetDesiredSize(nsPresContext*          aPresContext,
                                     const nsHTMLReflowState& aReflowState,
--- a/layout/generic/nsFrameSetFrame.h
+++ b/layout/generic/nsFrameSetFrame.h
@@ -174,17 +174,17 @@ protected:
   nsFrameborder GetFrameBorder(nsIContent* aContent);
 
   nscolor GetBorderColor();
 
   nscolor GetBorderColor(nsIContent* aFrameContent);
 
   bool GetNoResize(nsIFrame* aChildFrame); 
   
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   void ReflowPlaceChild(nsIFrame*                aChild,
                         nsPresContext*          aPresContext,
                         const nsHTMLReflowState& aReflowState,
                         nsPoint&                 aOffset,
                         nsSize&                  aSize,
                         nsIntPoint*              aCellIndex = 0);
   
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -142,17 +142,17 @@ nsHTMLScrollFrame::RemoveFrame(ChildList
 }
 
 nsSplittableType
 nsHTMLScrollFrame::GetSplittableType() const
 {
   return NS_FRAME_NOT_SPLITTABLE;
 }
 
-PRIntn
+int
 nsHTMLScrollFrame::GetSkipSides() const
 {
   return 0;
 }
 
 nsIAtom*
 nsHTMLScrollFrame::GetType() const
 {
@@ -1082,17 +1082,17 @@ nsXULScrollFrame::GetSplittableType() co
 
 NS_IMETHODIMP
 nsXULScrollFrame::GetPadding(nsMargin& aMargin)
 {
    aMargin.SizeTo(0,0,0,0);
    return NS_OK;
 }
 
-PRIntn
+int
 nsXULScrollFrame::GetSkipSides() const
 {
   return 0;
 }
 
 nsIAtom*
 nsXULScrollFrame::GetType() const
 {
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -536,17 +536,17 @@ public:
   bool DidHistoryRestore() { return mInner.mDidHistoryRestore; }
 
 #ifdef ACCESSIBILITY
   virtual already_AddRefed<Accessible> CreateAccessible();
 #endif
 
 protected:
   nsHTMLScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot);
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
   
   void SetSuppressScrollbarUpdate(bool aSuppress) {
     mInner.mSupppressScrollbarUpdate = aSuppress;
   }
   bool GuessHScrollbarNeeded(const ScrollReflowState& aState);
   bool GuessVScrollbarNeeded(const ScrollReflowState& aState);
 
   bool IsScrollbarUpdateSuppressed() const {
@@ -783,17 +783,17 @@ public:
   }
 
 #ifdef DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const;
 #endif
 
 protected:
   nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot);
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   void ClampAndSetBounds(nsBoxLayoutState& aState, 
                          nsRect& aRect,
                          nsPoint aScrollPosition,
                          bool aRemoveOverflowAreas = false) {
     /* 
      * For RTL frames, restore the original scrolled position of the right
      * edge, then subtract the current width to find the physical position.
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -996,17 +996,17 @@ public:
    * these, especially if we change the way we handle outline-radius (by
    * removing it and inflating the border radius)
    *
    * Return whether any radii are nonzero.
    */
   static bool ComputeBorderRadii(const nsStyleCorners& aBorderRadius,
                                    const nsSize& aFrameSize,
                                    const nsSize& aBorderArea,
-                                   PRIntn aSkipSides,
+                                   int aSkipSides,
                                    nscoord aRadii[8]);
 
   /*
    * Given a set of border radii for one box (e.g., border box), convert
    * it to the equivalent set of radii for another box (e.g., in to
    * padding box, out to outline box) by reducing radii or increasing
    * nonzero radii as appropriate.
    *
@@ -2352,17 +2352,17 @@ public:
    * Returns true if the overflow changed.
    */
   bool ClearOverflowRects();
 
   /**
    * Determine whether borders should not be painted on certain sides of the
    * frame.
    */
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   /**
    * @returns true if this frame is selected.
    */
   bool IsSelected() const {
     return (GetContent() && GetContent()->IsSelectionDescendant()) ?
       IsFrameSelected() : false;
   }
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1738,20 +1738,20 @@ nsImageFrame::List(FILE* out, PRInt32 aI
       fprintf(out, " [src=%s]", uristr.get());
     }
   }
   fputs("\n", out);
   return NS_OK;
 }
 #endif
 
-PRIntn
+int
 nsImageFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
 }
--- a/layout/generic/nsImageFrame.h
+++ b/layout/generic/nsImageFrame.h
@@ -120,17 +120,17 @@ public:
     return ImageFrameSuper::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
   }
 
 #ifdef DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const;
   NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
 #endif
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   nsresult GetIntrinsicImageSize(nsSize& aSize);
 
   static void ReleaseGlobals() {
     if (gIconLoad) {
       gIconLoad->Shutdown();
       NS_RELEASE(gIconLoad);
     }
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -835,20 +835,20 @@ nsInlineFrame::PushFrames(nsPresContext*
   if (aState.mLineLayout) {
     aState.mLineLayout->SetDirtyNextLine();
   }
 }
 
 
 //////////////////////////////////////////////////////////////////////
 
-PRIntn
+int
 nsInlineFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   if (!IsLeftMost()) {
     nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
     if ((GetStateBits() & NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) ||
         (prev && (prev->mRect.height || prev->mRect.width))) {
       // Prev continuation is not empty therefore we don't render our left
       // border edge.
       skip |= 1 << NS_SIDE_LEFT;
     }
@@ -873,18 +873,18 @@ nsInlineFrame::GetSkipSides() const
 
   if (GetStateBits() & NS_FRAME_IS_SPECIAL) {
     // All but the last part of an {ib} split should skip the "end" side (as
     // determined by this frame's direction) and all but the first part of such
     // a split should skip the "start" side.  But figuring out which part of
     // the split we are involves getting our first continuation, which might be
     // expensive.  So don't bother if we already have the relevant bits set.
     bool ltr = (NS_STYLE_DIRECTION_LTR == GetStyleVisibility()->mDirection);
-    PRIntn startBit = (1 << (ltr ? NS_SIDE_LEFT : NS_SIDE_RIGHT));
-    PRIntn endBit = (1 << (ltr ? NS_SIDE_RIGHT : NS_SIDE_LEFT));
+    int startBit = (1 << (ltr ? NS_SIDE_LEFT : NS_SIDE_RIGHT));
+    int endBit = (1 << (ltr ? NS_SIDE_RIGHT : NS_SIDE_LEFT));
     if (((startBit | endBit) & skip) != (startBit | endBit)) {
       // We're missing one of the skip bits, so check whether we need to set it.
       // Only get the first continuation once, as an optimization.
       nsIFrame* firstContinuation = GetFirstContinuation();
       if (nsLayoutUtils::FrameIsNonLastInIBSplit(firstContinuation)) {
         skip |= endBit;
       }
       if (nsLayoutUtils::FrameIsNonFirstInIBSplit(firstContinuation)) {
--- a/layout/generic/nsInlineFrame.h
+++ b/layout/generic/nsInlineFrame.h
@@ -130,17 +130,17 @@ protected:
       mLineContainer = nullptr;
       mLineLayout = nullptr;
       mSetParentPointer = false;
     }
   };
 
   nsInlineFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   nsresult ReflowFrames(nsPresContext* aPresContext,
                         const nsHTMLReflowState& aReflowState,
                         InlineReflowState& rs,
                         nsHTMLReflowMetrics& aMetrics,
                         nsReflowStatus& aStatus);
 
   nsresult ReflowInlineFrame(nsPresContext* aPresContext,
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -198,17 +198,17 @@ nsSubDocumentFrame::ShowViewer()
         return;
       }
       mCallingShow = false;
       mDidCreateDoc = didCreateDoc;
     }
   }
 }
 
-PRIntn
+int
 nsSubDocumentFrame::GetSkipSides() const
 {
   return 0;
 }
 
 nsIFrame*
 nsSubDocumentFrame::GetSubdocumentRootFrame()
 {
--- a/layout/generic/nsSubDocumentFrame.h
+++ b/layout/generic/nsSubDocumentFrame.h
@@ -112,17 +112,17 @@ protected:
 
   nsFrameLoader* FrameLoader();
 
   bool IsInline() { return mIsInline; }
 
   virtual nscoord GetIntrinsicWidth();
   virtual nscoord GetIntrinsicHeight();
 
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   // Hide or show our document viewer
   void HideViewer();
   void ShowViewer();
 
   /* Obtains the frame we should use for intrinsic size information if we are
    * an HTML <object>, <embed> or <applet> (a replaced element - not <iframe>)
    * and our sub-document has an intrinsic size. The frame returned is the
--- a/layout/mathml/nsMathMLChar.cpp
+++ b/layout/mathml/nsMathMLChar.cpp
@@ -1926,17 +1926,17 @@ public:
 private:
   nsRect mRect;
 };
 
 void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
                                      nsRenderingContext* aCtx)
 {
   // for visual debug
-  PRIntn skipSides = 0;
+  int skipSides = 0;
   nsPresContext* presContext = mFrame->PresContext();
   nsStyleContext* styleContext = mFrame->GetStyleContext();
   nsRect rect = mRect + ToReferenceFrame();
   nsCSSRendering::PaintBorder(presContext, *aCtx, mFrame,
                               mVisibleRect, rect, styleContext, skipSides);
   nsCSSRendering::PaintOutline(presContext, *aCtx, mFrame,
                                mVisibleRect, rect, styleContext);
 }
--- a/layout/mathml/nsMathMLContainerFrame.h
+++ b/layout/mathml/nsMathMLContainerFrame.h
@@ -75,17 +75,17 @@ public:
 
   virtual bool IsFrameOfType(PRUint32 aFlags) const
   {
     return !(aFlags & nsIFrame::eLineParticipant) &&
       nsContainerFrame::IsFrameOfType(aFlags &
               ~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
   }
 
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   NS_IMETHOD
   AppendFrames(ChildListID     aListID,
                nsFrameList&    aFrameList);
 
   NS_IMETHOD
   InsertFrames(ChildListID     aListID,
                nsIFrame*       aPrevFrame,
--- a/layout/mathml/nsMathMLTokenFrame.h
+++ b/layout/mathml/nsMathMLTokenFrame.h
@@ -67,17 +67,17 @@ public:
     ProcessTextData();
     return nsMathMLContainerFrame::ChildListChanged(aModType);
   }
 
 protected:
   nsMathMLTokenFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLTokenFrame();
 
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   // hook to perform MathML-specific actions depending on the tag
   virtual void ProcessTextData();
 
   // helper to set the style of <mi> which has to be italic or normal
   // depending on its textual content
   bool SetTextStyle();
 
--- a/layout/mathml/nsMathMLmactionFrame.h
+++ b/layout/mathml/nsMathMLmactionFrame.h
@@ -70,17 +70,17 @@ private:
 
     nsMathMLmactionFrame* mOwner;
   };
 
 protected:
   nsMathMLmactionFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmactionFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
 private:
   PRInt32         mActionType;
   PRInt32         mChildCount;
   PRInt32         mSelection;
   nsIFrame*       mSelectedFrame;
   nsCOMPtr<MouseListener> mListener;
 
--- a/layout/mathml/nsMathMLmfencedFrame.h
+++ b/layout/mathml/nsMathMLmfencedFrame.h
@@ -78,17 +78,17 @@ public:
             nscoord            aDesiredSize,
             nsBoundingMetrics& bm,
             nscoord&           dx);
 
 protected:
   nsMathMLmfencedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmfencedFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   nsMathMLChar* mOpenChar;
   nsMathMLChar* mCloseChar;
   nsMathMLChar* mSeparatorsChar;
   PRInt32       mSeparatorsCount;
 
   // clean up
   void
--- a/layout/mathml/nsMathMLmfracFrame.h
+++ b/layout/mathml/nsMathMLmfracFrame.h
@@ -90,17 +90,17 @@ public:
                     nsString&        aThicknessAttribute,
                     nscoord          onePixel,
                     nscoord          aDefaultRuleThickness);
 
 protected:
   nsMathMLmfracFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmfracFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   nsresult PlaceInternal(nsRenderingContext& aRenderingContext,
                          bool                 aPlaceOrigin,
                          nsHTMLReflowMetrics& aDesiredSize,
                          bool                 aWidthOnly);
 
   // Display a slash
   nsresult DisplaySlash(nsDisplayListBuilder* aBuilder,
--- a/layout/mathml/nsMathMLmmultiscriptsFrame.h
+++ b/layout/mathml/nsMathMLmmultiscriptsFrame.h
@@ -26,17 +26,17 @@ public:
   Place(nsRenderingContext& aRenderingContext,
         bool                 aPlaceOrigin,
         nsHTMLReflowMetrics& aDesiredSize);
 
 protected:
   nsMathMLmmultiscriptsFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmmultiscriptsFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
 private:
   nscoord mSubScriptShift;
   nscoord mSupScriptShift;
 
   void
   ProcessAttributes();
 };
--- a/layout/mathml/nsMathMLmoFrame.h
+++ b/layout/mathml/nsMathMLmoFrame.h
@@ -60,17 +60,17 @@ public:
           nsStretchDirection   aStretchDirection,
           nsBoundingMetrics&   aContainerSize,
           nsHTMLReflowMetrics& aDesiredStretchSize);
 
 protected:
   nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
   virtual ~nsMathMLmoFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   nsMathMLChar     mMathMLChar; // Here is the MathMLChar that will deal with the operator.
   nsOperatorFlags  mFlags;
   float            mMinSize;
   float            mMaxSize;
 
   bool UseMathMLChar();
 
--- a/layout/mathml/nsMathMLmpaddedFrame.h
+++ b/layout/mathml/nsMathMLmpaddedFrame.h
@@ -37,17 +37,17 @@ public:
   Place(nsRenderingContext& aRenderingContext,
         bool                 aPlaceOrigin,
         nsHTMLReflowMetrics& aDesiredSize);
 
 protected:
   nsMathMLmpaddedFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmpaddedFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
 private:
   nsCSSValue mWidth;
   nsCSSValue mHeight;
   nsCSSValue mDepth;
   nsCSSValue mLeadingSpace;
   nsCSSValue mVerticalOffset;
 
--- a/layout/mathml/nsMathMLmphantomFrame.h
+++ b/layout/mathml/nsMathMLmphantomFrame.h
@@ -31,12 +31,12 @@ public:
                               const nsRect&           aDirtyRect,
                               const nsDisplayListSet& aLists) { return NS_OK; }
 
 protected:
   nsMathMLmphantomFrame(nsStyleContext* aContext)
     : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmphantomFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 #endif /* nsMathMLmphantomFrame_h___ */
--- a/layout/mathml/nsMathMLmrootFrame.h
+++ b/layout/mathml/nsMathMLmrootFrame.h
@@ -45,15 +45,15 @@ public:
   NS_IMETHOD BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                               const nsRect&           aDirtyRect,
                               const nsDisplayListSet& aLists);
 
 protected:
   nsMathMLmrootFrame(nsStyleContext* aContext);
   virtual ~nsMathMLmrootFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
   nsMathMLChar mSqrChar;
   nsRect       mBarRect;
 };
 
 #endif /* nsMathMLmrootFrame_h___ */
--- a/layout/mathml/nsMathMLmrowFrame.h
+++ b/layout/mathml/nsMathMLmrowFrame.h
@@ -31,12 +31,12 @@ public:
   TransmitAutomaticData() {
     return TransmitAutomaticDataForMrowLikeElement();
   }
 
 protected:
   nsMathMLmrowFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmrowFrame();
 
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 #endif /* nsMathMLmrowFrame_h___ */
--- a/layout/mathml/nsMathMLmspaceFrame.h
+++ b/layout/mathml/nsMathMLmspaceFrame.h
@@ -34,17 +34,17 @@ public:
          nsHTMLReflowMetrics&     aDesiredSize,
          const nsHTMLReflowState& aReflowState,
          nsReflowStatus&          aStatus);
   
 protected:
   nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmspaceFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 
 private:
   nscoord mWidth;
   nscoord mHeight;
   nscoord mDepth;
 
   // helper method to initialize our member data
   void 
--- a/layout/mathml/nsMathMLmstyleFrame.h
+++ b/layout/mathml/nsMathMLmstyleFrame.h
@@ -39,12 +39,12 @@ public:
                                     PRInt32         aLastIndex,
                                     PRUint32        aFlagsValues,
                                     PRUint32        aFlagsToUpdate);
 
 protected:
   nsMathMLmstyleFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmstyleFrame();
 
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 #endif /* nsMathMLmstyleFrame_h___ */
--- a/layout/mathml/nsMathMLmsubFrame.h
+++ b/layout/mathml/nsMathMLmsubFrame.h
@@ -35,12 +35,12 @@ public:
                   nsMathMLContainerFrame* aForFrame,
                   nscoord              aUserSubScriptShift,
                   nscoord              aScriptSpace);
 
  protected:
   nsMathMLmsubFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmsubFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 #endif /* nsMathMLmsubFrame_h___ */
--- a/layout/mathml/nsMathMLmsubsupFrame.h
+++ b/layout/mathml/nsMathMLmsubsupFrame.h
@@ -36,12 +36,12 @@ public:
                     nscoord              aUserSubScriptShift,
                     nscoord              aUserSupScriptShift,
                     nscoord              aScriptSpace);
 
 protected:
   nsMathMLmsubsupFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmsubsupFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 #endif /* nsMathMLmsubsupFrame_h___ */
--- a/layout/mathml/nsMathMLmsupFrame.h
+++ b/layout/mathml/nsMathMLmsupFrame.h
@@ -35,12 +35,12 @@ public:
                     nsMathMLContainerFrame* aForFrame,
                     nscoord              aUserSupScriptShift,
                     nscoord              aScriptSpace);
 
 protected:
   nsMathMLmsupFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmsupFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 #endif /* nsMathMLmsupFrame_h___ */
--- a/layout/mathml/nsMathMLmtableFrame.h
+++ b/layout/mathml/nsMathMLmtableFrame.h
@@ -251,12 +251,12 @@ public:
     return nsBlockFrame::IsFrameOfType(aFlags &
       ~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
   }
 
 protected:
   nsMathMLmtdInnerFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
   virtual ~nsMathMLmtdInnerFrame();
 
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };  // class nsMathMLmtdInnerFrame
 
 #endif /* nsMathMLmtableFrame_h___ */
--- a/layout/mathml/nsMathMLmunderoverFrame.h
+++ b/layout/mathml/nsMathMLmunderoverFrame.h
@@ -44,13 +44,13 @@ public:
   AttributeChanged(PRInt32         aNameSpaceID,
                    nsIAtom*        aAttribute,
                    PRInt32         aModType);
 
 protected:
   nsMathMLmunderoverFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
   virtual ~nsMathMLmunderoverFrame();
   
-  virtual PRIntn GetSkipSides() const { return 0; }
+  virtual int GetSkipSides() const { return 0; }
 };
 
 
 #endif /* nsMathMLmunderoverFrame_h___ */
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -489,20 +489,20 @@ nsTableCellFrame::BuildDisplayList(nsDis
   // This isn't a problem since it won't have a real background except for
   // event handling. We do not call BuildDisplayListForNonBlockChildren
   // because that/ would put the child's background in the Content() list
   // which isn't right (e.g., would end up on top of our child floats for
   // event handling).
   return BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
 }
 
-PRIntn
+int
 nsTableCellFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
 }
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -207,17 +207,17 @@ public:
 
   void DecorateForSelection(nsRenderingContext& aRenderingContext,
                             nsPoint              aPt);
 
   virtual bool UpdateOverflow();
 
 protected:
   /** implement abstract method on nsContainerFrame */
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   /**
    * GetBorderOverflow says how far the cell's own borders extend
    * outside its own bounds.  In the separated borders model this should
    * just be zero (as it is for most frames), but in the collapsed
    * borders model (for which nsBCTableCellFrame overrides this virtual
    * method), it considers the extents of the collapsed border.
    */
--- a/layout/tables/nsTableColGroupFrame.cpp
+++ b/layout/tables/nsTableColGroupFrame.cpp
@@ -328,20 +328,20 @@ nsTableColGroupFrame::RemoveFrame(ChildL
   }
   else {
     mFrames.DestroyFrame(aOldFrame);
   }
 
   return NS_OK;
 }
 
-PRIntn
+int
 nsTableColGroupFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
 }
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -197,17 +197,17 @@ public:
                                   BCPixelSize aPixelValue);
 protected:
   nsTableColGroupFrame(nsStyleContext* aContext);
 
   void InsertColsReflow(PRInt32                   aColIndex,
                         const nsFrameList::Slice& aCols);
 
   /** implement abstract method on nsContainerFrame */
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   // data members
   PRInt32 mColCount;
   // the starting column index this col group represents. Must be >= 0. 
   PRInt32 mStartColIndex;
 
   // border width in pixels
   BCPixelSize mTopContBorderWidth;
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1292,34 +1292,34 @@ nsTableFrame::PaintTableBorderBackground
   nsMargin deflate = GetDeflationForBackground(presContext);
   // If 'deflate' is (0,0,0,0) then we'll paint the table background
   // in a separate display item, so don't do it here.
   nsresult rv = painter.PaintTable(this, deflate, deflate != nsMargin(0, 0, 0, 0));
   if (NS_FAILED(rv)) return;
 
   if (GetStyleVisibility()->IsVisible()) {
     if (!IsBorderCollapse()) {
-      PRIntn skipSides = GetSkipSides();
+      int skipSides = GetSkipSides();
       nsRect rect(aPt, mRect.Size());
       nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
                                   aDirtyRect, rect, mStyleContext, skipSides);
     }
     else {
       // XXX we should probably get rid of this translation at some stage
       // But that would mean modifying PaintBCBorders, ugh
       nsRenderingContext::AutoPushTranslation translate(&aRenderingContext, aPt);
       PaintBCBorders(aRenderingContext, aDirtyRect - aPt);
     }
   }
 }
 
-PRIntn
+int
 nsTableFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   // frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
   // account for pagination
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -484,17 +484,17 @@ protected:
   nsTableFrame(nsStyleContext* aContext);
 
   /** destructor, responsible for mColumnLayoutData */
   virtual ~nsTableFrame();
 
   void InitChildReflowState(nsHTMLReflowState& aReflowState);
 
   /** implement abstract method on nsContainerFrame */
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
 public:
   bool IsRowInserted() const;
   void   SetRowInserted(bool aValue);
 
 protected:
     
   // A helper function to reflow a header or footer with unconstrained height
--- a/layout/tables/nsTableOuterFrame.h
+++ b/layout/tables/nsTableOuterFrame.h
@@ -152,17 +152,17 @@ protected:
   virtual ~nsTableOuterFrame();
 
   void InitChildReflowState(nsPresContext&    aPresContext,                     
                             nsHTMLReflowState& aReflowState);
 
   /** Always returns 0, since the outer table frame has no border of its own
     * The inner table frame can answer this question in a meaningful way.
     * @see nsContainerFrame::GetSkipSides */
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   PRUint8 GetCaptionSide(); // NS_STYLE_CAPTION_SIDE_* or NO_SIDE
 
   bool HasSideCaption() {
     PRUint8 captionSide = GetCaptionSide();
     return captionSide == NS_STYLE_CAPTION_SIDE_LEFT ||
            captionSide == NS_STYLE_CAPTION_SIDE_RIGHT;
   }
@@ -221,12 +221,12 @@ protected:
   nsTableFrame* InnerTableFrame() const {
     return static_cast<nsTableFrame*>(mFrames.FirstChild());
   }
   
 private:
   nsFrameList   mCaptionFrames;
 };
 
-inline PRIntn nsTableOuterFrame::GetSkipSides() const
+inline int nsTableOuterFrame::GetSkipSides() const
 { return 0; }
 
 #endif
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -573,20 +573,20 @@ nsTableRowFrame::BuildDisplayList(nsDisp
       item = new (aBuilder) nsDisplayTableRowBackground(aBuilder, this);
       nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
       NS_ENSURE_SUCCESS(rv, rv);
     }
   }
   return nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect, aLists, item);
 }
 
-PRIntn
+int
 nsTableRowFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
 }
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -235,17 +235,17 @@ protected:
   nsTableRowFrame(nsStyleContext *aContext);
 
   void InitChildReflowState(nsPresContext&         aPresContext,
                             const nsSize&           aAvailSize,
                             bool                    aBorderCollapse,
                             nsTableCellReflowState& aReflowState);
   
   /** implement abstract method on nsContainerFrame */
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   // row-specific methods
 
   nscoord ComputeCellXOffset(const nsHTMLReflowState& aState,
                              nsIFrame*                aKidFrame,
                              const nsMargin&          aKidMargin) const;
   /**
    * Called for incremental/dirty and resize reflows. If aDirtyOnly is true then
--- a/layout/tables/nsTableRowGroupFrame.cpp
+++ b/layout/tables/nsTableRowGroupFrame.cpp
@@ -226,20 +226,20 @@ nsTableRowGroupFrame::BuildDisplayList(n
       nsresult rv = aLists.BorderBackground()->AppendNewToTop(item);
       NS_ENSURE_SUCCESS(rv, rv);
     }
   }  
   return nsTableFrame::DisplayGenericTablePart(aBuilder, this, aDirtyRect,
                                                aLists, item, DisplayRows);
 }
 
-PRIntn
+int
 nsTableRowGroupFrame::GetSkipSides() const
 {
-  PRIntn skip = 0;
+  int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= 1 << NS_SIDE_TOP;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= 1 << NS_SIDE_BOTTOM;
   }
   return skip;
 }
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -327,17 +327,17 @@ public:
 protected:
   nsTableRowGroupFrame(nsStyleContext* aContext);
 
   void InitChildReflowState(nsPresContext&     aPresContext, 
                             bool               aBorderCollapse,
                             nsHTMLReflowState& aReflowState);
   
   /** implement abstract method on nsContainerFrame */
-  virtual PRIntn GetSkipSides() const;
+  virtual int GetSkipSides() const;
 
   void PlaceChild(nsPresContext*         aPresContext,
                   nsRowGroupReflowState& aReflowState,
                   nsIFrame*              aKidFrame,
                   nsHTMLReflowMetrics&   aDesiredSize,
                   const nsRect&          aOriginalKidRect,
                   const nsRect&          aOriginalKidVisualOverflow);
 
--- a/layout/xul/base/src/nsGroupBoxFrame.cpp
+++ b/layout/xul/base/src/nsGroupBoxFrame.cpp
@@ -121,17 +121,17 @@ nsGroupBoxFrame::BuildDisplayList(nsDisp
 
   return BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
   // REVIEW: Debug borders now painted by nsFrame::BuildDisplayListForChild
 }
 
 void
 nsGroupBoxFrame::PaintBorderBackground(nsRenderingContext& aRenderingContext,
     nsPoint aPt, const nsRect& aDirtyRect) {
-  PRIntn skipSides = 0;
+  int skipSides = 0;
   const nsStyleBorder* borderStyleData = GetStyleBorder();
   const nsMargin& border = borderStyleData->GetComputedBorder();
   nscoord yoff = 0;
   nsPresContext* presContext = PresContext();
 
   nsRect groupRect;
   nsIFrame* groupBox = GetCaptionBox(presContext, groupRect);
 
--- a/netwerk/cache/nsCacheEntryDescriptor.cpp
+++ b/netwerk/cache/nsCacheEntryDescriptor.cpp
@@ -539,17 +539,17 @@ nsInputStreamWrapper::LazyInit()
     if (!cacheEntry) return NS_ERROR_NOT_AVAILABLE;
 
     rv = nsCacheService::OpenInputStreamForEntry(cacheEntry, mode,
                                                  mStartOffset,
                                                  getter_AddRefs(mInput));
 
     CACHE_LOG_DEBUG(("nsInputStreamWrapper::LazyInit "
                       "[entry=%p, wrapper=%p, mInput=%p, rv=%d]",
-                      mDescriptor, this, mInput.get(), PRIntn(rv)));
+                      mDescriptor, this, mInput.get(), int(rv)));
 
     if (NS_FAILED(rv)) return rv;
 
     mInitialized = true;
     return NS_OK;
 }
 
 nsresult nsCacheEntryDescriptor::
--- a/netwerk/cache/nsDiskCacheStreams.cpp
+++ b/netwerk/cache/nsDiskCacheStreams.cpp
@@ -134,17 +134,17 @@ nsDiskCacheInputStream::Read(char * buff
     if (mFD) {
         // just read from file
         PRInt32  result = PR_Read(mFD, buffer, count);
         if (result < 0) {
             PRErrorCode error = PR_GetError();
             nsresult rv = NS_ErrorAccordingToNSPR();
             CACHE_LOG_DEBUG(("CACHE: nsDiskCacheInputStream::Read PR_Read failed"
                              "[stream=%p, rv=%d, NSPR error %s",
-                             this, PRIntn(rv), PR_ErrorToName(error)));
+                             this, int(rv), PR_ErrorToName(error)));
             return rv;
         }
         
         mPos += (PRUint32)result;
         *bytesRead = (PRUint32)result;
         
     } else if (mBuffer) {
         // read data from mBuffer
@@ -694,17 +694,17 @@ nsDiskCacheStreamIO::UpdateFileSize()
             NS_WARNING("cacheMap->UpdateRecord() failed.");
             // XXX doom cache entry?
         }
     }
 }
 
 
 nsresult
-nsDiskCacheStreamIO::OpenCacheFile(PRIntn flags, PRFileDesc ** fd)
+nsDiskCacheStreamIO::OpenCacheFile(int flags, PRFileDesc ** fd)
 {
     NS_ENSURE_ARG_POINTER(fd);
     
     CACHE_LOG_DEBUG(("nsDiskCacheStreamIO::OpenCacheFile"));
 
     nsresult         rv;
     nsDiskCacheMap * cacheMap = mDevice->CacheMap();
     
--- a/netwerk/cache/nsDiskCacheStreams.h
+++ b/netwerk/cache/nsDiskCacheStreams.h
@@ -53,17 +53,17 @@ public:
 
     // GCC 2.95.2 requires this to be defined, although we never call it.
     // and OS/2 requires that it not be private
     nsDiskCacheStreamIO() { NS_NOTREACHED("oops"); }
 private:
 
 
     void        Close();
-    nsresult    OpenCacheFile(PRIntn flags, PRFileDesc ** fd);
+    nsresult    OpenCacheFile(int flags, PRFileDesc ** fd);
     nsresult    ReadCacheBlocks();
     nsresult    FlushBufferToFile();
     void        UpdateFileSize();
     void        DeleteBuffer();
     nsresult    Flush();
 
 
     nsDiskCacheBinding *        mBinding;       // not an owning reference
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -960,17 +960,17 @@ nsHostResolver::ThreadFunc(void *arg)
     nsResState rs;
 #endif
     nsHostResolver *resolver = (nsHostResolver *)arg;
     nsHostRecord *rec;
     PRAddrInfo *ai;
     while (resolver->GetHostToLookup(&rec)) {
         LOG(("Calling getaddrinfo for host [%s].\n", rec->host));
 
-        PRIntn flags = PR_AI_ADDRCONFIG;
+        int flags = PR_AI_ADDRCONFIG;
         if (!(rec->flags & RES_CANON_NAME))
             flags |= PR_AI_NOCANONNAME;
 
         TimeStamp startTime = TimeStamp::Now();
 
         ai = PR_GetAddrInfoByName(rec->host, rec->af, flags);
 #if defined(RES_RETRY_ON_FAILURE)
         if (!ai && rs.Reset())
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -140,21 +140,21 @@ MaybeMarkCacheEntryValid(const void * ch
                          nsCacheAccessMode cacheAccess)
 {
     // Mark the cache entry as valid in order to allow others access to it.
     // XXX: Is it really necessary to check for write acccess to the entry?
     if (cacheAccess & nsICache::ACCESS_WRITE) {
         nsresult rv = cacheEntry->MarkValid();
         LOG(("Marking cache entry valid "
              "[channel=%p, entry=%p, access=%d, result=%d]",
-             channel, cacheEntry, PRIntn(cacheAccess), PRIntn(rv)));
+             channel, cacheEntry, int(cacheAccess), int(rv)));
     } else {
         LOG(("Not marking read-only cache entry valid "
              "[channel=%p, entry=%p, access=%d]", 
-             channel, cacheEntry, PRIntn(cacheAccess)));
+             channel, cacheEntry, int(cacheAccess)));
     }
 }
 
 } // unnamed namespace
 
 class AutoRedirectVetoNotifier
 {
 public:
@@ -2886,17 +2886,17 @@ HttpCacheQuery::Run()
 NS_IMETHODIMP
 HttpCacheQuery::OnCacheEntryAvailable(nsICacheEntryDescriptor *entry,
                                       nsCacheAccessMode access,
                                       nsresult status)
 
 {
     LOG(("HttpCacheQuery::OnCacheEntryAvailable [channel=%p entry=%p "
          "access=%x status=%x, mRunConut=%d]\n", mChannel.get(), entry, access,
-         status, PRIntn(mRunCount)));
+         status, int(mRunCount)));
 
     // XXX Bug 759805: Sometimes we will call this method directly from
     // HttpCacheQuery::Run when AsyncOpenCacheEntry fails, but
     // AsyncOpenCacheEntry will also call this method. As a workaround, we just
     // ensure we only execute this code once.
     NS_ENSURE_TRUE(mRunCount == 0, NS_ERROR_UNEXPECTED);
     ++mRunCount;
 
@@ -5857,17 +5857,17 @@ nsHttpChannel::DoInvalidateCacheEntry(co
     // one point by using only READ_ONLY access-policy. I think this is safe.
 
     // First, find session holding the cache-entry - use current storage-policy
     nsCacheStoragePolicy storagePolicy = DetermineStoragePolicy();
     const char * clientID =
         GetCacheSessionNameForStoragePolicy(storagePolicy, mPrivateBrowsing);
 
     LOG(("DoInvalidateCacheEntry [channel=%p session=%s policy=%d key=%s]",
-         this, clientID, PRIntn(storagePolicy), key.get()));
+         this, clientID, int(storagePolicy), key.get()));
 
     nsresult rv;
     nsCOMPtr<nsICacheService> serv =
         do_GetService(NS_CACHESERVICE_CONTRACTID, &rv);
     nsCOMPtr<nsICacheSession> session;
     if (NS_SUCCEEDED(rv)) {
         rv = serv->CreateSession(clientID, storagePolicy,  
                                  nsICache::STREAM_BASED,
@@ -5876,17 +5876,17 @@ nsHttpChannel::DoInvalidateCacheEntry(co
     if (NS_SUCCEEDED(rv)) {
         rv = session->SetIsPrivate(mPrivateBrowsing);
     }
     if (NS_SUCCEEDED(rv)) {
         rv = session->DoomEntry(key, nullptr);
     }
 
     LOG(("DoInvalidateCacheEntry [channel=%p session=%s policy=%d key=%s rv=%d]",
-         this, clientID, PRIntn(storagePolicy), key.get(), PRIntn(rv)));
+         this, clientID, int(storagePolicy), key.get(), int(rv)));
 }
 
 nsCacheStoragePolicy
 nsHttpChannel::DetermineStoragePolicy()
 {
     nsCacheStoragePolicy policy = nsICache::STORE_ANYWHERE;
     if (mPrivateBrowsing)
         policy = nsICache::STORE_IN_MEMORY;
--- a/netwerk/socket/nsSOCKSIOLayer.cpp
+++ b/netwerk/socket/nsSOCKSIOLayer.cpp
@@ -1175,17 +1175,17 @@ nsSOCKSIOLayerGetPeerName(PRFileDesc *fd
         if (info->GetDestinationAddr(&addr) == NS_OK)
             return PR_SUCCESS;
     }
 
     return PR_FAILURE;
 }
 
 static PRStatus
-nsSOCKSIOLayerListen(PRFileDesc *fd, PRIntn backlog)
+nsSOCKSIOLayerListen(PRFileDesc *fd, int backlog)
 {
     // TODO: implement SOCKS support for listen
     return fd->lower->methods->listen(fd->lower, backlog);
 }
 
 // add SOCKS IO layer to an existing socket
 nsresult
 nsSOCKSIOLayerAddToSocket(PRInt32 family,
--- a/netwerk/test/TestSocketIO.cpp
+++ b/netwerk/test/TestSocketIO.cpp
@@ -232,17 +232,17 @@ main(int argc, char* argv[])
 
 #if defined(PR_LOGGING)
     gTestSocketIOLog = PR_NewLogModule("TestSocketIO");
 #endif
 
     if (argc < 3)
         usage(argv);
 
-    PRIntn i=0;
+    int i=0;
     bool sync = false;
     if (nsCRT::strcasecmp(argv[1], "-sync") == 0) {
         if (argc < 4)
             usage(argv);
         sync = true;
         i = 1;
     }
 
--- a/parser/htmlparser/src/nsHTMLTags.cpp
+++ b/parser/htmlparser/src/nsHTMLTags.cpp
@@ -294,17 +294,17 @@ PLHashTable* nsHTMLTags::gTagAtomTable;
 
 // PRUnichar* -> id hash
 static PLHashNumber
 HTMLTagsHashCodeUCPtr(const void *key)
 {
   return HashString(static_cast<const PRUnichar*>(key));
 }
 
-static PRIntn
+static int
 HTMLTagsKeyCompareUCPtr(const void *key1, const void *key2)
 {
   const PRUnichar *str1 = (const PRUnichar *)key1;
   const PRUnichar *str2 = (const PRUnichar *)key2;
 
   return nsCRT::strcmp(str1, str2) == 0;
 }
 
--- a/security/manager/ssl/src/nsNSSCertHelper.cpp
+++ b/security/manager/ssl/src/nsNSSCertHelper.cpp
@@ -896,17 +896,17 @@ ProcessRDN(CERTRDN* rdn, nsAString &fina
     //This function returns a string in UTF8 format.
     decodeItem = CERT_DecodeAVAValue(&ava->value);
     if(!decodeItem) {
       return NS_ERROR_FAILURE;
     }
 
     // We know we can fit buffer of this length. CERT_RFC1485_EscapeAndQuote
     // will fail if we provide smaller buffer then the result can fit to.
-    PRIntn escapedValueCapacity = decodeItem->len * 3 + 3;
+    int escapedValueCapacity = decodeItem->len * 3 + 3;
     nsAutoArrayPtr<char> escapedValue;
     escapedValue = new char[escapedValueCapacity];
     if (!escapedValue) {
       SECITEM_FreeItem(decodeItem, true);
       return NS_ERROR_OUT_OF_MEMORY;
     }
 
     SECStatus status = CERT_RFC1485_EscapeAndQuote(
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -118,17 +118,17 @@ static PLHashNumber PR_CALLBACK certHash
   
   for (i = 0; i < certKey->len; ++i, ++c) {
     hash += *c;
   }
   
   return hash;
 }
 
-static PRIntn PR_CALLBACK certHashtable_keyCompare(const void *k1, const void *k2)
+static int PR_CALLBACK certHashtable_keyCompare(const void *k1, const void *k2)
 {
   // return type is a bool, answering the question "are the keys equal?"
 
   if (!k1 || !k2)
     return false;
   
   SECItem *certKey1 = (SECItem*)k1;
   SECItem *certKey2 = (SECItem*)k2;
@@ -145,30 +145,30 @@ static PRIntn PR_CALLBACK certHashtable_
     if (*c1 != *c2) {
       return false;
     }
   }
   
   return true;
 }
 
-static PRIntn PR_CALLBACK certHashtable_valueCompare(const void *v1, const void *v2)
+static int PR_CALLBACK certHashtable_valueCompare(const void *v1, const void *v2)
 {
   // two values are identical if their keys are identical
   
   if (!v1 || !v2)
     return false;
   
   CERTCertificate *cert1 = (CERTCertificate*)v1;
   CERTCertificate *cert2 = (CERTCertificate*)v2;
   
   return certHashtable_keyCompare(&cert1->certKey, &cert2->certKey);
 }
 
-static PRIntn PR_CALLBACK certHashtable_clearEntry(PLHashEntry *he, PRIntn /*index*/, void * /*userdata*/)
+static int PR_CALLBACK certHashtable_clearEntry(PLHashEntry *he, int /*index*/, void * /*userdata*/)
 {
   if (he && he->value) {
     CERT_DestroyCertificate((CERTCertificate*)he->value);
   }
   
   return HT_ENUMERATE_NEXT;
 }
 
--- a/security/manager/ssl/src/nsNSSIOLayer.cpp
+++ b/security/manager/ssl/src/nsNSSIOLayer.cpp
@@ -693,22 +693,22 @@ PRStatus nsNSSSocketInfo::CloseSocketAnd
 }
 
 #if defined(DEBUG_SSL_VERBOSE) && defined(DUMP_BUFFER)
 /* Dumps a (potentially binary) buffer using SSM_DEBUG. 
    (We could have used the version in ssltrace.c, but that's
    specifically tailored to SSLTRACE. Sigh. */
 #define DUMPBUF_LINESIZE 24
 static void
-nsDumpBuffer(unsigned char *buf, PRIntn len)
+nsDumpBuffer(unsigned char *buf, int len)
 {
   char hexbuf[DUMPBUF_LINESIZE*3+1];
   char chrbuf[DUMPBUF_LINESIZE+1];
   static const char *hex = "0123456789abcdef";
-  PRIntn i = 0, l = 0;
+  int i = 0, l = 0;
   char ch, *c, *h;
   if (len == 0)
     return;
   hexbuf[DUMPBUF_LINESIZE*3] = '\0';
   chrbuf[DUMPBUF_LINESIZE] = '\0';
   (void) memset(hexbuf, 0x20, DUMPBUF_LINESIZE*3);
   (void) memset(chrbuf, 0x20, DUMPBUF_LINESIZE);
   h = hexbuf;
@@ -992,17 +992,17 @@ PRDescIdentity nsSSLIOLayerHelpers::nsSS
 PRIOMethods nsSSLIOLayerHelpers::nsSSLIOLayerMethods;
 Mutex *nsSSLIOLayerHelpers::mutex = nullptr;
 nsTHashtable<nsCStringHashKey> *nsSSLIOLayerHelpers::mTLSIntolerantSites = nullptr;
 nsTHashtable<nsCStringHashKey> *nsSSLIOLayerHelpers::mTLSTolerantSites = nullptr;
 nsTHashtable<nsCStringHashKey> *nsSSLIOLayerHelpers::mRenegoUnrestrictedSites = nullptr;
 bool nsSSLIOLayerHelpers::mTreatUnsafeNegotiationAsBroken = false;
 PRInt32 nsSSLIOLayerHelpers::mWarnLevelMissingRFC5746 = 1;
 
-static PRIntn _PSM_InvalidInt(void)
+static int _PSM_InvalidInt(void)
 {
     PR_ASSERT(!"I/O method is invalid");
     PR_SetError(PR_INVALID_METHOD_ERROR, 0);
     return -1;
 }
 
 static PRInt64 _PSM_InvalidInt64(void)
 {
@@ -1059,17 +1059,17 @@ static PRStatus PR_CALLBACK PSMSetsocket
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker))
     return PR_FAILURE;
 
   return fd->lower->methods->setsocketoption(fd, data);
 }
 
 static PRInt32 PR_CALLBACK PSMRecv(PRFileDesc *fd, void *buf, PRInt32 amount,
-    PRIntn flags, PRIntervalTime timeout)
+    int flags, PRIntervalTime timeout)
 {
   nsNSSShutDownPreventionLock locker;
   nsNSSSocketInfo *socketInfo = getSocketInfoIfRunning(fd, reading, locker);
   if (!socketInfo)
     return -1;
 
   if (flags != PR_MSG_PEEK && flags != 0) {
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
@@ -1084,17 +1084,17 @@ static PRInt32 PR_CALLBACK PSMRecv(PRFil
 #ifdef DEBUG_SSL_VERBOSE
   DEBUG_DUMP_BUFFER((unsigned char*)buf, bytesRead);
 #endif
 
   return checkHandshake(bytesRead, true, fd, socketInfo);
 }
 
 static PRInt32 PR_CALLBACK PSMSend(PRFileDesc *fd, const void *buf, PRInt32 amount,
-    PRIntn flags, PRIntervalTime timeout)
+    int flags, PRIntervalTime timeout)
 {
   nsNSSShutDownPreventionLock locker;
   nsNSSSocketInfo *socketInfo = getSocketInfoIfRunning(fd, writing, locker);
   if (!socketInfo)
     return -1;
 
   if (flags != 0) {
     PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
@@ -1131,17 +1131,17 @@ static PRStatus PR_CALLBACK PSMConnectco
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker)) {
     return PR_FAILURE;
   }
 
   return fd->lower->methods->connectcontinue(fd, out_flags);
 }
 
-static PRIntn PSMAvailable(void)
+static int PSMAvailable(void)
 {
   // This is called through PR_Available(), but is not implemented in PSM
   PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
   return -1;
 }
 
 static PRInt64 PSMAvailable64(void)
 {
@@ -1431,17 +1431,17 @@ loser:
  * CERTCertificateScopeEntry: struct for scope entry that can be consumed by
  *                            the code
  * certCertificateScopeOfUse: struct that represents the decoded extension data
  */
 typedef struct {
     SECItem derConstraint;
     SECItem derPort;
     CERTGeneralName* constraint; /* decoded constraint */
-    PRIntn port; /* decoded port number */
+    int port; /* decoded port number */
 } CERTCertificateScopeEntry;
 
 typedef struct {
     CERTCertificateScopeEntry** entries;
 } certCertificateScopeOfUse;
 
 /* corresponding ASN1 templates */
 static const SEC_ASN1Template cert_CertificateScopeEntryTemplate[] = {
@@ -1557,17 +1557,17 @@ static char* _str_to_lower(char* string)
 
 /*
  * Sees if the client certificate has a restriction in presenting the cert
  * to the host: returns true if there is no restriction or if the hostname
  * (and the port) satisfies the restriction, or false if the hostname (and
  * the port) does not satisfy the restriction
  */
 static bool CERT_MatchesScopeOfUse(CERTCertificate* cert, char* hostname,
-                                     char* hostIP, PRIntn port)
+                                     char* hostIP, int port)
 {
     bool rv = true; /* whether the cert can be presented */
     SECStatus srv;
     SECItem extData;
     PRArenaPool* arena = NULL;
     CERTCertificateScopeEntry** entries = NULL;
     /* arrays of decoded scope entries */
     int numEntries = 0;
@@ -1883,17 +1883,17 @@ void ClientAuthDataRunnable::RunOnTarget
   PRArenaPool* arena = NULL;
   char** caNameStrings;
   CERTCertificate* cert = NULL;
   SECKEYPrivateKey* privKey = NULL;
   CERTCertList* certList = NULL;
   CERTCertListNode* node;
   CERTCertNicknames* nicknames = NULL;
   char* extracted = NULL;
-  PRIntn keyError = 0; /* used for private key retrieval error */
+  int keyError = 0; /* used for private key retrieval error */
   SSM_UserCertChoice certChoice;
   PRInt32 NumberOfCerts = 0;
   void * wincx = mSocketInfo;
 
   /* create caNameStrings */
   arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
   if (arena == NULL) {
     goto loser;
--- a/security/manager/ssl/src/nsPKCS12Blob.cpp
+++ b/security/manager/ssl/src/nsPKCS12Blob.cpp
@@ -580,17 +580,17 @@ nsPKCS12Blob::inputToDecoder(SEC_PKCS12D
   }
   return NS_OK;
 }
 
 #ifdef XP_MAC
 
 OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath)
 {
-  PRIntn len;
+  int len;
   char *cursor;
   
   len = PL_strlen(macPath);
   cursor = (char*)PR_Malloc(len+2);
   if (!cursor)
     return memFullErr;
     
   memcpy(cursor+1, macPath, len+1);
--- a/testing/mochitest/ssltunnel/ssltunnel.cpp
+++ b/testing/mochitest/ssltunnel/ssltunnel.cpp
@@ -260,29 +260,29 @@ PRNetAddr websocket_server;
 PRThreadPool* threads = NULL;
 PRLock* shutdown_lock = NULL;
 PRCondVar* shutdown_condvar = NULL;
 // Not really used, unless something fails to start
 bool shutdown_server = false;
 bool do_http_proxy = false;
 bool any_host_spec_config = false;
 
-PR_CALLBACK PRIntn ClientAuthValueComparator(const void *v1, const void *v2)
+PR_CALLBACK int ClientAuthValueComparator(const void *v1, const void *v2)
 {
   int a = *static_cast<const client_auth_option*>(v1) -
           *static_cast<const client_auth_option*>(v2);
   if (a == 0)
     return 0;
   if (a > 0)
     return 1;
   else // (a < 0)
     return -1;
 }
 
-static PRIntn match_hostname(PLHashEntry *he, PRIntn index, void* arg)
+static int match_hostname(PLHashEntry *he, int index, void* arg)
 {
   server_match_t *match = (server_match_t*)arg;
   if (match->fullHost.find((char*)he->key) != string::npos)
     match->matched = true;
   return HT_ENUMERATE_NEXT;
 }
 
 /*
@@ -1263,31 +1263,31 @@ int parseConfigFile(const char* filePath
   if (any_host_spec_config && !do_http_proxy)
   {
     LOG_ERROR(("Warning: any host-specific configurations are ignored, add httpproxy:1 to allow them\n"));
   }
 
   return 0;
 }
 
-PRIntn freeHostCertHashItems(PLHashEntry *he, PRIntn i, void *arg)
+int freeHostCertHashItems(PLHashEntry *he, int i, void *arg)
 {
   delete [] (char*)he->key;
   delete [] (char*)he->value;
   return HT_ENUMERATE_REMOVE;
 }
 
-PRIntn freeHostRedirHashItems(PLHashEntry *he, PRIntn i, void *arg)
+int freeHostRedirHashItems(PLHashEntry *he, int i, void *arg)
 {
   delete [] (char*)he->key;
   delete [] (char*)he->value;
   return HT_ENUMERATE_REMOVE;
 }
 
-PRIntn freeClientAuthHashItems(PLHashEntry *he, PRIntn i, void *arg)
+int freeClientAuthHashItems(PLHashEntry *he, int i, void *arg)
 {
   delete [] (char*)he->key;
   delete (client_auth_option*)he->value;
   return HT_ENUMERATE_REMOVE;
 }
 
 int main(int argc, char** argv)
 {
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -1954,17 +1954,17 @@ EnumerateAnnotations(const nsACString& k
 static bool
 WriteExtraData(nsIFile* extraFile,
                const AnnotationTable& data,
                const Blacklist& blacklist,
                bool writeCrashTime=false,
                bool truncate=false)
 {
   PRFileDesc* fd;
-  PRIntn truncOrAppend = truncate ? PR_TRUNCATE : PR_APPEND;
+  int truncOrAppend = truncate ? PR_TRUNCATE : PR_APPEND;
   nsresult rv = 
     extraFile->OpenNSPRFileDesc(PR_WRONLY | PR_CREATE_FILE | truncOrAppend,
                                 0600, &fd);
   if (NS_FAILED(rv))
     return false;
 
   EnumerateAnnotationsContext ctx = { blacklist, fd };
   data.EnumerateRead(EnumerateAnnotations, &ctx);
--- a/tools/trace-malloc/bloatblame.cpp
+++ b/tools/trace-malloc/bloatblame.cpp
@@ -185,17 +185,17 @@ bad:
                     continue;                                                 \
                 }                                                             \
                 nextp = &next->next;                                          \
             }                                                                 \
             currp = &curr->next;                                              \
         }                                                                     \
     PR_END_MACRO
 
-static PRIntn tabulate_node(PLHashEntry *he, PRIntn i, void *arg)
+static int tabulate_node(PLHashEntry *he, int i, void *arg)
 {
     tmgraphnode *node = (tmgraphnode*) he;
     tmgraphnode **table = (tmgraphnode**) arg;
 
     table[i] = node;
     BUBBLE_SORT_LINKED_LIST(&node->down, tmgraphnode,
         (curr->allocs.bytes.total < next->allocs.bytes.total));
     return HT_ENUMERATE_NEXT;
--- a/xpcom/base/VisualEventTracer.cpp
+++ b/xpcom/base/VisualEventTracer.cpp
@@ -160,17 +160,17 @@ EventFilter::Build(const char * filterVa
 {
   if (!filterVar || !*filterVar)
     return nullptr;
 
   // Reads a comma serpatated list of events.
 
   // Copied from nspr logging code (read of NSPR_LOG_MODULES)
   char eventName[64];
-  PRIntn evlen = strlen(filterVar), pos = 0, count, delta = 0;
+  int evlen = strlen(filterVar), pos = 0, count, delta = 0;
 
   // Read up to a comma or EOF -> get name of an event first in the list
   count = sscanf(filterVar, "%63[^,]%n", eventName, &delta);
   if (count == 0) 
     return nullptr;
 
   pos = delta;
 
@@ -252,17 +252,17 @@ void FlushingThread(void * aArg)
     while (batch) {
       if (!firstBatch) {
         const char threadDelimiter[] = ",\n";
         rv = PR_Write(logFile, threadDelimiter, sizeof(threadDelimiter) - 1);
         ioError |= (rv < 0);
       }
       firstBatch = false;
 
-      static const PRIntn kBufferSize = 2048;
+      static const int kBufferSize = 2048;
       char buf[kBufferSize];
 
       PR_snprintf(buf, kBufferSize, "{\"thread\":\"%s\",\"log\":[\n", 
                   batch->mThreadNameCopy);
 
       rv = PR_Write(logFile, buf, strlen(buf));
       ioError |= (rv < 0);
 
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -250,17 +250,17 @@ static nsAssertBehavior GetAssertBehavio
 struct FixedBuffer
 {
   FixedBuffer() : curlen(0) { buffer[0] = '\0'; }
 
   char buffer[1000];
   PRUint32 curlen;
 };
 
-static PRIntn
+static int
 StuffFixedBuffer(void *closure, const char *buf, PRUint32 len)
 {
   if (!len)
     return 0;
   
   FixedBuffer *fb = (FixedBuffer*) closure;
 
   // strip the trailing null, we add it again later
--- a/xpcom/base/nsTraceRefcntImpl.cpp
+++ b/xpcom/base/nsTraceRefcntImpl.cpp
@@ -276,26 +276,26 @@ public:
   }
 
   void AccountObjs() {
     PRUint64 cnt = (mNewStats.mCreates - mNewStats.mDestroys);
     mNewStats.mObjsOutstandingTotal += cnt;
     mNewStats.mObjsOutstandingSquared += cnt * cnt;
   }
 
-  static PRIntn DumpEntry(PLHashEntry *he, PRIntn i, void *arg) {
+  static int DumpEntry(PLHashEntry *he, int i, void *arg) {
     BloatEntry* entry = (BloatEntry*)he->value;
     if (entry) {
       entry->Accumulate();
       static_cast<nsTArray<BloatEntry*>*>(arg)->AppendElement(entry);
     }
     return HT_ENUMERATE_NEXT;
   }
 
-  static PRIntn TotalEntries(PLHashEntry *he, PRIntn i, void *arg) {
+  static int TotalEntries(PLHashEntry *he, int i, void *arg) {
     BloatEntry* entry = (BloatEntry*)he->value;
     if (entry && nsCRT::strcmp(entry->mClassName, "TOTAL") != 0) {
       entry->Total((BloatEntry*)arg);
     }
     return HT_ENUMERATE_NEXT;
   }
 
   void Total(BloatEntry* total) {
@@ -337,17 +337,17 @@ public:
         "     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|\n" \
         "                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev\n");
 
     this->DumpTotal(out);
 
     return true;
   }
 
-  void Dump(PRIntn i, FILE* out, nsTraceRefcntImpl::StatisticsType type) {
+  void Dump(int i, FILE* out, nsTraceRefcntImpl::StatisticsType type) {
     nsTraceRefcntStats* stats = (type == nsTraceRefcntImpl::NEW_STATS) ? &mNewStats : &mAllStats;
     if (gLogLeaksOnly && !HaveLeaks(stats)) {
       return;
     }
 
     double meanRefs, stddevRefs;
     NS_MeanAndStdDev(stats->mAddRefs + stats->mReleases,
                      stats->mRefsOutstandingTotal,
@@ -439,17 +439,17 @@ GetBloatEntry(const char* aTypeName, PRU
       NS_ASSERTION(aInstanceSize == 0 ||
                    entry->GetClassSize() == aInstanceSize,
                    "bad size recorded");
     }
   }
   return entry;
 }
 
-static PRIntn DumpSerialNumbers(PLHashEntry* aHashEntry, PRIntn aIndex, void* aClosure)
+static int DumpSerialNumbers(PLHashEntry* aHashEntry, int aIndex, void* aClosure)
 {
   serialNumberRecord* record = reinterpret_cast<serialNumberRecord *>(aHashEntry->value);
 #ifdef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
   fprintf((FILE*) aClosure, "%d @%p (%d references; %d from COMPtrs)\n",
                             record->serialNumber,
                             NS_INT32_TO_PTR(aHashEntry->key),
                             record->refCount,
                             record->COMPtrCount);
--- a/xpcom/ds/nsCRT.h
+++ b/xpcom/ds/nsCRT.h
@@ -175,18 +175,21 @@ public:
   static bool IsAsciiAlpha(PRUnichar aChar) { return NS_IsAsciiAlpha(aChar); }
   static bool IsAsciiDigit(PRUnichar aChar) { return NS_IsAsciiDigit(aChar); }
   static bool IsAsciiSpace(PRUnichar aChar) { return NS_IsAsciiWhitespace(aChar); }
   static bool IsAscii(const char* aString) { return NS_IsAscii(aString); }
   static bool IsAscii(const char* aString, PRUint32 aLength) { return NS_IsAscii(aString, aLength); }
 };
 
 
-#define NS_IS_SPACE(VAL) \
-  (((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
+inline bool
+NS_IS_SPACE(PRUnichar c)
+{
+  return ((int(c) & 0x7f) == int(c)) && isspace(int(c));
+}
 
 #define NS_IS_CNTRL(i)   ((((unsigned int) (i)) > 0x7f) ? (int) 0 : iscntrl(i))
 #define NS_IS_DIGIT(i)   ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
 #if defined(XP_WIN) || defined(XP_OS2)
 #define NS_IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
 #else
 #define NS_IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? (int) 0 : isalpha((int)(VAL)))
 #endif
--- a/xpcom/glue/nsTextFormatter.cpp
+++ b/xpcom/glue/nsTextFormatter.cpp
@@ -703,17 +703,17 @@ static struct NumArgState* BuildArgArray
 	    break;
 
 	case 'p':
 	    /* XXX should use cpp */
 	    if (sizeof(void *) == sizeof(PRInt32)) {
 		nas[cn].type = TYPE_UINT32;
 	    } else if (sizeof(void *) == sizeof(PRInt64)) {
 	        nas[cn].type = TYPE_UINT64;
-	    } else if (sizeof(void *) == sizeof(PRIntn)) {
+	    } else if (sizeof(void *) == sizeof(int)) {
 	        nas[cn].type = TYPE_UINTN;
 	    } else {
 	        nas[cn].type = TYPE_UNKNOWN;
 	    }
 	    break;
 
 	case 'C':
 	    /* XXX not supported I suppose */
@@ -766,29 +766,29 @@ static struct NumArgState* BuildArgArray
 	}
 
 	VARARGS_ASSIGN(nas[cn].ap, ap);
 
 	switch (nas[cn].type) {
 	case TYPE_INT16:
 	case TYPE_UINT16:
 	case TYPE_INTN:
-	case TYPE_UINTN:     (void)va_arg(ap, PRIntn);      break;
+	case TYPE_UINTN:     (void)va_arg(ap, int);         break;
 
 	case TYPE_INT32:     (void)va_arg(ap, PRInt32);     break;
 
 	case TYPE_UINT32:    (void)va_arg(ap, PRUint32);    break;
 
 	case TYPE_INT64:     (void)va_arg(ap, PRInt64);     break;
 
 	case TYPE_UINT64:    (void)va_arg(ap, PRUint64);    break;
 
 	case TYPE_STRING:    (void)va_arg(ap, char*);       break;
 
-	case TYPE_INTSTR:    (void)va_arg(ap, PRIntn*);     break;
+	case TYPE_INTSTR:    (void)va_arg(ap, int*);        break;
 
 	case TYPE_DOUBLE:    (void)va_arg(ap, double);      break;
 
 	case TYPE_UNISTRING: (void)va_arg(ap, PRUnichar*);  break;
 
 	default:
 	    if( nas != nasArray ) {
 		PR_DELETE( nas );
--- a/xpcom/io/Base64.cpp
+++ b/xpcom/io/Base64.cpp
@@ -15,17 +15,17 @@ namespace {
 // BEGIN base64 encode code copied and modified from NSPR
 const unsigned char *base = (unsigned char *)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 template <typename T>
 static void
 Encode3to4(const unsigned char *src, T *dest)
 {
     PRUint32 b32 = (PRUint32)0;
-    PRIntn i, j = 18;
+    int i, j = 18;
 
     for( i = 0; i < 3; i++ )
     {
         b32 <<= 8;
         b32 |= (PRUint32)src[i];
     }
 
     for( i = 0; i < 4; i++ )
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -412,38 +412,38 @@ nsLocalFile::OpenANSIFileDesc(const char
     *_retval = fopen(mPath.get(), mode);
     if (! *_retval)
         return NS_ERROR_FAILURE;
 
     return NS_OK;
 }
 
 static int
-do_create(const char *path, PRIntn flags, mode_t mode, PRFileDesc **_retval)
+do_create(const char *path, int flags, mode_t mode, PRFileDesc **_retval)
 {
     *_retval = PR_Open(path, flags, mode);
     return *_retval ? 0 : -1;
 }
 
 static int
-do_mkdir(const char *path, PRIntn flags, mode_t mode, PRFileDesc **_retval)
+do_mkdir(const char *path, int flags, mode_t mode, PRFileDesc **_retval)
 {
     *_retval = nullptr;
     return mkdir(path, mode);
 }
 
 nsresult
-nsLocalFile::CreateAndKeepOpen(PRUint32 type, PRIntn flags,
+nsLocalFile::CreateAndKeepOpen(PRUint32 type, int flags,
                                PRUint32 permissions, PRFileDesc **_retval)
 {
     if (type != NORMAL_FILE_TYPE && type != DIRECTORY_TYPE)
         return NS_ERROR_FILE_UNKNOWN_TYPE;
 
     int result;
-    int (*createFunc)(const char *, PRIntn, mode_t, PRFileDesc **) =
+    int (*createFunc)(const char *, int, mode_t, PRFileDesc **) =
         (type == NORMAL_FILE_TYPE) ? do_create : do_mkdir;
 
     result = createFunc(mPath.get(), flags, permissions, _retval);
     if (result == -1 && errno == ENOENT) {
         /*
          * If we failed because of missing ancestor components, try to create
          * them and then retry the original creation.
          *
--- a/xpcom/io/nsLocalFileUnix.h
+++ b/xpcom/io/nsLocalFileUnix.h
@@ -118,13 +118,13 @@ protected:
     nsresult CopyDirectoryTo(nsIFile *newParent);
     nsresult CreateAllAncestors(PRUint32 permissions);
     nsresult GetNativeTargetPathName(nsIFile *newParent,
                                      const nsACString &newName,
                                      nsACString &_retval);
 
     bool FillStatCache();
 
-    nsresult CreateAndKeepOpen(PRUint32 type, PRIntn flags,
+    nsresult CreateAndKeepOpen(PRUint32 type, int flags,
                                PRUint32 permissions, PRFileDesc **_retval);
 };
 
 #endif /* _nsLocalFileUNIX_H_ */
--- a/xpcom/io/nsLocalFileWin.cpp
+++ b/xpcom/io/nsLocalFileWin.cpp
@@ -571,17 +571,17 @@ struct _MDFileDesc {
     PROsfd osfd;
 };
 
 struct PRFilePrivate {
     PRInt32 state;
     bool nonblocking;
     _PRTriStateBool inheritable;
     PRFileDesc *next;
-    PRIntn lockCount;   /*   0: not locked
+    int lockCount;      /*   0: not locked
                          *  -1: a native lockfile call is in progress
                          * > 0: # times the file is locked */
     bool    appendMode; 
     _MDFileDesc md;
 };
 
 //-----------------------------------------------------------------------------
 // Six static methods defined below (OpenFile,  FileTimeToPRTime, GetFileInfo,
@@ -589,17 +589,17 @@ struct PRFilePrivate {
 // UTF-16 APIs are implemented on all the supported platforms (or at least 
 // Windows 9x/ME) in NSPR. Currently, they're only implemented on 
 // Windows NT4 or later. (bug 330665)
 //-----------------------------------------------------------------------------
 
 // copied from nsprpub/pr/src/{io/prfile.c | md/windows/w95io.c} : 
 // PR_Open and _PR_MD_OPEN
 static nsresult
-OpenFile(const nsAFlatString &name, PRIntn osflags, PRIntn mode,
+OpenFile(const nsAFlatString &name, int osflags, int mode,
          PRFileDesc **fd)
 {
     // XXX : 'mode' is not translated !!!
     PRInt32 access = 0;
     PRInt32 flags = 0;
     PRInt32 flag6 = 0;
 
     if (osflags & PR_SYNC) flag6 = FILE_FLAG_WRITE_THROUGH;
--- a/xpcom/string/public/nsTSubstring.h
+++ b/xpcom/string/public/nsTSubstring.h
@@ -760,17 +760,17 @@ class nsTSubstring_CharT
          * this helper function stores the specified dataFlags in mFlags
          */
       void SetDataFlags(PRUint32 dataFlags)
         {
           NS_ASSERTION((dataFlags & 0xFFFF0000) == 0, "bad flags");
           mFlags = dataFlags | (mFlags & 0xFFFF0000);
         }
 
-      static PRIntn AppendFunc( void* arg, const char* s, PRUint32 len);
+      static int AppendFunc( void* arg, const char* s, PRUint32 len);
       void AppendPrintf( const char* format, va_list ap );
 
     public:
 
       // mFlags is a bitwise combination of the following flags.  the meaning
       // and interpretation of these flags is an implementation detail.
       // 
       // NOTE: these flags are declared public _only_ for convenience inside
--- a/xpcom/string/src/nsTSubstring.cpp
+++ b/xpcom/string/src/nsTSubstring.cpp
@@ -745,17 +745,17 @@ nsTSubstring_CharT::StripChars( const ch
           // Not stripped, copy this char.
           *to++ = theChar;
         }
       }
     *to = char_type(0); // add the null
     mLength = to - mData;
   }
 
-PRIntn
+int
 nsTSubstring_CharT::AppendFunc(void* arg, const char* s, PRUint32 len)
   {
     self_type* self = static_cast<self_type*>(arg);
 
     // NSPR sends us the final null terminator even though we don't want it
     if (len && s[len - 1] == '\0') {
       --len;
     }
@@ -788,17 +788,17 @@ void nsTSubstring_CharT::AppendPrintf( c
  * This is a copy of |PR_cnvtf| with a bug fixed.  (The second argument
  * of PR_dtoa is 2 rather than 1.)
  *
  * XXX(darin): if this is the right thing, then why wasn't it fixed in NSPR?!?
  */
 static void 
 Modified_cnvtf(char *buf, int bufsz, int prcsn, double fval)
 {
-  PRIntn decpt, sign, numdigits;
+  int decpt, sign, numdigits;
   char *num, *nump;
   char *bufp = buf;
   char *endnum;
 
   /* If anything fails, we store an empty string in 'buf' */
   num = (char*)malloc(bufsz);
   if (num == NULL) {
     buf[0] = '\0';
--- a/xpcom/tests/TestCRT.cpp
+++ b/xpcom/tests/TestCRT.cpp
@@ -7,67 +7,67 @@
 #include "nsString.h"
 #include "plstr.h"
 #include <stdlib.h>
 
 namespace TestCRT {
 
 // The return from strcmp etc is only defined to be postive, zero or
 // negative. The magnitude of a non-zero return is irrelevant.
-PRIntn sign(PRIntn val) {
+int sign(int val) {
     if (val == 0)
 	return 0;
     else {
 	if (val > 0)
 	    return 1;
 	else
 	    return -1;
     }
 }
 
 
 // Verify that nsCRT versions of string comparison routines get the
 // same answers as the native non-unicode versions. We only pass in
 // iso-latin-1 strings, so the comparison must be valid.
-static void Check(const char* s1, const char* s2, PRIntn n)
+static void Check(const char* s1, const char* s2, int n)
 {
 #ifdef DEBUG
-  PRIntn clib =
+  int clib =
 #endif
     PL_strcmp(s1, s2);
 
 #ifdef DEBUG
-  PRIntn clib_n =
+  int clib_n =
 #endif
     PL_strncmp(s1, s2, n);
 
   nsAutoString t1,t2; 
   t1.AssignWithConversion(s1);
   t2.AssignWithConversion(s2);
   const PRUnichar* us1 = t1.get();
   const PRUnichar* us2 = t2.get();
 
 #ifdef DEBUG
-  PRIntn u2 =
+  int u2 =
 #endif
     nsCRT::strcmp(us1, us2);
 
 #ifdef DEBUG
-  PRIntn u2_n =
+  int u2_n =
 #endif
     nsCRT::strncmp(us1, us2, n);
 
   NS_ASSERTION(sign(clib) == sign(u2), "strcmp");
   NS_ASSERTION(sign(clib_n) == sign(u2_n), "strncmp");
 }
 
 struct Test {
   const char* s1;
   const char* s2;
-  PRIntn n;
+  int n;
 };
 
 static Test tests[] = {
   { "foo", "foo", 3 },
   { "foo", "fo", 3 },
 
   { "foo", "bar", 3 },
   { "foo", "ba", 3 },