mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 579517 follow-up: Remove NSPR types that crept in
--HG-- extra : rebase_source : 3fc28d51fcb5c63e417b0fe2b90fb6e1eb0cac63
This commit is contained in:
parent
59dde21fb2
commit
4a8bc9fd25
@ -2852,8 +2852,8 @@ Accessible::IsActiveWidget() const
|
||||
// If text entry of combobox widget has a focus then the combobox widget is
|
||||
// active.
|
||||
if (mRoleMapEntry && mRoleMapEntry->Is(nsGkAtoms::combobox)) {
|
||||
PRUint32 childCount = ChildCount();
|
||||
for (PRUint32 idx = 0; idx < childCount; idx++) {
|
||||
uint32_t childCount = ChildCount();
|
||||
for (uint32_t idx = 0; idx < childCount; idx++) {
|
||||
Accessible* child = mChildren.ElementAt(idx);
|
||||
if (child->Role() == roles::ENTRY)
|
||||
return FocusMgr()->HasDOMFocus(child->GetContent());
|
||||
|
@ -934,7 +934,7 @@ nsSVGSVGElement::GetViewBoxTransform() const
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGSVGElement::ChildrenOnlyTransformChanged(PRUint32 aFlags)
|
||||
nsSVGSVGElement::ChildrenOnlyTransformChanged(uint32_t aFlags)
|
||||
{
|
||||
// Avoid wasteful calls:
|
||||
NS_ABORT_IF_FALSE(!(GetPrimaryFrame()->GetStateBits() &
|
||||
|
@ -224,7 +224,7 @@ public:
|
||||
* GetAttributeChangeHint is because we need to act on non-attribute (e.g.
|
||||
* 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
|
||||
// <svg> node needing to be recalculated. (Only applicable in
|
||||
|
@ -197,7 +197,7 @@ public:
|
||||
const nsAString& aDeviceAddress,
|
||||
nsAString& aDevicePath) = 0;
|
||||
|
||||
virtual nsTArray<PRUint32>
|
||||
virtual nsTArray<uint32_t>
|
||||
AddReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
const nsTArray<uint32_t>& aServices) = 0;
|
||||
|
||||
|
@ -92,7 +92,7 @@ class DOMMimeTypeImpl : public nsIDOMMimeType {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
DOMMimeTypeImpl(nsPluginTag* aTag, PRUint32 aMimeTypeIndex)
|
||||
DOMMimeTypeImpl(nsPluginTag* aTag, uint32_t aMimeTypeIndex)
|
||||
{
|
||||
if (!aTag)
|
||||
return;
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
AllSizes chrome;
|
||||
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]->mCache.EnumerateRead(EntryAllSizes, &content);
|
||||
}
|
||||
@ -158,7 +158,7 @@ public:
|
||||
NS_IMETHOD GetExplicitNonHeap(int64_t *n)
|
||||
{
|
||||
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]->mCache.EnumerateRead(EntryExplicitNonHeapSize, &n2);
|
||||
}
|
||||
@ -169,7 +169,7 @@ public:
|
||||
static int64_t GetImagesContentUsedUncompressed()
|
||||
{
|
||||
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);
|
||||
}
|
||||
return n;
|
||||
|
@ -322,7 +322,7 @@ private: // methods
|
||||
|
||||
imgCacheTable &GetCache(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);
|
||||
|
||||
private: // data
|
||||
|
@ -634,7 +634,7 @@ nsSimplePageSequenceFrame::PrePrintNextPage(nsITimerCallback* aCallback, bool* a
|
||||
renderingContext->ThebesContext()->CurrentSurface();
|
||||
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];
|
||||
nsIntSize size = canvas->GetSize();
|
||||
|
||||
@ -660,8 +660,8 @@ nsSimplePageSequenceFrame::PrePrintNextPage(nsITimerCallback* aCallback, bool* a
|
||||
}
|
||||
}
|
||||
}
|
||||
PRInt32 doneCounter = 0;
|
||||
for (PRInt32 i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) {
|
||||
int32_t doneCounter = 0;
|
||||
for (int32_t i = mCurrentCanvasList.Length() - 1; i >= 0 ; i--) {
|
||||
nsHTMLCanvasElement* canvas = mCurrentCanvasList[i];
|
||||
|
||||
if (canvas->IsPrintCallbackDone()) {
|
||||
@ -678,7 +678,7 @@ void
|
||||
nsSimplePageSequenceFrame::InvalidateInternal(const nsRect& aDamageRect,
|
||||
nscoord aX, nscoord aY,
|
||||
nsIFrame* aForChild,
|
||||
PRUint32 aFlags)
|
||||
uint32_t aFlags)
|
||||
{
|
||||
// xxx Invalidate the entire frame as otherwise invalidate of printCanvas
|
||||
// don't work properly. This is hopefully no longer necessary once 539356
|
||||
@ -690,7 +690,7 @@ nsSimplePageSequenceFrame::InvalidateInternal(const nsRect& aDamageRect,
|
||||
NS_IMETHODIMP
|
||||
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];
|
||||
canvas->ResetPrintCallback();
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
virtual void InvalidateInternal(const nsRect& aDamageRect,
|
||||
nscoord aX, nscoord aY,
|
||||
nsIFrame* aForChild,
|
||||
PRUint32 aFlags);
|
||||
uint32_t aFlags);
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
@ -2403,8 +2403,8 @@ DocHasPrintCallbackCanvas(nsIDocument* aDoc, void* aData)
|
||||
nsRefPtr<nsContentList> canvases = NS_GetContentList(root,
|
||||
kNameSpaceID_XHTML,
|
||||
NS_LITERAL_STRING("canvas"));
|
||||
PRUint32 canvasCount = canvases->Length(true);
|
||||
for (PRUint32 i = 0; i < canvasCount; ++i) {
|
||||
uint32_t canvasCount = canvases->Length(true);
|
||||
for (uint32_t i = 0; i < canvasCount; ++i) {
|
||||
nsCOMPtr<nsIDOMHTMLCanvasElement> canvas = do_QueryInterface(canvases->Item(i, false));
|
||||
nsCOMPtr<nsIPrintCallback> printCallback;
|
||||
if (canvas && NS_SUCCEEDED(canvas->GetMozPrintCallback(getter_AddRefs(printCallback))) &&
|
||||
|
@ -726,7 +726,7 @@ nsSVGOuterSVGFrame::NotifyViewportOrTransformChanged(uint32_t aFlags)
|
||||
|
||||
if (haveNonFulLZoomTransformChange &&
|
||||
!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
||||
PRUint32 flags = (mState & NS_FRAME_IN_REFLOW) ?
|
||||
uint32_t flags = (mState & NS_FRAME_IN_REFLOW) ?
|
||||
nsSVGSVGElement::eDuringReflow : 0;
|
||||
content->ChildrenOnlyTransformChanged(flags);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
// The minimum number of bytes that are needed to attempt to sniff an mp4 file.
|
||||
static const unsigned MP4_MIN_BYTES_COUNT = 12;
|
||||
// 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)
|
||||
|
||||
@ -35,13 +35,13 @@ nsMediaSniffer::nsMediaSnifferEntry nsMediaSniffer::sSnifferEntries[] = {
|
||||
|
||||
// This function implements mp4 sniffing algorithm, described at
|
||||
// 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) {
|
||||
return false;
|
||||
}
|
||||
// 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.
|
||||
if (boxSize % 4 || aLength < boxSize) {
|
||||
@ -54,7 +54,7 @@ static bool MatchesMP4(const PRUint8* aData, const PRUint32 aLength)
|
||||
aData[7] != 0x70) {
|
||||
return false;
|
||||
}
|
||||
for (PRUint32 i = 2; i <= boxSize / 4 - 1 ; i++) {
|
||||
for (uint32_t i = 2; i <= boxSize / 4 - 1 ; i++) {
|
||||
if (i == 3) {
|
||||
continue;
|
||||
}
|
||||
@ -70,19 +70,19 @@ static bool MatchesMP4(const PRUint8* aData, const PRUint32 aLength)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMediaSniffer::GetMIMETypeFromContent(nsIRequest* aRequest,
|
||||
const PRUint8* aData,
|
||||
const PRUint32 aLength,
|
||||
const uint8_t* aData,
|
||||
const uint32_t aLength,
|
||||
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];
|
||||
if (clampedLength < currentEntry.mLength || currentEntry.mLength == 0) {
|
||||
continue;
|
||||
}
|
||||
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]) {
|
||||
matched = false;
|
||||
break;
|
||||
|
@ -28,12 +28,12 @@ class nsMediaSniffer : public nsIContentSniffer
|
||||
~nsMediaSniffer() {};
|
||||
|
||||
#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 {
|
||||
const PRUint8* mMask;
|
||||
const PRUint8* mPattern;
|
||||
const PRUint32 mLength;
|
||||
const uint8_t* mMask;
|
||||
const uint8_t* mPattern;
|
||||
const uint32_t mLength;
|
||||
const char* mContentType;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user