Bug 698263 - Rename mozilla::imagelib namespaces to mozilla::image r=joe

This commit is contained in:
Atul Aggarwal 2012-01-06 21:32:27 +05:30
parent 1f3332c8c5
commit 3e0a05f88e
39 changed files with 81 additions and 81 deletions

View File

@ -62,11 +62,11 @@
// objects that just require generic constructors
namespace mozilla {
namespace imagelib {
namespace image {
NS_GENERIC_FACTORY_CONSTRUCTOR(RasterImage)
}
}
using namespace mozilla::imagelib;
using namespace mozilla::image;
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(imgLoader, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(imgRequestProxy)
@ -136,7 +136,7 @@ static void
imglib_Shutdown()
{
imgLoader::Shutdown();
mozilla::imagelib::DiscardTracker::Shutdown();
mozilla::image::DiscardTracker::Shutdown();
}
static const mozilla::Module kImageModule = {

View File

@ -53,7 +53,7 @@
#include "ImageLogging.h"
namespace mozilla {
namespace imagelib {
namespace image {
#ifdef PR_LOGGING
PRLogModuleInfo *gBMPLog = PR_NewLogModule("BMPDecoder");
@ -775,5 +775,5 @@ void nsBMPDecoder::ProcessInfoHeader()
mBIH.important_colors = LITTLE_TO_NATIVE32(mBIH.important_colors);
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -48,7 +48,7 @@
#include "BMPFileHeaders.h"
namespace mozilla {
namespace imagelib {
namespace image {
class RasterImage;
@ -163,7 +163,7 @@ inline void Set4BitPixel(PRUint32*& aDecoded, PRUint8 aData,
}
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -85,7 +85,7 @@ mailing address.
#include "qcms.h"
namespace mozilla {
namespace imagelib {
namespace image {
/*
* GETN(n, s) requests at least 'n' bytes available from 'q', at start of state 's'
@ -1104,5 +1104,5 @@ nsGIFDecoder2::SpeedHistogram()
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -48,7 +48,7 @@
#include "GIF2.h"
namespace mozilla {
namespace imagelib {
namespace image {
class RasterImage;
//////////////////////////////////////////////////////////////////////
@ -102,7 +102,7 @@ private:
gif_struct mGIFStruct;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif

View File

@ -56,7 +56,7 @@
#include "nsISupportsPrimitives.h"
namespace mozilla {
namespace imagelib {
namespace image {
#define ICONCOUNTOFFSET 4
#define DIRENTRYOFFSET 6
@ -611,5 +611,5 @@ nsICODecoder::ProcessDirEntry(IconDirEntry& aTarget)
aTarget.mImageOffset = LITTLE_TO_NATIVE32(aTarget.mImageOffset);
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -50,7 +50,7 @@
#include "ICOFileHeaders.h"
namespace mozilla {
namespace imagelib {
namespace image {
class RasterImage;
@ -123,7 +123,7 @@ private:
bool mIsPNG;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif

View File

@ -48,7 +48,7 @@
#include "ImageErrors.h"
namespace mozilla {
namespace imagelib {
namespace image {
nsIconDecoder::nsIconDecoder(RasterImage &aImage, imgIDecoderObserver* aObserver)
: Decoder(aImage, aObserver),
@ -165,5 +165,5 @@ nsIconDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
}
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -48,7 +48,7 @@
#include "imgIDecoderObserver.h"
namespace mozilla {
namespace imagelib {
namespace image {
class RasterImage;
//////////////////////////////////////////////////////////////////////////////////////////////
@ -94,7 +94,7 @@ enum {
iconStateFinished = 3
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // nsIconDecoder_h__

View File

@ -74,7 +74,7 @@ ycc_rgb_convert_argb (j_decompress_ptr cinfo,
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
namespace mozilla {
namespace imagelib {
namespace image {
#if defined(PR_LOGGING)
PRLogModuleInfo *gJPEGlog = PR_NewLogModule("JPEGDecoder");
@ -890,7 +890,7 @@ term_source (j_decompress_ptr jd)
decoder->NotifyDone();
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -63,7 +63,7 @@ extern "C" {
#include <setjmp.h>
namespace mozilla {
namespace imagelib {
namespace image {
typedef struct {
struct jpeg_error_mgr pub; /* "public" fields for IJG library*/
@ -128,7 +128,7 @@ public:
PRUint32 mCMSMode;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // nsJPEGDecoder_h__

View File

@ -61,7 +61,7 @@
#include "gfxPlatform.h"
namespace mozilla {
namespace imagelib {
namespace image {
#ifdef PR_LOGGING
static PRLogModuleInfo *gPNGLog = PR_NewLogModule("PNGDecoder");
@ -887,5 +887,5 @@ nsPNGDecoder::SpeedHistogram()
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -53,7 +53,7 @@
#include "qcms.h"
namespace mozilla {
namespace imagelib {
namespace image {
class RasterImage;
class nsPNGDecoder : public Decoder
@ -141,7 +141,7 @@ public:
static const PRUint8 pngSignatureBytes[];
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // nsPNGDecoder_h__

View File

@ -545,7 +545,7 @@ nsBMPEncoder::InitInfoHeader(PRUint32 aBPP, PRUint32 aWidth, PRUint32 aHeight)
void
nsBMPEncoder::EncodeFileHeader()
{
mozilla::imagelib::BMPFILEHEADER littleEndianBFH = mBMPFileHeader;
mozilla::image::BMPFILEHEADER littleEndianBFH = mBMPFileHeader;
littleEndianBFH.filesize = NATIVE32_TO_LITTLE(littleEndianBFH.filesize);
littleEndianBFH.reserved = NATIVE32_TO_LITTLE(littleEndianBFH.reserved);
littleEndianBFH.dataoffset= NATIVE32_TO_LITTLE(littleEndianBFH.dataoffset);
@ -572,7 +572,7 @@ nsBMPEncoder::EncodeFileHeader()
void
nsBMPEncoder::EncodeInfoHeader()
{
mozilla::imagelib::BMPINFOHEADER littleEndianmBIH = mBMPInfoHeader;
mozilla::image::BMPINFOHEADER littleEndianmBIH = mBMPInfoHeader;
littleEndianmBIH.width = NATIVE32_TO_LITTLE(littleEndianmBIH.width);
littleEndianmBIH.height = NATIVE32_TO_LITTLE(littleEndianmBIH.height);
littleEndianmBIH.planes = NATIVE16_TO_LITTLE(littleEndianmBIH.planes);

View File

@ -98,8 +98,8 @@ protected:
// These headers will always contain endian independent stuff
// They store the BMP headers which will be encoded
mozilla::imagelib::BMPFILEHEADER mBMPFileHeader;
mozilla::imagelib::BMPINFOHEADER mBMPInfoHeader;
mozilla::image::BMPFILEHEADER mBMPFileHeader;
mozilla::image::BMPINFOHEADER mBMPInfoHeader;
// Keeps track of the start of the image buffer
PRUint8* mImageBufferStart;

View File

@ -46,7 +46,7 @@
#include "nsStreamUtils.h"
using namespace mozilla;
using namespace mozilla::imagelib;
using namespace mozilla::image;
NS_IMPL_THREADSAFE_ISUPPORTS3(nsICOEncoder, imgIEncoder, nsIInputStream, nsIAsyncInputStream)

View File

@ -108,8 +108,8 @@ protected:
// These headers will always contain endian independent stuff.
// Don't trust the width and height of mICODirEntry directly,
// instead use the accessors GetRealWidth() and GetRealHeight().
mozilla::imagelib::IconFileHeader mICOFileHeader;
mozilla::imagelib::IconDirEntry mICODirEntry;
mozilla::image::IconFileHeader mICOFileHeader;
mozilla::image::IconDirEntry mICODirEntry;
// Keeps track of the start of the image buffer
PRUint8* mImageBufferStart;

View File

@ -39,7 +39,7 @@
#define MOZILLA_IMAGELIB_BMPHEADERS_H_
namespace mozilla {
namespace imagelib {
namespace image {
struct BMPFILEHEADER {
char signature[2]; // String "BM"
@ -97,7 +97,7 @@ namespace mozilla {
PRUint8 blueRightShift;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#define BITFIELD_LENGTH 12 // Length of the bitfields structure in the bmp file

View File

@ -42,7 +42,7 @@
#include "nsIScriptError.h"
namespace mozilla {
namespace imagelib {
namespace image {
Decoder::Decoder(RasterImage &aImage, imgIDecoderObserver* aObserver)
: mImage(aImage)
@ -326,5 +326,5 @@ Decoder::PostDecoderError(nsresult aFailureCode)
NS_WARNING("Image decoding error - This is probably a bug!");
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -44,7 +44,7 @@
#include "imgIDecoderObserver.h"
namespace mozilla {
namespace imagelib {
namespace image {
class Decoder
{
@ -221,7 +221,7 @@ private:
bool mIsAnimated;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // MOZILLA_IMAGELIB_DECODER_H_

View File

@ -42,7 +42,7 @@
#include "mozilla/Preferences.h"
namespace mozilla {
namespace imagelib {
namespace image {
static bool sInitialized = false;
static bool sTimerOn = false;
@ -289,5 +289,5 @@ DiscardTracker::TimerCallback(nsITimer *aTimer, void *aClosure)
TimerOff();
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -43,7 +43,7 @@
class nsITimer;
namespace mozilla {
namespace imagelib {
namespace image {
class RasterImage;
// Struct to make a RasterImage insertable into the tracker list. This
@ -84,7 +84,7 @@ class DiscardTracker
static void TimerCallback(nsITimer *aTimer, void *aClosure);
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif /* mozilla_imagelib_DiscardTracker_h_ */

View File

@ -40,7 +40,7 @@
#define MOZILLA_IMAGELIB_ICOHEADERS_H_
namespace mozilla {
namespace imagelib {
namespace image {
#define ICONFILEHEADERSIZE 6
#define ICODIRENTRYSIZE 16
@ -73,7 +73,7 @@ namespace mozilla {
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif

View File

@ -38,7 +38,7 @@
#include "Image.h"
namespace mozilla {
namespace imagelib {
namespace image {
// Constructor
Image::Image(imgStatusTracker* aStatusTracker) :
@ -174,5 +174,5 @@ Image::EvaluateAnimation()
}
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -43,7 +43,7 @@
#include "prtypes.h"
namespace mozilla {
namespace imagelib {
namespace image {
class Image : public imgIContainer
{
@ -163,7 +163,7 @@ protected:
}
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // MOZILLA_IMAGELIB_IMAGE_H_

View File

@ -73,7 +73,7 @@
#include "mozilla/TimeStamp.h"
using namespace mozilla;
using namespace mozilla::imagelib;
using namespace mozilla::image;
using namespace mozilla::layers;
// a mask for flags that will affect the decoding
@ -174,7 +174,7 @@ DiscardingEnabled()
}
namespace mozilla {
namespace imagelib {
namespace image {
#ifndef DEBUG
NS_IMPL_ISUPPORTS3(RasterImage, imgIContainer, nsIProperties,
@ -2954,5 +2954,5 @@ RasterImage::GetFramesNotified(PRUint32 *aFramesNotified)
}
#endif
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -162,7 +162,7 @@ namespace layers {
class LayerManager;
class ImageContainer;
}
namespace imagelib {
namespace image {
class imgDecodeWorker;
class Decoder;
@ -637,7 +637,7 @@ class imgDecodeRequestor : public nsRunnable
nsWeakPtr mContainer;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif /* mozilla_imagelib_RasterImage_h_ */

View File

@ -66,7 +66,7 @@
using namespace mozilla::dom;
namespace mozilla {
namespace imagelib {
namespace image {
NS_IMPL_ISUPPORTS4(SVGDocumentWrapper,
nsIStreamListener,
@ -464,5 +464,5 @@ SVGDocumentWrapper::GetRootSVGElem()
return static_cast<nsSVGSVGElement*>(rootElem);
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -62,7 +62,7 @@ class nsSVGSVGElement;
namespace mozilla {
namespace imagelib {
namespace image {
class SVGDocumentWrapper MOZ_FINAL : public nsIStreamListener,
public nsIObserver,
@ -187,7 +187,7 @@ private:
bool mRegisteredForXPCOMShutdown;
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // mozilla_imagelib_SVGDocumentWrapper_h_

View File

@ -59,7 +59,7 @@ namespace mozilla {
using namespace dom;
namespace imagelib {
namespace image {
// Helper-class: SVGRootRenderingObserver
class SVGRootRenderingObserver : public nsSVGRenderingObserver {
@ -747,5 +747,5 @@ VectorImage::InvalidateObserver()
}
}
} // namespace imagelib
} // namespace image
} // namespace mozilla

View File

@ -51,7 +51,7 @@ namespace layers {
class LayerManager;
class ImageContainer;
}
namespace imagelib {
namespace image {
class SVGDocumentWrapper;
class SVGRootRenderingObserver;
@ -132,7 +132,7 @@ private:
// created via ExtractFrame?
};
} // namespace imagelib
} // namespace image
} // namespace mozilla
#endif // mozilla_imagelib_VectorImage_h_

View File

@ -96,7 +96,7 @@
#include "nsContentUtils.h"
using namespace mozilla;
using namespace mozilla::imagelib;
using namespace mozilla::image;
#if defined(DEBUG_pavlov) || defined(DEBUG_timeless)
#include "nsISimpleEnumerator.h"

View File

@ -87,7 +87,7 @@
#define SVG_MIMETYPE "image/svg+xml"
using namespace mozilla;
using namespace mozilla::imagelib;
using namespace mozilla::image;
static bool gInitializedPrefCaches = false;
static bool gDecodeOnDraw = false;

View File

@ -71,9 +71,9 @@ class imgMemoryReporter;
class imgRequestNotifyRunnable;
namespace mozilla {
namespace imagelib {
namespace image {
class Image;
} // namespace imagelib
} // namespace image
} // namespace mozilla
class imgRequest : public imgIDecoderObserver,
@ -227,7 +227,7 @@ private:
nsCOMPtr<nsIPrincipal> mPrincipal;
// Status-tracker -- transferred to mImage, when it gets instantiated
nsAutoPtr<imgStatusTracker> mStatusTracker;
nsRefPtr<mozilla::imagelib::Image> mImage;
nsRefPtr<mozilla::image::Image> mImage;
nsCOMPtr<nsIProperties> mProperties;
nsCOMPtr<nsISupports> mSecurityInfo;
nsCOMPtr<nsIChannel> mChannel;

View File

@ -55,7 +55,7 @@
#include "nspr.h"
using namespace mozilla::imagelib;
using namespace mozilla::image;
NS_IMPL_ADDREF(imgRequestProxy)
NS_IMPL_RELEASE(imgRequestProxy)

View File

@ -67,9 +67,9 @@ class imgRequestNotifyRunnable;
class imgStatusNotifyRunnable;
namespace mozilla {
namespace imagelib {
namespace image {
class Image;
} // namespace imagelib
} // namespace image
} // namespace mozilla
class imgRequestProxy : public imgIRequest,
@ -91,7 +91,7 @@ public:
// Callers to Init or ChangeOwner are required to call NotifyListener after
// (although not immediately after) doing so.
nsresult Init(imgRequest *request, nsILoadGroup *aLoadGroup,
mozilla::imagelib::Image* aImage,
mozilla::image::Image* aImage,
nsIURI* aURI, imgIDecoderObserver *aObserver);
nsresult ChangeOwner(imgRequest *aNewOwner); // this will change mOwner. Do not call this if the previous
@ -130,7 +130,7 @@ public:
// Setter for our |mImage| pointer, for imgRequest to use, once it
// instantiates an Image.
void SetImage(mozilla::imagelib::Image* aImage);
void SetImage(mozilla::image::Image* aImage);
// Removes all animation consumers that were created with
// IncrementAnimationConsumers. This is necessary since we need
@ -228,7 +228,7 @@ private:
// The image we represent. Is null until data has been received, and is then
// set by imgRequest.
nsRefPtr<mozilla::imagelib::Image> mImage;
nsRefPtr<mozilla::image::Image> mImage;
// Our principal. Is null until data has been received from the channel, and
// is then set by imgRequest.

View File

@ -46,7 +46,7 @@
#include "ImageLogging.h"
#include "RasterImage.h"
using namespace mozilla::imagelib;
using namespace mozilla::image;
static nsresult
GetResultFromImageStatus(PRUint32 aStatus)

View File

@ -47,9 +47,9 @@ class imgStatusNotifyRunnable;
class imgRequestNotifyRunnable;
struct nsIntRect;
namespace mozilla {
namespace imagelib {
namespace image {
class Image;
} // namespace imagelib
} // namespace image
} // namespace mozilla
@ -84,14 +84,14 @@ public:
// aImage is the image that this status tracker will pass to the
// imgRequestProxys in SyncNotify() and EmulateRequestFinished(), and must be
// alive as long as this instance is, because we hold a weak reference to it.
imgStatusTracker(mozilla::imagelib::Image* aImage);
imgStatusTracker(mozilla::image::Image* aImage);
imgStatusTracker(const imgStatusTracker& aOther);
// Image-setter, for imgStatusTrackers created by imgRequest::Init, which
// are created before their Image is created. This method should only
// be called once, and only on an imgStatusTracker that was initialized
// without an image.
void SetImage(mozilla::imagelib::Image* aImage);
void SetImage(mozilla::image::Image* aImage);
// Schedule an asynchronous "replaying" of all the notifications that would
// have to happen to put us in the current state.
@ -182,7 +182,7 @@ private:
// A weak pointer to the Image, because it owns us, and we
// can't create a cycle.
mozilla::imagelib::Image* mImage;
mozilla::image::Image* mImage;
PRUint32 mState;
nsresult mImageStatus;
bool mHadLastPart;

View File

@ -53,7 +53,7 @@
#include "nsNetUtil.h"
#include "RasterImage.h"
using namespace mozilla::imagelib;
using namespace mozilla::image;
/* ========== imgITools implementation ========== */