Bug 579517 follow-up: Remove NSPR types that crept in
☠☠ backed out by 1424662e3136 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 24 Sep 2012 17:55:10 -0400
changeset 108057 8bd13443d0bc3ab59bf8191e5460c4233daf0a54
parent 108056 beed670216f6a941e5225f45b549252416461afd
child 108058 32d1752fb7ba984f949e7cc9ab697a1d4b153047
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
bugs579517
milestone18.0a1
Bug 579517 follow-up: Remove NSPR types that crept in
content/base/src/nsMixedContentBlocker.cpp
layout/base/FrameLayerBuilder.cpp
layout/base/FrameLayerBuilder.h
layout/xul/base/src/nsImageBoxFrame.cpp
netwerk/protocol/about/nsAboutCacheEntry.cpp
netwerk/protocol/http/nsHttp.cpp
netwerk/protocol/http/nsHttp.h
--- a/content/base/src/nsMixedContentBlocker.cpp
+++ b/content/base/src/nsMixedContentBlocker.cpp
@@ -71,24 +71,24 @@ nsMixedContentBlocker::nsMixedContentBlo
 
 nsMixedContentBlocker::~nsMixedContentBlocker()
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsMixedContentBlocker, nsIContentPolicy)
 
 NS_IMETHODIMP
-nsMixedContentBlocker::ShouldLoad(PRUint32 aContentType,
+nsMixedContentBlocker::ShouldLoad(uint32_t aContentType,
                                   nsIURI* aContentLocation,
                                   nsIURI* aRequestingLocation,
                                   nsISupports* aRequestingContext,
                                   const nsACString& aMimeGuess,
                                   nsISupports* aExtra,
                                   nsIPrincipal* aRequestPrincipal,
-                                  PRInt16* aDecision)
+                                  int16_t* aDecision)
 {
   // Default policy: allow the load if we find no reason to block it.
   *aDecision = nsIContentPolicy::ACCEPT;
 
   // If mixed script blocking and mixed display blocking are turned off
   // we can return early
   if (!sBlockMixedScript && !sBlockMixedDisplay) {
     return NS_OK;
@@ -181,21 +181,21 @@ nsMixedContentBlocker::ShouldLoad(PRUint
       // other types of mixed content are allowed
       break;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsMixedContentBlocker::ShouldProcess(PRUint32 aContentType,
+nsMixedContentBlocker::ShouldProcess(uint32_t aContentType,
                                      nsIURI* aContentLocation,
                                      nsIURI* aRequestingLocation,
                                      nsISupports* aRequestingContext,
                                      const nsACString& aMimeGuess,
                                      nsISupports* aExtra,
                                      nsIPrincipal* aRequestPrincipal,
-                                     PRInt16* aDecision)
+                                     int16_t* aDecision)
 {
   return ShouldLoad(aContentType, aContentLocation, aRequestingLocation,
                     aRequestingContext, aMimeGuess, aExtra, aRequestPrincipal,
                     aDecision);
 }
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -720,27 +720,27 @@ FrameLayerBuilder::DidBeginRetainedLayer
   LayerManagerData* data = static_cast<LayerManagerData*>
     (aManager->GetUserData(&gLayerManagerUserData));
   if (data) {
     mInvalidateAllLayers = data->mInvalidateAllLayers;
   }
 }
 
 void
-FrameLayerBuilder::StoreOptimizedLayerForFrame(nsIFrame* aFrame, PRUint32 aDisplayItemKey, Layer* aImage)
+FrameLayerBuilder::StoreOptimizedLayerForFrame(nsIFrame* aFrame, uint32_t aDisplayItemKey, Layer* aImage)
 {
   DisplayItemDataEntry *entry = mNewDisplayItemData.GetEntry(aFrame);
   if (!entry)
     return;
 
   nsTArray<DisplayItemData> *array = &entry->mData;
   if (!array)
     return;
 
-  for (PRUint32 i = 0; i < array->Length(); ++i) {
+  for (uint32_t i = 0; i < array->Length(); ++i) {
     if (array->ElementAt(i).mDisplayItemKey == aDisplayItemKey) {
       array->ElementAt(i).mOptLayer = aImage;
       return;
     }
   }
 }
 
 /**
--- a/layout/base/FrameLayerBuilder.h
+++ b/layout/base/FrameLayerBuilder.h
@@ -383,17 +383,17 @@ public:
   static gfxSize GetThebesLayerScaleForFrame(nsIFrame* aFrame);
 
   /**
    * Stores a Layer as the dedicated layer in the DisplayItemData for a given frame/key pair.
    *
    * Used when we optimize a ThebesLayer into an ImageLayer and want to retroactively update the 
    * DisplayItemData so we can retrieve the layer from within layout.
    */
-  void StoreOptimizedLayerForFrame(nsIFrame* aFrame, PRUint32 aDisplayItemKey, Layer* aImage);
+  void StoreOptimizedLayerForFrame(nsIFrame* aFrame, uint32_t aDisplayItemKey, Layer* aImage);
 
   /**
    * Clip represents the intersection of an optional rectangle with a
    * list of rounded rectangles.
    */
   struct Clip {
     struct RoundedRect {
       nsRect mRect;
--- a/layout/xul/base/src/nsImageBoxFrame.cpp
+++ b/layout/xul/base/src/nsImageBoxFrame.cpp
@@ -338,38 +338,38 @@ nsImageBoxFrame::PaintImage(nsRenderingC
 }
 
 void nsDisplayXULImage::Paint(nsDisplayListBuilder* aBuilder,
                               nsRenderingContext* aCtx)
 {
   static_cast<nsImageBoxFrame*>(mFrame)->
     PaintImage(*aCtx, mVisibleRect, ToReferenceFrame(),
                aBuilder->ShouldSyncDecodeImages()
-                 ? (PRUint32) imgIContainer::FLAG_SYNC_DECODE
-                 : (PRUint32) imgIContainer::FLAG_NONE);
+                 ? (uint32_t) imgIContainer::FLAG_SYNC_DECODE
+                 : (uint32_t) imgIContainer::FLAG_NONE);
 }
 
 void
 nsDisplayXULImage::ConfigureLayer(ImageLayer* aLayer, const nsIntPoint& aOffset)
 {
   aLayer->SetFilter(nsLayoutUtils::GetGraphicsFilterForFrame(mFrame));
 
-  PRInt32 factor = mFrame->PresContext()->AppUnitsPerDevPixel();
+  int32_t factor = mFrame->PresContext()->AppUnitsPerDevPixel();
   nsImageBoxFrame* imageFrame = static_cast<nsImageBoxFrame*>(mFrame);
 
   nsRect dest;
   imageFrame->GetClientRect(dest);
   dest += ToReferenceFrame();
   gfxRect destRect(dest.x, dest.y, dest.width, dest.height);
   destRect.ScaleInverse(factor); 
 
   nsCOMPtr<imgIContainer> imgCon;
   imageFrame->mImageRequest->GetImage(getter_AddRefs(imgCon));
-  PRInt32 imageWidth;
-  PRInt32 imageHeight;
+  int32_t imageWidth;
+  int32_t imageHeight;
   imgCon->GetWidth(&imageWidth);
   imgCon->GetHeight(&imageHeight);
 
   NS_ASSERTION(imageWidth != 0 && imageHeight != 0, "Invalid image size!");
 
   gfxMatrix transform;
   transform.Translate(destRect.TopLeft() + aOffset);
   transform.Scale(destRect.Width()/imageWidth,
--- a/netwerk/protocol/about/nsAboutCacheEntry.cpp
+++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp
@@ -458,17 +458,17 @@ nsAboutCacheEntry::OnCacheEntryAvailable
     nsresult rv;
 
     if (entry)
         rv = WriteCacheEntryDescription(entry);
     else
         rv = WriteCacheEntryUnavailable();
     if (NS_FAILED(rv)) return rv;
 
-    PRUint32 n;
+    uint32_t n;
     NS_NAMED_LITERAL_CSTRING(buffer, "</body>\n</html>\n");
     mOutputStream->Write(buffer.get(), buffer.Length(), &n);
     mOutputStream->Close();
     mOutputStream = nullptr;
 
     return NS_OK;
 }
 
--- a/netwerk/protocol/http/nsHttp.cpp
+++ b/netwerk/protocol/http/nsHttp.cpp
@@ -283,13 +283,13 @@ nsHttp::ParseInt64(const char *input, co
     if (input == start) // nothing parsed?
         return false;
     if (next)
         *next = input;
     return true;
 }
 
 bool
-nsHttp::IsPermanentRedirect(PRUint32 httpStatus)
+nsHttp::IsPermanentRedirect(uint32_t httpStatus)
 {
   return httpStatus == 301 || httpStatus == 308;
 }
 
--- a/netwerk/protocol/http/nsHttp.h
+++ b/netwerk/protocol/http/nsHttp.h
@@ -176,17 +176,17 @@ struct nsHttp
     // Variant on ParseInt64 that expects the input string to contain nothing
     // more than the value being parsed.
     static inline bool ParseInt64(const char *input, int64_t *result) {
         const char *next;
         return ParseInt64(input, &next, result) && *next == '\0';
     }
 
     // Return whether the HTTP status code represents a permanent redirect
-    static bool IsPermanentRedirect(PRUint32 httpStatus);
+    static bool IsPermanentRedirect(uint32_t httpStatus);
 
     // Declare all atoms
     //
     // The atom names and values are stored in nsHttpAtomList.h and are brought
     // to you by the magic of C preprocessing.  Add new atoms to nsHttpAtomList
     // and all support logic will be auto-generated.
     //
 #define HTTP_ATOM(_name, _value) static nsHttpAtom _name;