Bug 1038536 - Flatten image/src/ directory. r=seth
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Thu, 14 May 2015 20:52:05 -0700
changeset 276648 7701abd924856d65acbf9927629cf27dd2335ec1
parent 276647 f0b9343094e0dc868d67476f091ee1c170ccc754
child 276649 b14c429c72fb1b282c44045f8ed37ab67034b15c
push id897
push userjlund@mozilla.com
push dateMon, 14 Sep 2015 18:56:12 +0000
treeherdermozilla-release@9411e2d2b214 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1038536
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1038536 - Flatten image/src/ directory. r=seth
dom/base/moz.build
dom/canvas/moz.build
image/BMPFileHeaders.h
image/ClippedImage.cpp
image/ClippedImage.h
image/DecodePool.cpp
image/DecodePool.h
image/Decoder.cpp
image/Decoder.h
image/Downscaler.cpp
image/Downscaler.h
image/DynamicImage.cpp
image/DynamicImage.h
image/FrameAnimator.cpp
image/FrameAnimator.h
image/FrozenImage.cpp
image/FrozenImage.h
image/ICOFileHeaders.h
image/IProgressObserver.h
image/Image.cpp
image/Image.h
image/ImageFactory.cpp
image/ImageFactory.h
image/ImageMetadata.cpp
image/ImageMetadata.h
image/ImageOps.cpp
image/ImageOps.h
image/ImageRegion.h
image/ImageURL.h
image/ImageWrapper.cpp
image/ImageWrapper.h
image/MultipartImage.cpp
image/MultipartImage.h
image/Orientation.h
image/OrientedImage.cpp
image/OrientedImage.h
image/ProgressTracker.cpp
image/ProgressTracker.h
image/RasterImage.cpp
image/RasterImage.h
image/SVGDocumentWrapper.cpp
image/SVGDocumentWrapper.h
image/ScriptedNotificationObserver.cpp
image/ScriptedNotificationObserver.h
image/ShutdownTracker.cpp
image/ShutdownTracker.h
image/SourceBuffer.cpp
image/SourceBuffer.h
image/SurfaceCache.cpp
image/SurfaceCache.h
image/VectorImage.cpp
image/VectorImage.h
image/build/moz.build
image/decoders/moz.build
image/encoders/bmp/moz.build
image/encoders/ico/moz.build
image/encoders/png/moz.build
image/imgFrame.cpp
image/imgFrame.h
image/imgLoader.cpp
image/imgLoader.h
image/imgRequest.cpp
image/imgRequest.h
image/imgRequestProxy.cpp
image/imgRequestProxy.h
image/imgTools.cpp
image/imgTools.h
image/moz.build
image/src/BMPFileHeaders.h
image/src/ClippedImage.cpp
image/src/ClippedImage.h
image/src/DecodePool.cpp
image/src/DecodePool.h
image/src/Decoder.cpp
image/src/Decoder.h
image/src/Downscaler.cpp
image/src/Downscaler.h
image/src/DynamicImage.cpp
image/src/DynamicImage.h
image/src/FrameAnimator.cpp
image/src/FrameAnimator.h
image/src/FrozenImage.cpp
image/src/FrozenImage.h
image/src/ICOFileHeaders.h
image/src/IProgressObserver.h
image/src/Image.cpp
image/src/Image.h
image/src/ImageFactory.cpp
image/src/ImageFactory.h
image/src/ImageMetadata.cpp
image/src/ImageMetadata.h
image/src/ImageOps.cpp
image/src/ImageOps.h
image/src/ImageRegion.h
image/src/ImageURL.h
image/src/ImageWrapper.cpp
image/src/ImageWrapper.h
image/src/MultipartImage.cpp
image/src/MultipartImage.h
image/src/Orientation.h
image/src/OrientedImage.cpp
image/src/OrientedImage.h
image/src/ProgressTracker.cpp
image/src/ProgressTracker.h
image/src/RasterImage.cpp
image/src/RasterImage.h
image/src/SVGDocumentWrapper.cpp
image/src/SVGDocumentWrapper.h
image/src/ScriptedNotificationObserver.cpp
image/src/ScriptedNotificationObserver.h
image/src/ShutdownTracker.cpp
image/src/ShutdownTracker.h
image/src/SourceBuffer.cpp
image/src/SourceBuffer.h
image/src/SurfaceCache.cpp
image/src/SurfaceCache.h
image/src/VectorImage.cpp
image/src/VectorImage.h
image/src/imgFrame.cpp
image/src/imgFrame.h
image/src/imgLoader.cpp
image/src/imgLoader.h
image/src/imgRequest.cpp
image/src/imgRequest.h
image/src/imgRequestProxy.cpp
image/src/imgRequestProxy.h
image/src/imgTools.cpp
image/src/imgTools.h
image/src/moz.build
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -418,17 +418,17 @@ LOCAL_INCLUDES += [
     '/dom/storage',
     '/dom/svg',
     '/dom/workers',
     '/dom/xbl',
     '/dom/xml',
     '/dom/xslt/xpath',
     '/dom/xul',
     '/gfx/2d',
-    '/image/src',
+    '/image',
     '/js/xpconnect/src',
     '/js/xpconnect/wrappers',
     '/layout/base',
     '/layout/generic',
     '/layout/style',
     '/layout/svg',
     '/layout/xul',
     '/netwerk/base',
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -137,17 +137,17 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/html',
     '/dom/svg',
     '/dom/xul',
     '/gfx/gl',
-    '/image/src',
+    '/image',
     '/js/xpconnect/src',
     '/layout/generic',
     '/layout/style',
     '/layout/xul',
 ]
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
rename from image/src/BMPFileHeaders.h
rename to image/BMPFileHeaders.h
--- a/image/src/BMPFileHeaders.h
+++ b/image/BMPFileHeaders.h
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_BMPFileHeaders_h
-#define mozilla_image_src_BMPFileHeaders_h
+#ifndef mozilla_image_BMPFileHeaders_h
+#define mozilla_image_BMPFileHeaders_h
 
 namespace mozilla {
 namespace image {
 
 struct BMPFILEHEADER {
   char signature[2];   // String "BM"
   uint32_t filesize;
   int32_t reserved;    // Zero
@@ -136,9 +136,9 @@ enum ERLEState {
   eRLEStateNeedXDelta,
   eRLEStateNeedYDelta,        ///< mStateData will hold x delta
   eRLEStateAbsoluteMode,      ///< mStateData will hold count of existing data
                               ///< to read
   eRLEStateAbsoluteModePadded ///< As above, but another byte of data has to
                               ///< be read as padding
 };
 
-#endif // mozilla_image_src_BMPFileHeaders_h
+#endif // mozilla_image_BMPFileHeaders_h
rename from image/src/ClippedImage.cpp
rename to image/ClippedImage.cpp
rename from image/src/ClippedImage.h
rename to image/ClippedImage.h
--- a/image/src/ClippedImage.h
+++ b/image/ClippedImage.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ClippedImage_h
-#define mozilla_image_src_ClippedImage_h
+#ifndef mozilla_image_ClippedImage_h
+#define mozilla_image_ClippedImage_h
 
 #include "ImageWrapper.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/RefPtr.h"
 
 namespace mozilla {
 namespace image {
@@ -86,9 +86,9 @@ private:
 
   friend class DrawSingleTileCallback;
   friend class ImageOps;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ClippedImage_h
+#endif // mozilla_image_ClippedImage_h
rename from image/src/DecodePool.cpp
rename to image/DecodePool.cpp
rename from image/src/DecodePool.h
rename to image/DecodePool.h
--- a/image/src/DecodePool.h
+++ b/image/DecodePool.h
@@ -2,18 +2,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * DecodePool manages the threads used for decoding raster images.
  */
 
-#ifndef mozilla_image_src_DecodePool_h
-#define mozilla_image_src_DecodePool_h
+#ifndef mozilla_image_DecodePool_h
+#define mozilla_image_DecodePool_h
 
 #include "mozilla/Mutex.h"
 #include "mozilla/StaticPtr.h"
 #include "nsCOMArray.h"
 #include "nsCOMPtr.h"
 #include "nsIEventTarget.h"
 #include "nsIObserver.h"
 #include "nsRefPtr.h"
@@ -93,9 +93,9 @@ private:
   Mutex                     mMutex;
   nsCOMArray<nsIThread>     mThreads;
   nsCOMPtr<nsIThread>       mIOThread;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_DecodePool_h
+#endif // mozilla_image_DecodePool_h
rename from image/src/Decoder.cpp
rename to image/Decoder.cpp
rename from image/src/Decoder.h
rename to image/Decoder.h
--- a/image/src/Decoder.h
+++ b/image/Decoder.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_Decoder_h
-#define mozilla_image_src_Decoder_h
+#ifndef mozilla_image_Decoder_h
+#define mozilla_image_Decoder_h
 
 #include "FrameAnimator.h"
 #include "RasterImage.h"
 #include "mozilla/RefPtr.h"
 #include "DecodePool.h"
 #include "ImageMetadata.h"
 #include "Orientation.h"
 #include "SourceBuffer.h"
@@ -497,9 +497,9 @@ private:
   bool mSizeDecode;
   bool mInFrame;
   bool mIsAnimated;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_Decoder_h
+#endif // mozilla_image_Decoder_h
rename from image/src/Downscaler.cpp
rename to image/Downscaler.cpp
rename from image/src/Downscaler.h
rename to image/Downscaler.h
--- a/image/src/Downscaler.h
+++ b/image/Downscaler.h
@@ -4,18 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Downscaler is a high-quality, streaming image downscaler based upon Skia's
  * scaling implementation.
  */
 
-#ifndef mozilla_image_src_Downscaler_h
-#define mozilla_image_src_Downscaler_h
+#ifndef mozilla_image_Downscaler_h
+#define mozilla_image_Downscaler_h
 
 #include "mozilla/UniquePtr.h"
 #include "nsRect.h"
 
 
 namespace skia {
   class ConvolutionFilter1D;
 } // namespace skia
@@ -151,9 +151,9 @@ public:
   void ResetForNextProgressivePass() { }
 };
 
 #endif // MOZ_ENABLE_SKIA
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_Downscaler_h
+#endif // mozilla_image_Downscaler_h
rename from image/src/DynamicImage.cpp
rename to image/DynamicImage.cpp
rename from image/src/DynamicImage.h
rename to image/DynamicImage.h
--- a/image/src/DynamicImage.h
+++ b/image/DynamicImage.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_DynamicImage_h
-#define mozilla_image_src_DynamicImage_h
+#ifndef mozilla_image_DynamicImage_h
+#define mozilla_image_DynamicImage_h
 
 #include "mozilla/MemoryReporting.h"
 #include "gfxDrawable.h"
 #include "Image.h"
 
 namespace mozilla {
 namespace image {
 
@@ -67,9 +67,9 @@ private:
   virtual ~DynamicImage() { }
 
   nsRefPtr<gfxDrawable> mDrawable;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_DynamicImage_h
+#endif // mozilla_image_DynamicImage_h
rename from image/src/FrameAnimator.cpp
rename to image/FrameAnimator.cpp
rename from image/src/FrameAnimator.h
rename to image/FrameAnimator.h
--- a/image/src/FrameAnimator.h
+++ b/image/FrameAnimator.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_FrameAnimator_h
-#define mozilla_image_src_FrameAnimator_h
+#ifndef mozilla_image_FrameAnimator_h
+#define mozilla_image_FrameAnimator_h
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/TimeStamp.h"
 #include "gfx2DGlue.h"
 #include "gfxTypes.h"
 #include "imgFrame.h"
 #include "nsCOMPtr.h"
 #include "nsRect.h"
@@ -282,9 +282,9 @@ private: // data
 
   //! Whether this image is done being decoded.
   bool mDoneDecoding;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_FrameAnimator_h
+#endif // mozilla_image_FrameAnimator_h
rename from image/src/FrozenImage.cpp
rename to image/FrozenImage.cpp
rename from image/src/FrozenImage.h
rename to image/FrozenImage.h
--- a/image/src/FrozenImage.h
+++ b/image/FrozenImage.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_FrozenImage_h
-#define mozilla_image_src_FrozenImage_h
+#ifndef mozilla_image_FrozenImage_h
+#define mozilla_image_FrozenImage_h
 
 #include "ImageWrapper.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 
 namespace mozilla {
 namespace image {
 
@@ -61,9 +61,9 @@ protected:
 
 private:
   friend class ImageOps;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_FrozenImage_h
+#endif // mozilla_image_FrozenImage_h
rename from image/src/ICOFileHeaders.h
rename to image/ICOFileHeaders.h
--- a/image/src/ICOFileHeaders.h
+++ b/image/ICOFileHeaders.h
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
-#ifndef mozilla_image_src_ICOFileHeaders_h
-#define mozilla_image_src_ICOFileHeaders_h
+#ifndef mozilla_image_ICOFileHeaders_h
+#define mozilla_image_ICOFileHeaders_h
 
 namespace mozilla {
 namespace image {
 
 #define ICONFILEHEADERSIZE 6
 #define ICODIRENTRYSIZE 16
 #define PNGSIGNATURESIZE 8
 #define BMPFILEHEADERSIZE 14
@@ -73,9 +73,9 @@ struct IconDirEntry
    */
   uint32_t  mImageOffset;
 };
 
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ICOFileHeaders_h
+#endif // mozilla_image_ICOFileHeaders_h
rename from image/src/IProgressObserver.h
rename to image/IProgressObserver.h
--- a/image/src/IProgressObserver.h
+++ b/image/IProgressObserver.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_IProgressObserver_h
-#define mozilla_image_src_IProgressObserver_h
+#ifndef mozilla_image_IProgressObserver_h
+#define mozilla_image_IProgressObserver_h
 
 #include "mozilla/WeakPtr.h"
 #include "nsISupports.h"
 #include "nsRect.h"
 
 namespace mozilla {
 namespace image {
 
@@ -51,9 +51,9 @@ public:
 
 protected:
   virtual ~IProgressObserver() { }
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_IProgressObserver_h
+#endif // mozilla_image_IProgressObserver_h
rename from image/src/Image.cpp
rename to image/Image.cpp
rename from image/src/Image.h
rename to image/Image.h
--- a/image/src/Image.h
+++ b/image/Image.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_Image_h
-#define mozilla_image_src_Image_h
+#ifndef mozilla_image_Image_h
+#define mozilla_image_Image_h
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/TimeStamp.h"
 #include "gfx2DGlue.h"                // for gfxMemoryLocation
 #include "imgIContainer.h"
 #include "ImageURL.h"
 #include "nsStringFwd.h"
 #include "ProgressTracker.h"
@@ -334,9 +334,9 @@ protected:
   bool                          mInitialized:1; // Have we been initalized?
   bool                          mAnimating:1;   // Are we currently animating?
   bool                          mError:1;       // Error handling
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_Image_h
+#endif // mozilla_image_Image_h
rename from image/src/ImageFactory.cpp
rename to image/ImageFactory.cpp
rename from image/src/ImageFactory.h
rename to image/ImageFactory.h
--- a/image/src/ImageFactory.h
+++ b/image/ImageFactory.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ImageFactory_h
-#define mozilla_image_src_ImageFactory_h
+#ifndef mozilla_image_ImageFactory_h
+#define mozilla_image_ImageFactory_h
 
 #include "nsCOMPtr.h"
 #include "nsProxyRelease.h"
 
 class nsCString;
 class nsIRequest;
 
 namespace mozilla {
@@ -87,9 +87,9 @@ private:
 
   // This is a static factory class, so disallow instantiation.
   virtual ~ImageFactory() = 0;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ImageFactory_h
+#endif // mozilla_image_ImageFactory_h
rename from image/src/ImageMetadata.cpp
rename to image/ImageMetadata.cpp
rename from image/src/ImageMetadata.h
rename to image/ImageMetadata.h
--- a/image/src/ImageMetadata.h
+++ b/image/ImageMetadata.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ImageMetadata_h
-#define mozilla_image_src_ImageMetadata_h
+#ifndef mozilla_image_ImageMetadata_h
+#define mozilla_image_ImageMetadata_h
 
 #include <stdint.h>
 #include "mozilla/Maybe.h"
 #include "nsSize.h"
 #include "Orientation.h"
 
 namespace mozilla {
 namespace image {
@@ -66,9 +66,9 @@ private:
 
   Maybe<nsIntSize> mSize;
   Maybe<Orientation> mOrientation;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ImageMetadata_h
+#endif // mozilla_image_ImageMetadata_h
rename from image/src/ImageOps.cpp
rename to image/ImageOps.cpp
rename from image/src/ImageOps.h
rename to image/ImageOps.h
--- a/image/src/ImageOps.h
+++ b/image/ImageOps.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ImageOps_h
-#define mozilla_image_src_ImageOps_h
+#ifndef mozilla_image_ImageOps_h
+#define mozilla_image_ImageOps_h
 
 #include "nsCOMPtr.h"
 #include "nsRect.h"
 
 class gfxDrawable;
 class imgIContainer;
 
 namespace mozilla {
@@ -64,9 +64,9 @@ public:
 private:
   // This is a static utility class, so disallow instantiation.
   virtual ~ImageOps() = 0;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ImageOps_h
+#endif // mozilla_image_ImageOps_h
rename from image/src/ImageRegion.h
rename to image/ImageRegion.h
--- a/image/src/ImageRegion.h
+++ b/image/ImageRegion.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ImageRegion_h
-#define mozilla_image_src_ImageRegion_h
+#ifndef mozilla_image_ImageRegion_h
+#define mozilla_image_ImageRegion_h
 
 #include "gfxRect.h"
 
 namespace mozilla {
 namespace image {
 
 /**
  * An axis-aligned rectangle in tiled image space, with an optional sampling
@@ -150,9 +150,9 @@ private:
   gfxRect mRect;
   gfxRect mRestriction;
   bool    mIsRestricted;
 };
 
 }  // namespace image
 }  // namespace mozilla
 
-#endif // mozilla_image_src_ImageRegion_h
+#endif // mozilla_image_ImageRegion_h
rename from image/src/ImageURL.h
rename to image/ImageURL.h
--- a/image/src/ImageURL.h
+++ b/image/ImageURL.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ImageURL_h
-#define mozilla_image_src_ImageURL_h
+#ifndef mozilla_image_ImageURL_h
+#define mozilla_image_ImageURL_h
 
 #include "nsIURI.h"
 #include "MainThreadUtils.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
 namespace image {
 
@@ -85,9 +85,9 @@ private:
   nsAutoCString mRef;
 
   ~ImageURL() { }
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ImageURL_h
+#endif // mozilla_image_ImageURL_h
rename from image/src/ImageWrapper.cpp
rename to image/ImageWrapper.cpp
rename from image/src/ImageWrapper.h
rename to image/ImageWrapper.h
--- a/image/src/ImageWrapper.h
+++ b/image/ImageWrapper.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ImageWrapper_h
-#define mozilla_image_src_ImageWrapper_h
+#ifndef mozilla_image_ImageWrapper_h
+#define mozilla_image_ImageWrapper_h
 
 #include "mozilla/MemoryReporting.h"
 #include "Image.h"
 
 namespace mozilla {
 namespace image {
 
 /**
@@ -77,9 +77,9 @@ protected:
 
 private:
   nsRefPtr<Image> mInnerImage;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ImageWrapper_h
+#endif // mozilla_image_ImageWrapper_h
rename from image/src/MultipartImage.cpp
rename to image/MultipartImage.cpp
rename from image/src/MultipartImage.h
rename to image/MultipartImage.h
--- a/image/src/MultipartImage.h
+++ b/image/MultipartImage.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_MultipartImage_h
-#define mozilla_image_src_MultipartImage_h
+#ifndef mozilla_image_MultipartImage_h
+#define mozilla_image_MultipartImage_h
 
 #include "ImageWrapper.h"
 #include "IProgressObserver.h"
 #include "ProgressTracker.h"
 
 namespace mozilla {
 namespace image {
 
@@ -83,9 +83,9 @@ private:
   nsRefPtr<NextPartObserver> mNextPartObserver;
   nsRefPtr<Image> mNextPart;
   bool mDeferNotifications : 1;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_MultipartImage_h
+#endif // mozilla_image_MultipartImage_h
rename from image/src/Orientation.h
rename to image/Orientation.h
--- a/image/src/Orientation.h
+++ b/image/Orientation.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_Orientation_h
-#define mozilla_image_src_Orientation_h
+#ifndef mozilla_image_Orientation_h
+#define mozilla_image_Orientation_h
 
 #include <stdint.h>
 
 namespace mozilla {
 namespace image {
 
 enum class Angle : uint8_t {
   D0,
@@ -54,9 +54,9 @@ struct Orientation
 
   Angle rotation;
   Flip  flip;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_Orientation_h
+#endif // mozilla_image_Orientation_h
rename from image/src/OrientedImage.cpp
rename to image/OrientedImage.cpp
rename from image/src/OrientedImage.h
rename to image/OrientedImage.h
--- a/image/src/OrientedImage.h
+++ b/image/OrientedImage.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_OrientedImage_h
-#define mozilla_image_src_OrientedImage_h
+#ifndef mozilla_image_OrientedImage_h
+#define mozilla_image_OrientedImage_h
 
 #include "ImageWrapper.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 #include "Orientation.h"
 
 namespace mozilla {
 namespace image {
@@ -67,9 +67,9 @@ private:
   Orientation mOrientation;
 
   friend class ImageOps;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_OrientedImage_h
+#endif // mozilla_image_OrientedImage_h
rename from image/src/ProgressTracker.cpp
rename to image/ProgressTracker.cpp
rename from image/src/ProgressTracker.h
rename to image/ProgressTracker.h
--- a/image/src/ProgressTracker.h
+++ b/image/ProgressTracker.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ProgressTracker_h
-#define mozilla_image_src_ProgressTracker_h
+#ifndef mozilla_image_ProgressTracker_h
+#define mozilla_image_ProgressTracker_h
 
 #include "mozilla/Mutex.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/WeakPtr.h"
 #include "nsCOMPtr.h"
 #include "nsTObserverArray.h"
 #include "nsThreadUtils.h"
 #include "nsRect.h"
@@ -203,9 +203,9 @@ private:
   ObserverArray mObservers;
 
   Progress mProgress;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ProgressTracker_h
+#endif // mozilla_image_ProgressTracker_h
rename from image/src/RasterImage.cpp
rename to image/RasterImage.cpp
rename from image/src/RasterImage.h
rename to image/RasterImage.h
--- a/image/src/RasterImage.h
+++ b/image/RasterImage.h
@@ -9,18 +9,18 @@
  * handles static and animated rasterized images.
  *
  * @author  Stuart Parmenter <pavlov@netscape.com>
  * @author  Chris Saari <saari@netscape.com>
  * @author  Arron Mogge <paper@animecity.nu>
  * @author  Andrew Smith <asmith15@learn.senecac.on.ca>
  */
 
-#ifndef mozilla_image_src_RasterImage_h
-#define mozilla_image_src_RasterImage_h
+#ifndef mozilla_image_RasterImage_h
+#define mozilla_image_RasterImage_h
 
 #include "Image.h"
 #include "nsCOMPtr.h"
 #include "imgIContainer.h"
 #include "nsIProperties.h"
 #include "nsTArray.h"
 #include "imgFrame.h"
 #include "nsThreadUtils.h"
@@ -481,9 +481,9 @@ protected:
 inline NS_IMETHODIMP
 RasterImage::GetAnimationMode(uint16_t* aAnimationMode) {
   return GetAnimationModeInternal(aAnimationMode);
 }
 
 } // namespace image
 } // namespace mozilla
 
-#endif /* mozilla_image_src_RasterImage_h */
+#endif /* mozilla_image_RasterImage_h */
rename from image/src/SVGDocumentWrapper.cpp
rename to image/SVGDocumentWrapper.cpp
rename from image/src/SVGDocumentWrapper.h
rename to image/SVGDocumentWrapper.h
--- a/image/src/SVGDocumentWrapper.h
+++ b/image/SVGDocumentWrapper.h
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This class wraps an SVG document, for use by VectorImage objects. */
 
-#ifndef mozilla_image_src_SVGDocumentWrapper_h
-#define mozilla_image_src_SVGDocumentWrapper_h
+#ifndef mozilla_image_SVGDocumentWrapper_h
+#define mozilla_image_SVGDocumentWrapper_h
 
 #include "mozilla/Attributes.h"
 
 #include "nsCOMPtr.h"
 #include "nsIStreamListener.h"
 #include "nsIObserver.h"
 #include "nsIContentViewer.h"
 #include "nsWeakReference.h"
@@ -143,9 +143,9 @@ private:
   nsCOMPtr<nsIStreamListener> mListener;
   bool                        mIgnoreInvalidation;
   bool                        mRegisteredForXPCOMShutdown;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_SVGDocumentWrapper_h
+#endif // mozilla_image_SVGDocumentWrapper_h
rename from image/src/ScriptedNotificationObserver.cpp
rename to image/ScriptedNotificationObserver.cpp
rename from image/src/ScriptedNotificationObserver.h
rename to image/ScriptedNotificationObserver.h
--- a/image/src/ScriptedNotificationObserver.h
+++ b/image/ScriptedNotificationObserver.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_ScriptedNotificationObserver_h
-#define mozilla_image_src_ScriptedNotificationObserver_h
+#ifndef mozilla_image_ScriptedNotificationObserver_h
+#define mozilla_image_ScriptedNotificationObserver_h
 
 #include "imgINotificationObserver.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 
 class imgIScriptedNotificationObserver;
 
 namespace mozilla {
@@ -29,9 +29,9 @@ public:
 private:
   virtual ~ScriptedNotificationObserver() { }
   nsCOMPtr<imgIScriptedNotificationObserver> mInner;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ScriptedNotificationObserver_h
+#endif // mozilla_image_ScriptedNotificationObserver_h
rename from image/src/ShutdownTracker.cpp
rename to image/ShutdownTracker.cpp
rename from image/src/ShutdownTracker.h
rename to image/ShutdownTracker.h
--- a/image/src/ShutdownTracker.h
+++ b/image/ShutdownTracker.h
@@ -3,18 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * ShutdownTracker is an imagelib-global service that allows callers to check
  * whether shutdown has started.
  */
 
-#ifndef mozilla_image_src_ShutdownTracker_h
-#define mozilla_image_src_ShutdownTracker_h
+#ifndef mozilla_image_ShutdownTracker_h
+#define mozilla_image_ShutdownTracker_h
 
 namespace mozilla {
 namespace image {
 
 /**
  * ShutdownTracker is an imagelib-global service that allows callers to check
  * whether shutdown has started. It exists to avoid the need for registering
  * many 'xpcom-shutdown' notification observers on short-lived objects, which
@@ -38,9 +38,9 @@ struct ShutdownTracker
 
 private:
   virtual ~ShutdownTracker() = 0;  // Forbid instantiation.
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_ShutdownTracker_h
+#endif // mozilla_image_ShutdownTracker_h
rename from image/src/SourceBuffer.cpp
rename to image/SourceBuffer.cpp
rename from image/src/SourceBuffer.h
rename to image/SourceBuffer.h
--- a/image/src/SourceBuffer.h
+++ b/image/SourceBuffer.h
@@ -3,18 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * SourceBuffer is a single producer, multiple consumer data structure used for
  * storing image source (compressed) data.
  */
 
-#ifndef mozilla_image_src_sourcebuffer_h
-#define mozilla_image_src_sourcebuffer_h
+#ifndef mozilla_image_sourcebuffer_h
+#define mozilla_image_sourcebuffer_h
 
 #include "mozilla/Maybe.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/Move.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/UniquePtr.h"
@@ -374,9 +374,9 @@ private:
 
   /// Count of active consumers.
   uint32_t mConsumerCount;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_sourcebuffer_h
+#endif // mozilla_image_sourcebuffer_h
rename from image/src/SurfaceCache.cpp
rename to image/SurfaceCache.cpp
rename from image/src/SurfaceCache.h
rename to image/SurfaceCache.h
--- a/image/src/SurfaceCache.h
+++ b/image/SurfaceCache.h
@@ -3,18 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * SurfaceCache is a service for caching temporary surfaces and decoded image
  * data in imagelib.
  */
 
-#ifndef mozilla_image_src_SurfaceCache_h
-#define mozilla_image_src_SurfaceCache_h
+#ifndef mozilla_image_SurfaceCache_h
+#define mozilla_image_SurfaceCache_h
 
 #include "mozilla/Maybe.h"           // for Maybe
 #include "mozilla/MemoryReporting.h" // for MallocSizeOf
 #include "mozilla/HashFunctions.h"   // for HashGeneric and AddToHash
 #include "gfx2DGlue.h"               // for gfxMemoryLocation
 #include "gfxPoint.h"                // for gfxSize
 #include "nsCOMPtr.h"                // for already_AddRefed
 #include "mozilla/gfx/Point.h"       // for mozilla::gfx::IntSize
@@ -412,9 +412,9 @@ struct SurfaceCache
 
 private:
   virtual ~SurfaceCache() = 0;  // Forbid instantiation.
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_SurfaceCache_h
+#endif // mozilla_image_SurfaceCache_h
rename from image/src/VectorImage.cpp
rename to image/VectorImage.cpp
rename from image/src/VectorImage.h
rename to image/VectorImage.h
--- a/image/src/VectorImage.h
+++ b/image/VectorImage.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_VectorImage_h
-#define mozilla_image_src_VectorImage_h
+#ifndef mozilla_image_VectorImage_h
+#define mozilla_image_VectorImage_h
 
 #include "Image.h"
 #include "nsIStreamListener.h"
 #include "mozilla/MemoryReporting.h"
 
 class nsIRequest;
 class gfxDrawable;
 
@@ -119,9 +119,9 @@ inline NS_IMETHODIMP VectorImage::GetAni
 
 inline NS_IMETHODIMP VectorImage::SetAnimationMode(uint16_t aAnimationMode) {
   return SetAnimationModeInternal(aAnimationMode);
 }
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_VectorImage_h
+#endif // mozilla_image_VectorImage_h
--- a/image/build/moz.build
+++ b/image/build/moz.build
@@ -11,15 +11,15 @@ EXPORTS += [
 SOURCES += [
     'nsImageModule.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
-    '../encoders/bmp',
-    '../encoders/ico',
-    '../encoders/jpeg',
-    '../encoders/png',
-    '../src',
+    '/image',
+    '/image/encoders/bmp',
+    '/image/encoders/ico',
+    '/image/encoders/jpeg',
+    '/image/encoders/png',
 ]
 
--- a/image/decoders/moz.build
+++ b/image/decoders/moz.build
@@ -31,12 +31,12 @@ UNIFIED_SOURCES += [
     'nsJPEGDecoder.cpp',
     'nsPNGDecoder.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 # Decoders need RasterImage.h
 LOCAL_INCLUDES += [
-    '/image/src',
+    '/image',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/image/encoders/bmp/moz.build
+++ b/image/encoders/bmp/moz.build
@@ -6,12 +6,12 @@
 
 SOURCES += [
     'nsBMPEncoder.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 LOCAL_INCLUDES += [
-    '/image/src',
+    '/image',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/image/encoders/ico/moz.build
+++ b/image/encoders/ico/moz.build
@@ -7,14 +7,14 @@
 SOURCES += [
     'nsICOEncoder.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 # Decoders need RasterImage.h
 LOCAL_INCLUDES += [
-    '../bmp',
-    '../png',
-    '/image/src',
+    '/image',
+    '/image/encoders/bmp',
+    '/image/encoders/png',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/image/encoders/png/moz.build
+++ b/image/encoders/png/moz.build
@@ -6,12 +6,12 @@
 
 SOURCES += [
     'nsPNGEncoder.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 LOCAL_INCLUDES += [
-    '/image/src',
+    '/image',
 ]
 
 FINAL_LIBRARY = 'xul'
rename from image/src/imgFrame.cpp
rename to image/imgFrame.cpp
rename from image/src/imgFrame.h
rename to image/imgFrame.h
--- a/image/src/imgFrame.h
+++ b/image/imgFrame.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_imgFrame_h
-#define mozilla_image_src_imgFrame_h
+#ifndef mozilla_image_imgFrame_h
+#define mozilla_image_imgFrame_h
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/Move.h"
 #include "mozilla/VolatileBuffer.h"
 #include "gfxDrawable.h"
 #include "imgIContainer.h"
 #include "MainThreadUtils.h"
@@ -527,9 +527,9 @@ public:
 
 private:
   nsRefPtr<imgFrame> mFrame;
 };
 
 } // namespace image
 } // namespace mozilla
 
-#endif // mozilla_image_src_imgFrame_h
+#endif // mozilla_image_imgFrame_h
rename from image/src/imgLoader.cpp
rename to image/imgLoader.cpp
rename from image/src/imgLoader.h
rename to image/imgLoader.h
--- a/image/src/imgLoader.h
+++ b/image/imgLoader.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_imgLoader_h
-#define mozilla_image_src_imgLoader_h
+#ifndef mozilla_image_imgLoader_h
+#define mozilla_image_imgLoader_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Mutex.h"
 
 #include "imgILoader.h"
 #include "imgICache.h"
 #include "nsWeakReference.h"
 #include "nsIContentSniffer.h"
@@ -566,9 +566,9 @@ private:
 
   nsCOMPtr<nsISupports> mContext;
 
   imgLoader* mImgLoader;
 
   bool mHadInsecureRedirect;
 };
 
-#endif // mozilla_image_src_imgLoader_h
+#endif // mozilla_image_imgLoader_h
rename from image/src/imgRequest.cpp
rename to image/imgRequest.cpp
rename from image/src/imgRequest.h
rename to image/imgRequest.h
--- a/image/src/imgRequest.h
+++ b/image/imgRequest.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_imgRequest_h
-#define mozilla_image_src_imgRequest_h
+#ifndef mozilla_image_imgRequest_h
+#define mozilla_image_imgRequest_h
 
 #include "nsIChannelEventSink.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIStreamListener.h"
 #include "nsIThreadRetargetableStreamListener.h"
 #include "nsIPrincipal.h"
 
 #include "nsAutoPtr.h"
@@ -274,9 +274,9 @@ private:
   bool mIsMultiPartChannel : 1;
   bool mGotData : 1;
   bool mIsInCache : 1;
   bool mDecodeRequested : 1;
   bool mNewPartPending : 1;
   bool mHadInsecureRedirect : 1;
 };
 
-#endif // mozilla_image_src_imgRequest_h
+#endif // mozilla_image_imgRequest_h
rename from image/src/imgRequestProxy.cpp
rename to image/imgRequestProxy.cpp
rename from image/src/imgRequestProxy.h
rename to image/imgRequestProxy.h
--- a/image/src/imgRequestProxy.h
+++ b/image/imgRequestProxy.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_imgRequestProxy_h
-#define mozilla_image_src_imgRequestProxy_h
+#ifndef mozilla_image_imgRequestProxy_h
+#define mozilla_image_imgRequestProxy_h
 
 #include "imgIRequest.h"
 #include "nsISecurityInfoProvider.h"
 
 #include "nsILoadGroup.h"
 #include "nsISupportsPriority.h"
 #include "nsITimedChannel.h"
 #include "nsCOMPtr.h"
@@ -238,9 +238,9 @@ public:
 protected:
   friend imgRequestProxy* NewStaticProxy(imgRequestProxy*);
 
   // Our principal. We have to cache it, rather than accessing the underlying
   // request on-demand, because static proxies don't have an underlying request.
   nsCOMPtr<nsIPrincipal> mPrincipal;
 };
 
-#endif // mozilla_image_src_imgRequestProxy_h
+#endif // mozilla_image_imgRequestProxy_h
rename from image/src/imgTools.cpp
rename to image/imgTools.cpp
rename from image/src/imgTools.h
rename to image/imgTools.h
--- a/image/src/imgTools.h
+++ b/image/imgTools.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_image_src_imgITools_h
-#define mozilla_image_src_imgITools_h
+#ifndef mozilla_image_imgITools_h
+#define mozilla_image_imgITools_h
 
 #include "imgITools.h"
 
 #define NS_IMGTOOLS_CID \
 { /* 3d8fa16d-c9e1-4b50-bdef-2c7ae249967a */         \
      0x3d8fa16d,                                     \
      0xc9e1,                                         \
      0x4b50,                                         \
@@ -23,9 +23,9 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_IMGITOOLS
 
   imgTools();
 
 private:
   virtual ~imgTools();
 };
-#endif // mozilla_image_src_imgITools_h
+#endif // mozilla_image_imgITools_h
--- a/image/moz.build
+++ b/image/moz.build
@@ -1,15 +1,15 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DIRS += ['build', 'src', 'decoders', 'encoders']
+DIRS += ['build', 'decoders', 'encoders']
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'ImageLib')
 
 BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
 
 MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
 
@@ -30,9 +30,77 @@ XPIDL_SOURCES += [
     'imgITools.idl',
     'nsIIconURI.idl',
 ]
 
 XPIDL_MODULE = 'imglib2'
 
 EXPORTS += [
     'ImageLogging.h',
+    'ImageOps.h',
+    'ImageRegion.h',
+    'imgLoader.h',
+    'imgRequest.h',
+    'imgRequestProxy.h',
+    'IProgressObserver.h',
+    'Orientation.h',
+    'SurfaceCache.h',
 ]
+
+UNIFIED_SOURCES += [
+    'ClippedImage.cpp',
+    'DecodePool.cpp',
+    'Decoder.cpp',
+    'DynamicImage.cpp',
+    'FrameAnimator.cpp',
+    'FrozenImage.cpp',
+    'Image.cpp',
+    'ImageFactory.cpp',
+    'ImageMetadata.cpp',
+    'ImageOps.cpp',
+    'ImageWrapper.cpp',
+    'imgFrame.cpp',
+    'imgTools.cpp',
+    'MultipartImage.cpp',
+    'OrientedImage.cpp',
+    'ScriptedNotificationObserver.cpp',
+    'ShutdownTracker.cpp',
+    'SourceBuffer.cpp',
+    'SurfaceCache.cpp',
+    'SVGDocumentWrapper.cpp',
+    'VectorImage.cpp',
+]
+if CONFIG['MOZ_ENABLE_SKIA']:
+    UNIFIED_SOURCES += [ 'Downscaler.cpp']
+
+# These files can't be unified because of ImageLogging.h #include order issues.
+SOURCES += [
+    'imgLoader.cpp',
+    'imgRequest.cpp',
+    'imgRequestProxy.cpp',
+    'ProgressTracker.cpp',
+    'RasterImage.cpp',
+]
+
+FAIL_ON_WARNINGS = True
+
+include('/ipc/chromium/chromium-config.mozbuild')
+
+FINAL_LIBRARY = 'xul'
+
+LOCAL_INCLUDES += [
+    # Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h"
+    '/dom/base',
+    '/dom/svg',
+    # Access to Skia headers for Downscaler
+    '/gfx/2d',
+    # We need to instantiate the decoders
+    '/image/decoders',
+    # Because VectorImage.cpp includes nsSVGUtils.h and nsSVGEffects.h
+    '/layout/svg',
+    # For URI-related functionality
+    '/netwerk/base',
+    # DecodePool uses thread-related facilities.
+    '/xpcom/threads',
+]
+
+# Because imgFrame.cpp includes "cairo.h"
+CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
deleted file mode 100644
--- a/image/src/moz.build
+++ /dev/null
@@ -1,76 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-EXPORTS += [
-    'ImageOps.h',
-    'ImageRegion.h',
-    'imgLoader.h',
-    'imgRequest.h',
-    'imgRequestProxy.h',
-    'IProgressObserver.h',
-    'Orientation.h',
-    'SurfaceCache.h',
-]
-
-UNIFIED_SOURCES += [
-    'ClippedImage.cpp',
-    'DecodePool.cpp',
-    'Decoder.cpp',
-    'DynamicImage.cpp',
-    'FrameAnimator.cpp',
-    'FrozenImage.cpp',
-    'Image.cpp',
-    'ImageFactory.cpp',
-    'ImageMetadata.cpp',
-    'ImageOps.cpp',
-    'ImageWrapper.cpp',
-    'imgFrame.cpp',
-    'imgTools.cpp',
-    'MultipartImage.cpp',
-    'OrientedImage.cpp',
-    'ScriptedNotificationObserver.cpp',
-    'ShutdownTracker.cpp',
-    'SourceBuffer.cpp',
-    'SurfaceCache.cpp',
-    'SVGDocumentWrapper.cpp',
-    'VectorImage.cpp',
-]
-if CONFIG['MOZ_ENABLE_SKIA']:
-    UNIFIED_SOURCES += [ 'Downscaler.cpp']
-
-# These files can't be unified because of ImageLogging.h #include order issues.
-SOURCES += [
-    'imgLoader.cpp',
-    'imgRequest.cpp',
-    'imgRequestProxy.cpp',
-    'ProgressTracker.cpp',
-    'RasterImage.cpp',
-]
-
-FAIL_ON_WARNINGS = True
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
-
-LOCAL_INCLUDES += [
-    # Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h"
-    '/dom/base',
-    '/dom/svg',
-    # Access to Skia headers for Downscaler
-    '/gfx/2d',
-    # We need to instantiate the decoders
-    '/image/decoders',
-    # Because VectorImage.cpp includes nsSVGUtils.h and nsSVGEffects.h
-    '/layout/svg',
-    # For URI-related functionality
-    '/netwerk/base',
-    # DecodePool uses thread-related facilities.
-    '/xpcom/threads',
-]
-
-# Because imgFrame.cpp includes "cairo.h"
-CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']