Bug 579517 follow-up: Remove NSPR types that crept in

--HG--
extra : rebase_source : 3fc28d51fcb5c63e417b0fe2b90fb6e1eb0cac63
This commit is contained in:
Ehsan Akhgari 2012-09-06 10:11:28 -04:00
parent da1a55564c
commit 65c5e19c37
13 changed files with 32 additions and 32 deletions

View File

@ -2852,8 +2852,8 @@ Accessible::IsActiveWidget() const
// If text entry of combobox widget has a focus then the combobox widget is // If text entry of combobox widget has a focus then the combobox widget is
// active. // active.
if (mRoleMapEntry && mRoleMapEntry->Is(nsGkAtoms::combobox)) { if (mRoleMapEntry && mRoleMapEntry->Is(nsGkAtoms::combobox)) {
PRUint32 childCount = ChildCount(); uint32_t childCount = ChildCount();
for (PRUint32 idx = 0; idx < childCount; idx++) { for (uint32_t idx = 0; idx < childCount; idx++) {
Accessible* child = mChildren.ElementAt(idx); Accessible* child = mChildren.ElementAt(idx);
if (child->Role() == roles::ENTRY) if (child->Role() == roles::ENTRY)
return FocusMgr()->HasDOMFocus(child->GetContent()); return FocusMgr()->HasDOMFocus(child->GetContent());

View File

@ -934,7 +934,7 @@ nsSVGSVGElement::GetViewBoxTransform() const
} }
void void
nsSVGSVGElement::ChildrenOnlyTransformChanged(PRUint32 aFlags) nsSVGSVGElement::ChildrenOnlyTransformChanged(uint32_t aFlags)
{ {
// Avoid wasteful calls: // Avoid wasteful calls:
NS_ABORT_IF_FALSE(!(GetPrimaryFrame()->GetStateBits() & NS_ABORT_IF_FALSE(!(GetPrimaryFrame()->GetStateBits() &

View File

@ -224,7 +224,7 @@ public:
* GetAttributeChangeHint is because we need to act on non-attribute (e.g. * GetAttributeChangeHint is because we need to act on non-attribute (e.g.
* currentScale) changes in addition to attribute (e.g. viewBox) changes. * currentScale) changes in addition to attribute (e.g. viewBox) changes.
*/ */
void ChildrenOnlyTransformChanged(PRUint32 aFlags = 0); void ChildrenOnlyTransformChanged(uint32_t aFlags = 0);
// This services any pending notifications for the transform on on this root // This services any pending notifications for the transform on on this root
// <svg> node needing to be recalculated. (Only applicable in // <svg> node needing to be recalculated. (Only applicable in

View File

@ -197,7 +197,7 @@ public:
const nsAString& aDeviceAddress, const nsAString& aDeviceAddress,
nsAString& aDevicePath) = 0; nsAString& aDevicePath) = 0;
virtual nsTArray<PRUint32> virtual nsTArray<uint32_t>
AddReservedServicesInternal(const nsAString& aAdapterPath, AddReservedServicesInternal(const nsAString& aAdapterPath,
const nsTArray<uint32_t>& aServices) = 0; const nsTArray<uint32_t>& aServices) = 0;

View File

@ -92,7 +92,7 @@ class DOMMimeTypeImpl : public nsIDOMMimeType {
public: public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
DOMMimeTypeImpl(nsPluginTag* aTag, PRUint32 aMimeTypeIndex) DOMMimeTypeImpl(nsPluginTag* aTag, uint32_t aMimeTypeIndex)
{ {
if (!aTag) if (!aTag)
return; return;

View File

@ -88,7 +88,7 @@ public:
AllSizes chrome; AllSizes chrome;
AllSizes content; AllSizes content;
for (PRUint32 i = 0; i < mKnownLoaders.Length(); i++) { for (uint32_t i = 0; i < mKnownLoaders.Length(); i++) {
mKnownLoaders[i]->mChromeCache.EnumerateRead(EntryAllSizes, &chrome); mKnownLoaders[i]->mChromeCache.EnumerateRead(EntryAllSizes, &chrome);
mKnownLoaders[i]->mCache.EnumerateRead(EntryAllSizes, &content); mKnownLoaders[i]->mCache.EnumerateRead(EntryAllSizes, &content);
} }
@ -158,7 +158,7 @@ public:
NS_IMETHOD GetExplicitNonHeap(int64_t *n) NS_IMETHOD GetExplicitNonHeap(int64_t *n)
{ {
size_t n2 = 0; size_t n2 = 0;
for (PRUint32 i = 0; i < mKnownLoaders.Length(); i++) { for (uint32_t i = 0; i < mKnownLoaders.Length(); i++) {
mKnownLoaders[i]->mChromeCache.EnumerateRead(EntryExplicitNonHeapSize, &n2); mKnownLoaders[i]->mChromeCache.EnumerateRead(EntryExplicitNonHeapSize, &n2);
mKnownLoaders[i]->mCache.EnumerateRead(EntryExplicitNonHeapSize, &n2); mKnownLoaders[i]->mCache.EnumerateRead(EntryExplicitNonHeapSize, &n2);
} }
@ -169,7 +169,7 @@ public:
static int64_t GetImagesContentUsedUncompressed() static int64_t GetImagesContentUsedUncompressed()
{ {
size_t n = 0; size_t n = 0;
for (PRUint32 i = 0; i < imgLoader::sMemReporter->mKnownLoaders.Length(); i++) { for (uint32_t i = 0; i < imgLoader::sMemReporter->mKnownLoaders.Length(); i++) {
imgLoader::sMemReporter->mKnownLoaders[i]->mCache.EnumerateRead(EntryUsedUncompressedSize, &n); imgLoader::sMemReporter->mKnownLoaders[i]->mCache.EnumerateRead(EntryUsedUncompressedSize, &n);
} }
return n; return n;

View File

@ -322,7 +322,7 @@ private: // methods
imgCacheTable &GetCache(nsIURI *aURI); imgCacheTable &GetCache(nsIURI *aURI);
imgCacheQueue &GetCacheQueue(nsIURI *aURI); imgCacheQueue &GetCacheQueue(nsIURI *aURI);
void CacheEntriesChanged(nsIURI *aURI, PRInt32 sizediff = 0); void CacheEntriesChanged(nsIURI *aURI, int32_t sizediff = 0);
void CheckCacheLimits(imgCacheTable &cache, imgCacheQueue &queue); void CheckCacheLimits(imgCacheTable &cache, imgCacheQueue &queue);
private: // data private: // data

View File

@ -634,7 +634,7 @@ nsSimplePageSequenceFrame::PrePrintNextPage(nsITimerCallback* aCallback, bool* a
renderingContext->ThebesContext()->CurrentSurface(); renderingContext->ThebesContext()->CurrentSurface();
NS_ENSURE_TRUE(renderingSurface, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(renderingSurface, NS_ERROR_OUT_OF_MEMORY);
for (PRInt32 i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) { for (int32_t i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) {
nsHTMLCanvasElement* canvas = mCurrentCanvasList[i]; nsHTMLCanvasElement* canvas = mCurrentCanvasList[i];
nsIntSize size = canvas->GetSize(); nsIntSize size = canvas->GetSize();
@ -660,8 +660,8 @@ nsSimplePageSequenceFrame::PrePrintNextPage(nsITimerCallback* aCallback, bool* a
} }
} }
} }
PRInt32 doneCounter = 0; int32_t doneCounter = 0;
for (PRInt32 i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) { for (int32_t i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) {
nsHTMLCanvasElement* canvas = mCurrentCanvasList[i]; nsHTMLCanvasElement* canvas = mCurrentCanvasList[i];
if (canvas->IsPrintCallbackDone()) { if (canvas->IsPrintCallbackDone()) {
@ -678,7 +678,7 @@ void
nsSimplePageSequenceFrame::InvalidateInternal(const nsRect& aDamageRect, nsSimplePageSequenceFrame::InvalidateInternal(const nsRect& aDamageRect,
nscoord aX, nscoord aY, nscoord aX, nscoord aY,
nsIFrame* aForChild, nsIFrame* aForChild,
PRUint32 aFlags) uint32_t aFlags)
{ {
// xxx Invalidate the entire frame as otherwise invalidate of printCanvas // xxx Invalidate the entire frame as otherwise invalidate of printCanvas
// don't work properly. This is hopefully no longer necessary once 539356 // don't work properly. This is hopefully no longer necessary once 539356
@ -690,7 +690,7 @@ nsSimplePageSequenceFrame::InvalidateInternal(const nsRect& aDamageRect,
NS_IMETHODIMP NS_IMETHODIMP
nsSimplePageSequenceFrame::ResetPrintCanvasList() nsSimplePageSequenceFrame::ResetPrintCanvasList()
{ {
for (PRInt32 i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) { for (int32_t i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) {
nsHTMLCanvasElement* canvas = mCurrentCanvasList[i]; nsHTMLCanvasElement* canvas = mCurrentCanvasList[i];
canvas->ResetPrintCallback(); canvas->ResetPrintCallback();
} }

View File

@ -100,7 +100,7 @@ public:
virtual void InvalidateInternal(const nsRect& aDamageRect, virtual void InvalidateInternal(const nsRect& aDamageRect,
nscoord aX, nscoord aY, nscoord aX, nscoord aY,
nsIFrame* aForChild, nsIFrame* aForChild,
PRUint32 aFlags); uint32_t aFlags);
#ifdef DEBUG #ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const; NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif #endif

View File

@ -2403,8 +2403,8 @@ DocHasPrintCallbackCanvas(nsIDocument* aDoc, void* aData)
nsRefPtr<nsContentList> canvases = NS_GetContentList(root, nsRefPtr<nsContentList> canvases = NS_GetContentList(root,
kNameSpaceID_XHTML, kNameSpaceID_XHTML,
NS_LITERAL_STRING("canvas")); NS_LITERAL_STRING("canvas"));
PRUint32 canvasCount = canvases->Length(true); uint32_t canvasCount = canvases->Length(true);
for (PRUint32 i = 0; i < canvasCount; ++i) { for (uint32_t i = 0; i < canvasCount; ++i) {
nsCOMPtr<nsIDOMHTMLCanvasElement> canvas = do_QueryInterface(canvases->Item(i, false)); nsCOMPtr<nsIDOMHTMLCanvasElement> canvas = do_QueryInterface(canvases->Item(i, false));
nsCOMPtr<nsIPrintCallback> printCallback; nsCOMPtr<nsIPrintCallback> printCallback;
if (canvas && NS_SUCCEEDED(canvas->GetMozPrintCallback(getter_AddRefs(printCallback))) && if (canvas && NS_SUCCEEDED(canvas->GetMozPrintCallback(getter_AddRefs(printCallback))) &&

View File

@ -726,7 +726,7 @@ nsSVGOuterSVGFrame::NotifyViewportOrTransformChanged(uint32_t aFlags)
if (haveNonFulLZoomTransformChange && if (haveNonFulLZoomTransformChange &&
!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) { !(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
PRUint32 flags = (mState & NS_FRAME_IN_REFLOW) ? uint32_t flags = (mState & NS_FRAME_IN_REFLOW) ?
nsSVGSVGElement::eDuringReflow : 0; nsSVGSVGElement::eDuringReflow : 0;
content->ChildrenOnlyTransformChanged(flags); content->ChildrenOnlyTransformChanged(flags);
} }

View File

@ -16,7 +16,7 @@
// The minimum number of bytes that are needed to attempt to sniff an mp4 file. // The minimum number of bytes that are needed to attempt to sniff an mp4 file.
static const unsigned MP4_MIN_BYTES_COUNT = 12; static const unsigned MP4_MIN_BYTES_COUNT = 12;
// The maximum number of bytes to consider when attempting to sniff a file. // The maximum number of bytes to consider when attempting to sniff a file.
static const PRUint32 MAX_BYTES_SNIFFED = 512; static const uint32_t MAX_BYTES_SNIFFED = 512;
NS_IMPL_ISUPPORTS1(nsMediaSniffer, nsIContentSniffer) NS_IMPL_ISUPPORTS1(nsMediaSniffer, nsIContentSniffer)
@ -35,13 +35,13 @@ nsMediaSniffer::nsMediaSnifferEntry nsMediaSniffer::sSnifferEntries[] = {
// This function implements mp4 sniffing algorithm, described at // This function implements mp4 sniffing algorithm, described at
// http://mimesniff.spec.whatwg.org/#signature-for-mp4 // http://mimesniff.spec.whatwg.org/#signature-for-mp4
static bool MatchesMP4(const PRUint8* aData, const PRUint32 aLength) static bool MatchesMP4(const uint8_t* aData, const uint32_t aLength)
{ {
if (aLength <= MP4_MIN_BYTES_COUNT) { if (aLength <= MP4_MIN_BYTES_COUNT) {
return false; return false;
} }
// Conversion from big endian to host byte order. // Conversion from big endian to host byte order.
PRUint32 boxSize = (PRUint32)(aData[3] | aData[2] << 8 | aData[1] << 16 | aData[0] << 24); uint32_t boxSize = (uint32_t)(aData[3] | aData[2] << 8 | aData[1] << 16 | aData[0] << 24);
// Boxsize should be evenly divisible by 4. // Boxsize should be evenly divisible by 4.
if (boxSize % 4 || aLength < boxSize) { if (boxSize % 4 || aLength < boxSize) {
@ -54,7 +54,7 @@ static bool MatchesMP4(const PRUint8* aData, const PRUint32 aLength)
aData[7] != 0x70) { aData[7] != 0x70) {
return false; return false;
} }
for (PRUint32 i = 2; i <= boxSize / 4 - 1 ; i++) { for (uint32_t i = 2; i <= boxSize / 4 - 1 ; i++) {
if (i == 3) { if (i == 3) {
continue; continue;
} }
@ -70,19 +70,19 @@ static bool MatchesMP4(const PRUint8* aData, const PRUint32 aLength)
NS_IMETHODIMP NS_IMETHODIMP
nsMediaSniffer::GetMIMETypeFromContent(nsIRequest* aRequest, nsMediaSniffer::GetMIMETypeFromContent(nsIRequest* aRequest,
const PRUint8* aData, const uint8_t* aData,
const PRUint32 aLength, const uint32_t aLength,
nsACString& aSniffedType) nsACString& aSniffedType)
{ {
const PRUint32 clampedLength = NS_MIN(aLength, MAX_BYTES_SNIFFED); const uint32_t clampedLength = NS_MIN(aLength, MAX_BYTES_SNIFFED);
for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(sSnifferEntries); ++i) { for (uint32_t i = 0; i < NS_ARRAY_LENGTH(sSnifferEntries); ++i) {
const nsMediaSnifferEntry& currentEntry = sSnifferEntries[i]; const nsMediaSnifferEntry& currentEntry = sSnifferEntries[i];
if (clampedLength < currentEntry.mLength || currentEntry.mLength == 0) { if (clampedLength < currentEntry.mLength || currentEntry.mLength == 0) {
continue; continue;
} }
bool matched = true; bool matched = true;
for (PRUint32 j = 0; j < currentEntry.mLength; ++j) { for (uint32_t j = 0; j < currentEntry.mLength; ++j) {
if ((currentEntry.mMask[j] & aData[j]) != currentEntry.mPattern[j]) { if ((currentEntry.mMask[j] & aData[j]) != currentEntry.mPattern[j]) {
matched = false; matched = false;
break; break;

View File

@ -28,12 +28,12 @@ class nsMediaSniffer : public nsIContentSniffer
~nsMediaSniffer() {}; ~nsMediaSniffer() {};
#define PATTERN_ENTRY(mask, pattern, contentType) \ #define PATTERN_ENTRY(mask, pattern, contentType) \
{(const PRUint8*)mask, (const PRUint8*)pattern, sizeof(mask) - 1, contentType} {(const uint8_t*)mask, (const uint8_t*)pattern, sizeof(mask) - 1, contentType}
struct nsMediaSnifferEntry { struct nsMediaSnifferEntry {
const PRUint8* mMask; const uint8_t* mMask;
const PRUint8* mPattern; const uint8_t* mPattern;
const PRUint32 mLength; const uint32_t mLength;
const char* mContentType; const char* mContentType;
}; };