Bug 839528 - Change the namespace of xpidl dictionary helpers, r=khuey
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Mon, 11 Feb 2013 21:37:50 +0200
changeset 121510 98b4c33fc377e524511bc2b6b99acca7f0aa6fda
parent 121509 dcf53b7140cdc87a208fc5af576d16d7a007c2db
child 121511 36525224b14e8986c307530ed08724de5dd45c5d
child 121574 a356cb75873f3e9c78755fcb9e5a9923b21abaa4
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs839528
milestone21.0a1
Bug 839528 - Change the namespace of xpidl dictionary helpers, r=khuey
content/base/src/nsXMLHttpRequest.cpp
content/events/src/DOMWheelEvent.cpp
content/events/src/nsDOMEvent.cpp
content/events/src/nsDOMMouseEvent.cpp
content/events/src/nsDOMUIEvent.cpp
dom/camera/CameraControlImpl.cpp
dom/camera/CameraControlImpl.h
dom/camera/DOMCameraCapabilities.cpp
dom/camera/DOMCameraControl.cpp
dom/camera/DOMCameraManager.cpp
dom/camera/FallbackCameraControl.cpp
dom/camera/GonkCameraControl.cpp
dom/camera/GonkCameraControl.h
dom/camera/GonkRecorderProfiles.h
dom/camera/ICameraControl.h
dom/devicestorage/nsDeviceStorage.cpp
dom/file/ArchiveReader.h
dom/file/ArchiveZipEvent.cpp
dom/file/ArchiveZipEvent.h
dom/file/MetadataHelper.h
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/ipc/ContentParent.cpp
dom/sms/src/SmsRequest.cpp
dom/src/geolocation/nsGeolocation.cpp
dom/src/geolocation/nsGeolocation.h
js/xpconnect/src/dictionary_helper_gen.py
js/xpconnect/src/event_impl_gen.py
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -494,17 +494,17 @@ nsXMLHttpRequest::Initialize(nsISupports
     NS_ENSURE_SUCCESS(rv, rv);
   }
   return NS_OK;
 }
 
 nsresult
 nsXMLHttpRequest::InitParameters(JSContext* aCx, const jsval* aParams)
 {
-  XMLHttpRequestParameters params;
+  mozilla::idl::XMLHttpRequestParameters params;
   nsresult rv = params.Init(aCx, aParams);
   NS_ENSURE_SUCCESS(rv, rv);
 
   InitParameters(params.mozAnon, params.mozSystem);
   return NS_OK;
 }
 
 void
--- a/content/events/src/DOMWheelEvent.cpp
+++ b/content/events/src/DOMWheelEvent.cpp
@@ -119,17 +119,17 @@ DOMWheelEvent::GetDeltaMode(uint32_t* aD
   *aDeltaMode = static_cast<widget::WheelEvent*>(mEvent)->deltaMode;
   return NS_OK;
 }
 
 nsresult
 DOMWheelEvent::InitFromCtor(const nsAString& aType,
                             JSContext* aCx, jsval* aVal)
 {
-  WheelEventInit d;
+  mozilla::idl::WheelEventInit d;
   nsresult rv = d.Init(aCx, aVal);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString modifierList;
   if (d.ctrlKey) {
     modifierList.AppendLiteral(NS_DOM_KEYNAME_CONTROL);
   }
   if (d.shiftKey) {
--- a/content/events/src/nsDOMEvent.cpp
+++ b/content/events/src/nsDOMEvent.cpp
@@ -304,17 +304,17 @@ nsDOMEvent::Initialize(nsISupports* aOwn
   SetTrusted(trusted);
   return NS_OK;
 }
 
 nsresult
 nsDOMEvent::InitFromCtor(const nsAString& aType,
                          JSContext* aCx, jsval* aVal)
 {
-  mozilla::dom::EventInit d;
+  mozilla::idl::EventInit d;
   nsresult rv = d.Init(aCx, aVal);
   NS_ENSURE_SUCCESS(rv, rv);
   return InitEvent(aType, d.bubbles, d.cancelable);
 }
 
 NS_IMETHODIMP
 nsDOMEvent::GetEventPhase(uint16_t* aEventPhase)
 {
--- a/content/events/src/nsDOMMouseEvent.cpp
+++ b/content/events/src/nsDOMMouseEvent.cpp
@@ -149,17 +149,17 @@ nsDOMMouseEvent::InitMouseEvent(const ns
       return NS_ERROR_FAILURE;
   }
 }
 
 nsresult
 nsDOMMouseEvent::InitFromCtor(const nsAString& aType,
                               JSContext* aCx, jsval* aVal)
 {
-  mozilla::dom::MouseEventInit d;
+  mozilla::idl::MouseEventInit d;
   nsresult rv = d.Init(aCx, aVal);
   NS_ENSURE_SUCCESS(rv, rv);
   rv = InitMouseEvent(aType, d.bubbles, d.cancelable,
                       d.view, d.detail, d.screenX, d.screenY,
                       d.clientX, d.clientY, 
                       d.ctrlKey, d.altKey, d.shiftKey, d.metaKey,
                       d.button, d.relatedTarget);
   NS_ENSURE_SUCCESS(rv, rv);
--- a/content/events/src/nsDOMUIEvent.cpp
+++ b/content/events/src/nsDOMUIEvent.cpp
@@ -167,17 +167,17 @@ nsDOMUIEvent::InitUIEvent(const nsAStrin
 
   return NS_OK;
 }
 
 nsresult
 nsDOMUIEvent::InitFromCtor(const nsAString& aType,
                            JSContext* aCx, jsval* aVal)
 {
-  mozilla::dom::UIEventInit d;
+  mozilla::idl::UIEventInit d;
   nsresult rv = d.Init(aCx, aVal);
   NS_ENSURE_SUCCESS(rv, rv);
   return InitUIEvent(aType, d.bubbles, d.cancelable, d.view, d.detail);
 }
 
 // ---- nsDOMNSUIEvent implementation -------------------
 nsIntPoint
 nsDOMUIEvent::GetPagePoint()
--- a/dom/camera/CameraControlImpl.cpp
+++ b/dom/camera/CameraControlImpl.cpp
@@ -5,16 +5,17 @@
 #include "base/basictypes.h"
 #include "DOMCameraPreview.h"
 #include "CameraRecorderProfiles.h"
 #include "CameraControlImpl.h"
 #include "CameraCommon.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
+using namespace mozilla::idl;
 
 CameraControlImpl::CameraControlImpl(uint32_t aCameraId, nsIThread* aCameraThread, uint64_t aWindowId)
   : mCameraId(aCameraId)
   , mCameraThread(aCameraThread)
   , mWindowId(aWindowId)
   , mFileFormat()
   , mMaxMeteringAreas(0)
   , mMaxFocusAreas(0)
--- a/dom/camera/CameraControlImpl.h
+++ b/dom/camera/CameraControlImpl.h
@@ -43,24 +43,24 @@ class CameraControlImpl : public ICamera
   friend class SetParameterTask;
   friend class GetParameterTask;
   friend class GetPreviewStreamVideoModeTask;
   friend class ReleaseHardwareTask;
 
 public:
   CameraControlImpl(uint32_t aCameraId, nsIThread* aCameraThread, uint64_t aWindowId);
 
-  nsresult GetPreviewStream(dom::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
+  nsresult GetPreviewStream(idl::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
   nsresult StartPreview(DOMCameraPreview* aDOMPreview);
   void StopPreview();
   nsresult AutoFocus(nsICameraAutoFocusCallback* onSuccess, nsICameraErrorCallback* onError);
-  nsresult TakePicture(dom::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, dom::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError);
-  nsresult StartRecording(dom::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError);
+  nsresult TakePicture(idl::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, idl::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError);
+  nsresult StartRecording(idl::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError);
   nsresult StopRecording();
-  nsresult GetPreviewStreamVideoMode(dom::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
+  nsresult GetPreviewStreamVideoMode(idl::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
   nsresult ReleaseHardware(nsICameraReleaseCallback* onSuccess, nsICameraErrorCallback* onError);
 
   nsresult Set(uint32_t aKey, const nsAString& aValue);
   nsresult Get(uint32_t aKey, nsAString& aValue);
   nsresult Set(uint32_t aKey, double aValue);
   nsresult Get(uint32_t aKey, double* aValue);
   nsresult Set(JSContext* aCx, uint32_t aKey, const JS::Value& aValue, uint32_t aLimit);
   nsresult Get(JSContext* aCx, uint32_t aKey, JS::Value* aValue);
@@ -82,22 +82,22 @@ public:
   }
 
   already_AddRefed<RecorderProfileManager> GetRecorderProfileManager();
   uint32_t GetCameraId() { return mCameraId; }
 
   virtual const char* GetParameter(const char* aKey) = 0;
   virtual const char* GetParameterConstChar(uint32_t aKey) = 0;
   virtual double GetParameterDouble(uint32_t aKey) = 0;
-  virtual void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions) = 0;
+  virtual void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions) = 0;
   virtual void SetParameter(const char* aKey, const char* aValue) = 0;
   virtual void SetParameter(uint32_t aKey, const char* aValue) = 0;
   virtual void SetParameter(uint32_t aKey, double aValue) = 0;
-  virtual void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions) = 0;
-  virtual nsresult GetVideoSizes(nsTArray<dom::CameraSize>& aVideoSizes) = 0;
+  virtual void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions) = 0;
+  virtual nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes) = 0;
   virtual nsresult PushParameters() = 0;
   virtual void Shutdown();
 
   bool ReceiveFrame(void* aBuffer, ImageFormat aFormat, FrameBuilder aBuilder);
   void OnShutter();
   void OnClosed();
   void OnRecorderStateChange(const nsString& aStateMsg, int32_t aStatus, int32_t aTrackNumber);
 
@@ -212,17 +212,17 @@ protected:
   nsMainThreadPtrHandle<nsICameraPreviewStreamCallback> mOnSuccessCb;
   uint64_t mWindowId;
 };
 
 // Get the desired preview stream.
 class GetPreviewStreamTask : public nsRunnable
 {
 public:
-  GetPreviewStreamTask(CameraControlImpl* aCameraControl, dom::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
+  GetPreviewStreamTask(CameraControlImpl* aCameraControl, idl::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
     : mSize(aSize)
     , mCameraControl(aCameraControl)
     , mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraPreviewStreamCallback>(onSuccess))
     , mOnErrorCb(new nsMainThreadPtrHolder<nsICameraErrorCallback>(onError))
   {
     DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
   }
 
@@ -238,17 +238,17 @@ public:
     if (NS_FAILED(rv)) {
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     return rv;
   }
 
-  dom::CameraSize mSize;
+  idl::CameraSize mSize;
   nsRefPtr<CameraControlImpl> mCameraControl;
   nsMainThreadPtrHandle<nsICameraPreviewStreamCallback> mOnSuccessCb;
   nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
 };
 
 // Return the autofocus status to JS.  Runs on the main thread.
 class AutoFocusResult : public nsRunnable
 {
@@ -356,17 +356,17 @@ protected:
   nsMainThreadPtrHandle<nsICameraTakePictureCallback> mOnSuccessCb;
   uint64_t mWindowId;
 };
 
 // Capture a still image with the camera.
 class TakePictureTask : public nsRunnable
 {
 public:
-  TakePictureTask(CameraControlImpl* aCameraControl, bool aCancel, dom::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, dom::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError)
+  TakePictureTask(CameraControlImpl* aCameraControl, bool aCancel, idl::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, idl::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError)
     : mCameraControl(aCameraControl)
     , mCancel(aCancel)
     , mSize(aSize)
     , mRotation(aRotation)
     , mFileFormat(aFileFormat)
     , mPosition(aPosition)
     , mDateTime(aDateTime)
     , mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraTakePictureCallback>(onSuccess))
@@ -391,20 +391,20 @@ public:
       rv = NS_DispatchToMainThread(cameraErrorResult);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     return rv;
   }
 
   nsRefPtr<CameraControlImpl> mCameraControl;
   bool mCancel;
-  dom::CameraSize mSize;
+  idl::CameraSize mSize;
   int32_t mRotation;
   nsString mFileFormat;
-  dom::CameraPosition mPosition;
+  idl::CameraPosition mPosition;
   uint64_t mDateTime;
   nsMainThreadPtrHandle<nsICameraTakePictureCallback> mOnSuccessCb;
   nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
 };
 
 // Return the result of starting recording.  Runs on the main thread.
 class StartRecordingResult : public nsRunnable
 {
@@ -430,17 +430,17 @@ protected:
   nsMainThreadPtrHandle<nsICameraStartRecordingCallback> mOnSuccessCb;
   uint64_t mWindowId;
 };
 
 // Start video recording.
 class StartRecordingTask : public nsRunnable
 {
 public:
-  StartRecordingTask(CameraControlImpl* aCameraControl, dom::CameraStartRecordingOptions aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId)
+  StartRecordingTask(CameraControlImpl* aCameraControl, idl::CameraStartRecordingOptions aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId)
     : mCameraControl(aCameraControl)
     , mOptions(aOptions)
     , mFolder(aFolder)
     , mFilename(aFilename)
     , mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraStartRecordingCallback>(onSuccess))
     , mOnErrorCb(new nsMainThreadPtrHolder<nsICameraErrorCallback>(onError))
     , mWindowId(aWindowId)
   {
@@ -468,17 +468,17 @@ public:
     rv = NS_DispatchToMainThread(startRecordingResult);
     if (NS_FAILED(rv)) {
       DOM_CAMERA_LOGE("Failed to dispatch start recording result to main thread (%d)!", rv);
     }
     return rv;
   }
 
   nsRefPtr<CameraControlImpl> mCameraControl;
-  dom::CameraStartRecordingOptions mOptions;
+  idl::CameraStartRecordingOptions mOptions;
   nsCOMPtr<nsIFile> mFolder;
   nsString mFilename;
   nsMainThreadPtrHandle<nsICameraStartRecordingCallback> mOnSuccessCb;
   nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
   uint64_t mWindowId;
 };
 
 // Stop video recording.
@@ -565,17 +565,17 @@ public:
 
   nsRefPtr<CameraControlImpl> mCameraControl;
 };
 
 // Get the video mode preview stream.
 class GetPreviewStreamVideoModeTask : public nsRunnable
 {
 public:
-  GetPreviewStreamVideoModeTask(CameraControlImpl* aCameraControl, dom::CameraRecorderOptions aOptions,  nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
+  GetPreviewStreamVideoModeTask(CameraControlImpl* aCameraControl, idl::CameraRecorderOptions aOptions,  nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
     : mCameraControl(aCameraControl)
     , mOptions(aOptions)
     , mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraPreviewStreamCallback>(onSuccess))
     , mOnErrorCb(new nsMainThreadPtrHolder<nsICameraErrorCallback>(onError))
   { }
 
   NS_IMETHOD Run()
   {
@@ -587,17 +587,17 @@ public:
       nsCOMPtr<nsIRunnable> cameraErrorResult = new CameraErrorResult(mOnErrorCb, NS_LITERAL_STRING("FAILURE"), mCameraControl->GetWindowId());
       rv = NS_DispatchToMainThread(cameraErrorResult);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     return NS_OK;
   }
 
   nsRefPtr<CameraControlImpl> mCameraControl;
-  dom::CameraRecorderOptions mOptions;
+  idl::CameraRecorderOptions mOptions;
   nsMainThreadPtrHandle<nsICameraPreviewStreamCallback> mOnSuccessCb;
   nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
 };
 
 // Return the result of releasing the camera hardware.  Runs on the main thread.
 class ReleaseHardwareResult : public nsRunnable
 {
 public:
--- a/dom/camera/DOMCameraCapabilities.cpp
+++ b/dom/camera/DOMCameraCapabilities.cpp
@@ -345,17 +345,17 @@ DOMCameraCapabilities::GetZoomRatios(JSC
 }
 
 /* readonly attribute jsval videoSizes; */
 NS_IMETHODIMP
 DOMCameraCapabilities::GetVideoSizes(JSContext* cx, JS::Value* aVideoSizes)
 {
   NS_ENSURE_TRUE(mCamera, NS_ERROR_NOT_AVAILABLE);
 
-  nsTArray<CameraSize> sizes;
+  nsTArray<mozilla::idl::CameraSize> sizes;
   nsresult rv = mCamera->GetVideoSizes(sizes);
   NS_ENSURE_SUCCESS(rv, rv);
   if (sizes.Length() == 0) {
     // video recording not supported, return a null object
     *aVideoSizes = JSVAL_NULL;
     return NS_OK;
   }
 
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -239,17 +239,17 @@ nsDOMCameraControl::SetOnRecorderStateCh
 
 /* [implicit_jscontext] void startRecording (in jsval aOptions, in nsIDOMDeviceStorage storageArea, in DOMString filename, in nsICameraStartRecordingCallback onSuccess, [optional] in nsICameraErrorCallback onError); */
 NS_IMETHODIMP
 nsDOMCameraControl::StartRecording(const JS::Value& aOptions, nsIDOMDeviceStorage* storageArea, const nsAString& filename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError, JSContext* cx)
 {
   NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
   NS_ENSURE_TRUE(storageArea, NS_ERROR_INVALID_ARG);
 
-  CameraStartRecordingOptions options;
+  mozilla::idl::CameraStartRecordingOptions options;
 
   // Default values, until the dictionary parser can handle them.
   options.rotation = 0;
   options.maxFileSizeBytes = 0;
   options.maxVideoLengthMs = 0;
   nsresult rv = options.Init(cx, &aOptions);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -316,17 +316,17 @@ nsDOMCameraControl::StopRecording()
 }
 
 /* [implicit_jscontext] void getPreviewStream (in jsval aOptions, in nsICameraPreviewStreamCallback onSuccess, [optional] in nsICameraErrorCallback onError); */
 NS_IMETHODIMP
 nsDOMCameraControl::GetPreviewStream(const JS::Value& aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError, JSContext* cx)
 {
   NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
 
-  CameraSize size;
+  mozilla::idl::CameraSize size;
   nsresult rv = size.Init(cx, &aOptions);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return mCameraControl->GetPreviewStream(size, onSuccess, onError);
 }
 
 /* void resumePreview(); */
 NS_IMETHODIMP
@@ -344,19 +344,19 @@ nsDOMCameraControl::AutoFocus(nsICameraA
 }
 
 /* void takePicture (in jsval aOptions, in nsICameraTakePictureCallback onSuccess, [optional] in nsICameraErrorCallback onError); */
 NS_IMETHODIMP
 nsDOMCameraControl::TakePicture(const JS::Value& aOptions, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError, JSContext* cx)
 {
   NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
 
-  CameraPictureOptions  options;
-  CameraSize            size;
-  CameraPosition        pos;
+  mozilla::idl::CameraPictureOptions options;
+  mozilla::idl::CameraSize           size;
+  mozilla::idl::CameraPosition       pos;
 
   nsresult rv = options.Init(cx, &aOptions);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = size.Init(cx, &options.pictureSize);
   NS_ENSURE_SUCCESS(rv, rv);
 
   /**
@@ -374,17 +374,17 @@ nsDOMCameraControl::TakePicture(const JS
 }
 
 /* [implicit_jscontext] void GetPreviewStreamVideoMode (in jsval aOptions, in nsICameraPreviewStreamCallback onSuccess, [optional] in nsICameraErrorCallback onError); */
 NS_IMETHODIMP
 nsDOMCameraControl::GetPreviewStreamVideoMode(const JS::Value& aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError, JSContext* cx)
 {
   NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
 
-  CameraRecorderOptions options;
+  mozilla::idl::CameraRecorderOptions options;
   nsresult rv = options.Init(cx, &aOptions);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return mCameraControl->GetPreviewStreamVideoMode(&options, onSuccess, onError);
 }
 
 NS_IMETHODIMP
 nsDOMCameraControl::ReleaseHardware(nsICameraReleaseCallback* onSuccess, nsICameraErrorCallback* onError)
--- a/dom/camera/DOMCameraManager.cpp
+++ b/dom/camera/DOMCameraManager.cpp
@@ -103,17 +103,17 @@ nsDOMCameraManager::CheckPermissionAndCr
 
 /* [implicit_jscontext] void getCamera ([optional] in jsval aOptions, in nsICameraGetCameraCallback onSuccess, [optional] in nsICameraErrorCallback onError); */
 NS_IMETHODIMP
 nsDOMCameraManager::GetCamera(const JS::Value& aOptions, nsICameraGetCameraCallback* onSuccess, nsICameraErrorCallback* onError, JSContext* cx)
 {
   NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
 
   uint32_t cameraId = 0;  // back (or forward-facing) camera by default
-  CameraSelector selector;
+  mozilla::idl::CameraSelector selector;
 
   nsresult rv = selector.Init(cx, &aOptions);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (selector.camera.EqualsASCII("front")) {
     cameraId = 1;
   }
 
--- a/dom/camera/FallbackCameraControl.cpp
+++ b/dom/camera/FallbackCameraControl.cpp
@@ -19,22 +19,22 @@ class RecorderProfileManager;
 class nsFallbackCameraControl : public CameraControlImpl
 {
 public:
   nsFallbackCameraControl(uint32_t aCameraId, nsIThread* aCameraThread, nsDOMCameraControl* aDOMCameraControl, nsICameraGetCameraCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId);
 
   const char* GetParameter(const char* aKey);
   const char* GetParameterConstChar(uint32_t aKey);
   double GetParameterDouble(uint32_t aKey);
-  void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions);
+  void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions);
   void SetParameter(const char* aKey, const char* aValue);
   void SetParameter(uint32_t aKey, const char* aValue);
   void SetParameter(uint32_t aKey, double aValue);
-  void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions);
-  nsresult GetVideoSizes(nsTArray<CameraSize>& aVideoSizes);
+  void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions);
+  nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes);
   nsresult PushParameters();
 
 protected:
   ~nsFallbackCameraControl();
 
   nsresult GetPreviewStreamImpl(GetPreviewStreamTask* aGetPreviewStream);
   nsresult StartPreviewImpl(StartPreviewTask* aStartPreview);
   nsresult StopPreviewImpl(StopPreviewTask* aStopPreview);
@@ -92,17 +92,17 @@ nsFallbackCameraControl::GetParameterCon
 
 double
 nsFallbackCameraControl::GetParameterDouble(uint32_t aKey)
 {
   return NAN;
 }
 
 void
-nsFallbackCameraControl::GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions)
+nsFallbackCameraControl::GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions)
 {
 }
 
 void
 nsFallbackCameraControl::SetParameter(const char* aKey, const char* aValue)
 {
 }
 
@@ -112,17 +112,17 @@ nsFallbackCameraControl::SetParameter(ui
 }
 
 void
 nsFallbackCameraControl::SetParameter(uint32_t aKey, double aValue)
 {
 }
 
 void
-nsFallbackCameraControl::SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions)
+nsFallbackCameraControl::SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions)
 {
 }
 
 nsresult
 nsFallbackCameraControl::PushParameters()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
@@ -177,17 +177,17 @@ nsFallbackCameraControl::PushParametersI
 
 nsresult
 nsFallbackCameraControl::PullParametersImpl()
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsresult
-nsFallbackCameraControl::GetVideoSizes(nsTArray<CameraSize>& aVideoSizes)
+nsFallbackCameraControl::GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 already_AddRefed<RecorderProfileManager> 
 nsFallbackCameraControl::GetRecorderProfileManagerImpl()
 {
   return nullptr;
--- a/dom/camera/GonkCameraControl.cpp
+++ b/dom/camera/GonkCameraControl.cpp
@@ -400,17 +400,18 @@ nsGonkCameraControl::GetParameterDouble(
       return val;
 
     default:
       return mParams.getFloat(key);
   }
 }
 
 void
-nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraRegion>& aRegions)
+nsGonkCameraControl::GetParameter(uint32_t aKey,
+                                  nsTArray<idl::CameraRegion>& aRegions)
 {
   aRegions.Clear();
 
   const char* key = getKeyText(aKey);
   if (!key) {
     return;
   }
 
@@ -427,50 +428,51 @@ nsGonkCameraControl::GetParameter(uint32
 
   // count the number of regions in the string
   while ((p = strstr(p, "),("))) {
     ++count;
     p += 3;
   }
 
   aRegions.SetCapacity(count);
-  CameraRegion* r;
+  idl::CameraRegion* r;
 
   // parse all of the region sets
   uint32_t i;
   for (i = 0, p = value; p && i < count; ++i, p = strchr(p + 1, '(')) {
     r = aRegions.AppendElement();
     if (sscanf(p, "(%d,%d,%d,%d,%u)", &r->top, &r->left, &r->bottom, &r->right, &r->weight) != 5) {
       DOM_CAMERA_LOGE("%s:%d : region tuple has bad format: '%s'\n", __func__, __LINE__, p);
       aRegions.Clear();
       return;
     }
   }
 
   return;
 }
 
 void
-nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraSize>& aSizes)
+nsGonkCameraControl::GetParameter(uint32_t aKey,
+                                  nsTArray<idl::CameraSize>& aSizes)
 {
   const char* key = getKeyText(aKey);
   if (!key) {
     return;
   }
 
   RwAutoLockRead lock(mRwLock);
 
   const char* value = mParams.get(key);
   DOM_CAMERA_LOGI("key='%s' --> value='%s'\n", key, value);
   if (!value) {
     return;
   }
 
   const char* p = value;
-  CameraSize* s;
+  idl::CameraSize* s;
 
   // The 'value' string is in the format "w1xh1,w2xh2,w3xh3,..."
   while (p) {
     s = aSizes.AppendElement();
     if (sscanf(p, "%dx%d", &s->width, &s->height) != 2) {
       DOM_CAMERA_LOGE("%s:%d : size tuple has bad format: '%s'\n", __func__, __LINE__, p);
       aSizes.Clear();
       return;
@@ -558,17 +560,18 @@ nsGonkCameraControl::SetParameter(uint32
     } else {
       mParams.setFloat(key, aValue);
     }
   }
   PushParameters();
 }
 
 void
-nsGonkCameraControl::SetParameter(uint32_t aKey, const nsTArray<CameraRegion>& aRegions)
+nsGonkCameraControl::SetParameter(uint32_t aKey,
+                                  const nsTArray<idl::CameraRegion>& aRegions)
 {
   const char* key = getKeyText(aKey);
   if (!key) {
     return;
   }
 
   uint32_t length = aRegions.Length();
 
@@ -577,17 +580,17 @@ nsGonkCameraControl::SetParameter(uint32
     mParams.set(key, "(0,0,0,0,0)");
     PushParameters();
     return;
   }
 
   nsCString s;
 
   for (uint32_t i = 0; i < length; ++i) {
-    const CameraRegion* r = &aRegions[i];
+    const idl::CameraRegion* r = &aRegions[i];
     s.AppendPrintf("(%d,%d,%d,%d,%d),", r->top, r->left, r->bottom, r->right, r->weight);
   }
 
   // remove the trailing comma
   s.Trim(",", false, true, true);
 
   DOM_CAMERA_LOGI("camera region string '%s'\n", s.get());
 
@@ -698,17 +701,17 @@ void
 nsGonkCameraControl::SetupThumbnail(uint32_t aPictureWidth, uint32_t aPictureHeight, uint32_t aPercentQuality)
 {
   /**
    * Use the smallest non-0x0 thumbnail size that matches
    *  the aspect ratio of our parameters...
    */
   uint32_t smallestArea = UINT_MAX;
   uint32_t smallestIndex = UINT_MAX;
-  nsAutoTArray<CameraSize, 8> thumbnailSizes;
+  nsAutoTArray<idl::CameraSize, 8> thumbnailSizes;
   GetParameter(CAMERA_PARAM_SUPPORTED_JPEG_THUMBNAIL_SIZES, thumbnailSizes);
 
   for (uint32_t i = 0; i < thumbnailSizes.Length(); ++i) {
     uint32_t area = thumbnailSizes[i].width * thumbnailSizes[i].height;
     if (area != 0
       && area < smallestArea
       && thumbnailSizes[i].width * aPictureHeight / thumbnailSizes[i].height == aPictureWidth
     ) {
@@ -1339,17 +1342,17 @@ nsGonkCameraControl::ReleaseHardwareImpl
 
   return NS_OK;
 }
 
 already_AddRefed<GonkRecorderProfileManager>
 nsGonkCameraControl::GetGonkRecorderProfileManager()
 {
   if (!mProfileManager) {
-    nsTArray<CameraSize> sizes;
+    nsTArray<idl::CameraSize> sizes;
     nsresult rv = GetVideoSizes(sizes);
     NS_ENSURE_SUCCESS(rv, nullptr);
 
     mProfileManager = new GonkRecorderProfileManager(mCameraId);
     mProfileManager->SetSupportedResolutions(sizes);
   }
 
   nsRefPtr<GonkRecorderProfileManager> profileMgr = mProfileManager;
@@ -1359,34 +1362,34 @@ nsGonkCameraControl::GetGonkRecorderProf
 already_AddRefed<RecorderProfileManager>
 nsGonkCameraControl::GetRecorderProfileManagerImpl()
 {
   nsRefPtr<RecorderProfileManager> profileMgr = GetGonkRecorderProfileManager();
   return profileMgr.forget();
 }
 
 nsresult
-nsGonkCameraControl::GetVideoSizes(nsTArray<CameraSize>& aVideoSizes)
+nsGonkCameraControl::GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes)
 {
   aVideoSizes.Clear();
 
   Vector<Size> sizes;
   mParams.getSupportedVideoSizes(sizes);
   if (sizes.size() == 0) {
     DOM_CAMERA_LOGI("Camera doesn't support video independent of the preview\n");
     mParams.getSupportedPreviewSizes(sizes);
   }
 
   if (sizes.size() == 0) {
     DOM_CAMERA_LOGW("Camera doesn't report any supported video sizes at all\n");
     return NS_OK;
   }
 
   for (size_t i = 0; i < sizes.size(); ++i) {
-    CameraSize size;
+    idl::CameraSize size;
     size.width = sizes[i].width;
     size.height = sizes[i].height;
     aVideoSizes.AppendElement(size);
   }
   return NS_OK;
 }
 
 // Gonk callback handlers.
--- a/dom/camera/GonkCameraControl.h
+++ b/dom/camera/GonkCameraControl.h
@@ -40,24 +40,24 @@ class nsGonkCameraControl : public Camer
 {
 public:
   nsGonkCameraControl(uint32_t aCameraId, nsIThread* aCameraThread, nsDOMCameraControl* aDOMCameraControl, nsICameraGetCameraCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId);
   nsresult Init();
 
   const char* GetParameter(const char* aKey);
   const char* GetParameterConstChar(uint32_t aKey);
   double GetParameterDouble(uint32_t aKey);
-  void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions);
-  void GetParameter(uint32_t aKey, nsTArray<dom::CameraSize>& aSizes);
+  void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions);
+  void GetParameter(uint32_t aKey, nsTArray<idl::CameraSize>& aSizes);
   void SetParameter(const char* aKey, const char* aValue);
   void SetParameter(uint32_t aKey, const char* aValue);
   void SetParameter(uint32_t aKey, double aValue);
-  void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions);
+  void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions);
   void SetParameter(uint32_t aKey, int aValue);
-  nsresult GetVideoSizes(nsTArray<dom::CameraSize>& aVideoSizes);
+  nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes);
   nsresult PushParameters();
 
   void AutoFocusComplete(bool aSuccess);
   void TakePictureComplete(uint8_t* aData, uint32_t aLength);
   void HandleRecorderEvent(int msg, int ext1, int ext2);
 
 protected:
   ~nsGonkCameraControl();
--- a/dom/camera/GonkRecorderProfiles.h
+++ b/dom/camera/GonkRecorderProfiles.h
@@ -81,17 +81,17 @@ class GonkRecorderProfileManager : publi
 public:
   GonkRecorderProfileManager(uint32_t aCameraId);
 
   /**
    * Call this function to indicate that the specified resolutions are in fact
    * supported by the camera hardware.  (Just because it appears in a recorder
    * profile doesn't mean the hardware can handle it.)
    */
-  void SetSupportedResolutions(const nsTArray<dom::CameraSize>& aSizes)
+  void SetSupportedResolutions(const nsTArray<idl::CameraSize>& aSizes)
     { mSupportedSizes = aSizes; }
 
   /**
    * Call this function to remove all resolutions set by calling
    * SetSupportedResolutions().
    */
   void ClearSupportedResolutions() { mSupportedSizes.Clear(); }
 
@@ -99,14 +99,14 @@ public:
 
   already_AddRefed<RecorderProfile> Get(uint32_t aQualityIndex) const;
   already_AddRefed<GonkRecorderProfile> Get(const char* aProfileName) const;
   nsresult ConfigureRecorder(android::GonkRecorder* aRecorder);
 
 protected:
   virtual ~GonkRecorderProfileManager();
 
-  nsTArray<dom::CameraSize> mSupportedSizes;
+  nsTArray<idl::CameraSize> mSupportedSizes;
 };
 
 }; // namespace mozilla
 
 #endif // DOM_CAMERA_GONK_RECORDER_PROFILES_H
--- a/dom/camera/ICameraControl.h
+++ b/dom/camera/ICameraControl.h
@@ -17,52 +17,52 @@ namespace mozilla {
 class DOMCameraPreview;
 class RecorderProfileManager;
 
 class ICameraControl
 {
 public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ICameraControl)
 
-  virtual nsresult GetPreviewStream(dom::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
+  virtual nsresult GetPreviewStream(idl::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
   virtual nsresult StartPreview(DOMCameraPreview* aDOMPreview) = 0;
   virtual void StopPreview() = 0;
   virtual nsresult AutoFocus(nsICameraAutoFocusCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
-  virtual nsresult TakePicture(dom::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, dom::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
-  virtual nsresult StartRecording(dom::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
+  virtual nsresult TakePicture(idl::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, idl::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
+  virtual nsresult StartRecording(idl::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
   virtual nsresult StopRecording() = 0;
-  virtual nsresult GetPreviewStreamVideoMode(dom::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
+  virtual nsresult GetPreviewStreamVideoMode(idl::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
   virtual nsresult ReleaseHardware(nsICameraReleaseCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
 
   virtual nsresult Set(uint32_t aKey, const nsAString& aValue) = 0;
   virtual nsresult Get(uint32_t aKey, nsAString& aValue) = 0;
   virtual nsresult Set(uint32_t aKey, double aValue) = 0;
   virtual nsresult Get(uint32_t aKey, double* aValue) = 0;
   virtual nsresult Set(JSContext* aCx, uint32_t aKey, const JS::Value& aValue, uint32_t aLimit) = 0;
   virtual nsresult Get(JSContext* aCx, uint32_t aKey, JS::Value* aValue) = 0;
   virtual nsresult Set(nsICameraShutterCallback* aOnShutter) = 0;
   virtual nsresult Get(nsICameraShutterCallback** aOnShutter) = 0;
   virtual nsresult Set(nsICameraClosedCallback* aOnClosed) = 0;
   virtual nsresult Get(nsICameraClosedCallback** aOnClosed) = 0;
   virtual nsresult Set(nsICameraRecorderStateChange* aOnRecorderStateChange) = 0;
   virtual nsresult Get(nsICameraRecorderStateChange** aOnRecorderStateChange) = 0;
   virtual nsresult SetFocusAreas(JSContext* aCx, const JS::Value& aValue) = 0;
   virtual nsresult SetMeteringAreas(JSContext* aCx, const JS::Value& aValue) = 0;
-  virtual nsresult GetVideoSizes(nsTArray<dom::CameraSize>& aVideoSizes) = 0;
+  virtual nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes) = 0;
   virtual already_AddRefed<RecorderProfileManager> GetRecorderProfileManager() = 0;
   virtual uint32_t GetCameraId() = 0;
 
   virtual const char* GetParameter(const char* aKey) = 0;
   virtual const char* GetParameterConstChar(uint32_t aKey) = 0;
   virtual double GetParameterDouble(uint32_t aKey) = 0;
-  virtual void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions) = 0;
+  virtual void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions) = 0;
   virtual void SetParameter(const char* aKey, const char* aValue) = 0;
   virtual void SetParameter(uint32_t aKey, const char* aValue) = 0;
   virtual void SetParameter(uint32_t aKey, double aValue) = 0;
-  virtual void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions) = 0;
+  virtual void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions) = 0;
 
   virtual void Shutdown() = 0;
 
 protected:
   virtual ~ICameraControl() { }
 };
 
 } // namespace mozilla
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -2156,17 +2156,17 @@ nsDOMDeviceStorage::EnumerateEditable(co
   return EnumerateInternal(aName, aOptions, aCx, aArgc, true, aRetval);
 }
 
 
 static PRTime
 ExtractDateFromOptions(JSContext* aCx, const JS::Value& aOptions)
 {
   PRTime result = 0;
-  DeviceStorageEnumerationParameters params;
+  mozilla::idl::DeviceStorageEnumerationParameters params;
   if (!JSVAL_IS_VOID(aOptions) && !aOptions.isNull()) {
     nsresult rv = params.Init(aCx, &aOptions);
     if (NS_SUCCEEDED(rv) && !JSVAL_IS_VOID(params.since) && !params.since.isNull() && params.since.isObject()) {
       JSObject* obj = JSVAL_TO_OBJECT(params.since);
       if (JS_ObjectIsDate(aCx, obj) && js_DateIsValid(obj)) {
         result = js_DateGetMsecSinceEpoch(obj);
       }
     }
--- a/dom/file/ArchiveReader.h
+++ b/dom/file/ArchiveReader.h
@@ -92,14 +92,14 @@ protected:
   nsTArray<nsRefPtr<ArchiveRequest> > mRequests;
 
   // Everything related to the blobs and the status:
   struct {
     nsTArray<nsCOMPtr<nsIDOMFile> > fileList;
     nsresult status;
   } mData;
 
-  ArchiveReaderOptions mOptions;
+  mozilla::idl::ArchiveReaderOptions mOptions;
 };
 
 END_FILE_NAMESPACE
 
 #endif // mozilla_dom_file_domarchivereader_h__
--- a/dom/file/ArchiveZipEvent.cpp
+++ b/dom/file/ArchiveZipEvent.cpp
@@ -17,17 +17,17 @@ using namespace mozilla::dom;
 USING_FILE_NAMESPACE
 
 #ifndef PATH_MAX
 #  define PATH_MAX 65536 // The filename length is stored in 2 bytes
 #endif
 
 ArchiveZipItem::ArchiveZipItem(const char* aFilename,
                                const ZipCentral& aCentralStruct,
-                               const ArchiveReaderOptions& aOptions)
+                               const mozilla::idl::ArchiveReaderOptions& aOptions)
 : mFilename(aFilename),
   mCentralStruct(aCentralStruct),
   mOptions(aOptions)
 {
   MOZ_COUNT_CTOR(ArchiveZipItem);
 }
 
 ArchiveZipItem::~ArchiveZipItem()
@@ -106,17 +106,17 @@ uint16_t
 ArchiveZipItem::StrToInt16(const uint8_t* aStr)
 {
   return (uint16_t) ((aStr [0]) | (aStr [1] << 8));
 }
 
 // ArchiveReaderZipEvent
 
 ArchiveReaderZipEvent::ArchiveReaderZipEvent(ArchiveReader* aArchiveReader,
-                                             const ArchiveReaderOptions& aOptions)
+                                             const mozilla::idl::ArchiveReaderOptions& aOptions)
 : ArchiveReaderEvent(aArchiveReader),
   mOptions(aOptions)
 {
 }
 
 // NOTE: this runs in a different thread!!
 nsresult
 ArchiveReaderZipEvent::Exec()
--- a/dom/file/ArchiveZipEvent.h
+++ b/dom/file/ArchiveZipEvent.h
@@ -19,17 +19,17 @@ BEGIN_FILE_NAMESPACE
 /**
  * ArchiveZipItem - ArchiveItem for ArchiveReaderZipEvent
  */
 class ArchiveZipItem : public ArchiveItem
 {
 public:
   ArchiveZipItem(const char* aFilename,
                  const ZipCentral& aCentralStruct,
-                 const ArchiveReaderOptions& aOptions);
+                 const mozilla::idl::ArchiveReaderOptions& aOptions);
   virtual ~ArchiveZipItem();
 
   nsresult GetFilename(nsString& aFilename);
 
   // From zipItem to DOMFile:
   virtual nsIDOMFile* File(ArchiveReader* aArchiveReader);
 
 public: // for the event
@@ -40,30 +40,30 @@ private:
   nsresult ConvertFilename();
 
 private: // data
   nsCString mFilename;
 
   nsString mFilenameU;
   ZipCentral mCentralStruct;
 
-  ArchiveReaderOptions mOptions;
+  mozilla::idl::ArchiveReaderOptions mOptions;
 };
 
 /**
  * ArchiveReaderEvent implements the ArchiveReaderEvent for the ZIP format
  */
 class ArchiveReaderZipEvent : public ArchiveReaderEvent
 {
 public:
   ArchiveReaderZipEvent(ArchiveReader* aArchiveReader,
-                        const ArchiveReaderOptions& aOptions);
+                        const mozilla::idl::ArchiveReaderOptions& aOptions);
 
   nsresult Exec();
 
 private:
-  ArchiveReaderOptions mOptions;
+  mozilla::idl::ArchiveReaderOptions mOptions;
 };
 
 END_FILE_NAMESPACE
 
 #endif // mozilla_dom_file_domarchivezipevent_h__
 
--- a/dom/file/MetadataHelper.h
+++ b/dom/file/MetadataHelper.h
@@ -68,17 +68,17 @@ public:
 
   int64_t
   LastModified() const
   {
     return mLastModified;
   }
 
 private:
-  DOMFileMetadataParameters mConfig;
+  mozilla::idl::DOMFileMetadataParameters mConfig;
 
   uint64_t mSize;
   int64_t mLastModified;
 };
 
 class MetadataHelper : public FileHelper
 {
 public:
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -500,17 +500,17 @@ IDBDatabase::CreateObjectStore(const nsA
 
   if (!transaction ||
       transaction->GetMode() != IDBTransaction::VERSION_CHANGE) {
     return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
   }
 
   DatabaseInfo* databaseInfo = transaction->DBInfo();
 
-  mozilla::dom::IDBObjectStoreParameters params;
+  mozilla::idl::IDBObjectStoreParameters params;
   KeyPath keyPath(0);
 
   nsresult rv;
 
   if (!JSVAL_IS_VOID(aOptions) && !JSVAL_IS_NULL(aOptions)) {
     rv = params.Init(aCx, &aOptions);
     if (NS_FAILED(rv)) {
       return rv;
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -2546,17 +2546,17 @@ IDBObjectStore::CreateIndex(const nsAStr
   for (uint32_t index = 0; index < mCreatedIndexes.Length(); index++) {
     if (mCreatedIndexes[index]->Name() == aName) {
       NS_ERROR("Already created this one!");
     }
   }
 #endif
 
   nsresult rv;
-  mozilla::dom::IDBIndexParameters params;
+  mozilla::idl::IDBIndexParameters params;
 
   // Get optional arguments.
   if (!JSVAL_IS_VOID(aOptions) && !JSVAL_IS_NULL(aOptions)) {
     rv = params.Init(aCx, &aOptions);
     if (NS_FAILED(rv)) {
       return rv;
     }
   }
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2152,17 +2152,17 @@ ContentParent::RecvAddGeolocationListene
   RecvRemoveGeolocationListener();
 
   nsCOMPtr<nsIDOMGeoGeolocation> geo = do_GetService("@mozilla.org/geolocation;1");
   if (!geo) {
     return true;
   }
 
   nsRefPtr<nsGeolocation> geosvc = static_cast<nsGeolocation*>(geo.get());
-  nsAutoPtr<mozilla::dom::GeoPositionOptions> options(new mozilla::dom::GeoPositionOptions());
+  nsAutoPtr<mozilla::idl::GeoPositionOptions> options(new mozilla::idl::GeoPositionOptions());
   jsval null = JS::NullValue();
   options->Init(nullptr, &null);
   geosvc->WatchPosition(this, nullptr, options.forget(), &mGeolocationWatchID);
   return true;
 }
 
 bool
 ContentParent::RecvRemoveGeolocationListener()
--- a/dom/sms/src/SmsRequest.cpp
+++ b/dom/sms/src/SmsRequest.cpp
@@ -471,17 +471,17 @@ SmsRequest::NotifyThreadList(const jsval
 
       for (uint32_t i = 0; i < length; i++) {
         jsval arrayEntry;
         ok = JS_GetElement(aCx, array, i, &arrayEntry);
         NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
 
         MOZ_ASSERT(arrayEntry.isObject());
 
-        SmsThreadListItem item;
+        mozilla::idl::SmsThreadListItem item;
         nsresult rv = item.Init(aCx, &arrayEntry);
         NS_ENSURE_SUCCESS(rv, rv);
 
         ThreadListItem* ipcItem = ipcItems.AppendElement();
         ipcItem->senderOrReceiver() = item.senderOrReceiver;
         ipcItem->timestamp() = item.timestamp;
         ipcItem->body() = item.body;
         ipcItem->unreadCount() = item.unreadCount;
--- a/dom/src/geolocation/nsGeolocation.cpp
+++ b/dom/src/geolocation/nsGeolocation.cpp
@@ -281,17 +281,17 @@ nsDOMGeoPositionError::NotifyCallback(ns
 }
 ////////////////////////////////////////////////////
 // nsGeolocationRequest
 ////////////////////////////////////////////////////
 
 nsGeolocationRequest::nsGeolocationRequest(nsGeolocation* aLocator,
                                            nsIDOMGeoPositionCallback* aCallback,
                                            nsIDOMGeoPositionErrorCallback* aErrorCallback,
-                                           mozilla::dom::GeoPositionOptions* aOptions,
+                                           mozilla::idl::GeoPositionOptions* aOptions,
                                            bool aWatchPositionRequest,
                                            int32_t aWatchId)
   : mAllowed(false),
     mCleared(false),
     mIsFirstUpdate(true),
     mIsWatchPositionRequest(aWatchPositionRequest),
     mCallback(aCallback),
     mErrorCallback(aErrorCallback),
@@ -301,23 +301,23 @@ nsGeolocationRequest::nsGeolocationReque
 {
 }
 
 nsGeolocationRequest::~nsGeolocationRequest()
 {
 }
 
 
-static mozilla::dom::GeoPositionOptions*
+static mozilla::idl::GeoPositionOptions*
 OptionsFromJSOptions(JSContext* aCx, const jsval& aOptions, nsresult* aRv)
 {
   *aRv = NS_OK;
-  nsAutoPtr<mozilla::dom::GeoPositionOptions> options(nullptr);
+  nsAutoPtr<mozilla::idl::GeoPositionOptions> options(nullptr);
   if (aCx && !JSVAL_IS_VOID(aOptions) && !JSVAL_IS_NULL(aOptions)) {
-    options = new mozilla::dom::GeoPositionOptions();
+    options = new mozilla::idl::GeoPositionOptions();
     nsresult rv = options->Init(aCx, &aOptions);
     if (NS_FAILED(rv)) {
       *aRv = rv;
       return nullptr;
     }
   }
   return options.forget();
 }
@@ -1245,26 +1245,26 @@ nsGeolocation::Update(nsIDOMGeoPosition 
 
 NS_IMETHODIMP
 nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
                                   nsIDOMGeoPositionErrorCallback *errorCallback,
                                   const jsval& jsoptions,
                                   JSContext* cx)
 {
   nsresult rv;
-  nsAutoPtr<mozilla::dom::GeoPositionOptions> options(
+  nsAutoPtr<mozilla::idl::GeoPositionOptions> options(
       OptionsFromJSOptions(cx, jsoptions, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   return GetCurrentPosition(callback, errorCallback, options.forget());
 }
 
 nsresult
 nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
                                   nsIDOMGeoPositionErrorCallback *errorCallback,
-                                  mozilla::dom::GeoPositionOptions *options)
+                                  mozilla::idl::GeoPositionOptions *options)
 {
   NS_ENSURE_ARG_POINTER(callback);
 
   if (mPendingCallbacks.Length() > MAX_GEO_REQUESTS_PER_WINDOW) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   nsRefPtr<nsGeolocationRequest> request = new nsGeolocationRequest(this,
@@ -1318,26 +1318,26 @@ nsGeolocation::GetCurrentPositionReady(n
 NS_IMETHODIMP
 nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback,
                              nsIDOMGeoPositionErrorCallback *errorCallback,
                              const jsval& jsoptions,
                              JSContext* cx,
                              int32_t *_retval)
 {
   nsresult rv;
-  nsAutoPtr<mozilla::dom::GeoPositionOptions> options(
+  nsAutoPtr<mozilla::idl::GeoPositionOptions> options(
       OptionsFromJSOptions(cx, jsoptions, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
   return WatchPosition(callback, errorCallback, options.forget(), _retval);
 }
 
 nsresult
 nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback,
                              nsIDOMGeoPositionErrorCallback *errorCallback,
-                             mozilla::dom::GeoPositionOptions *options,
+                             mozilla::idl::GeoPositionOptions *options,
                              int32_t *_retval)
 {
   NS_ENSURE_ARG_POINTER(callback);
 
   if (mWatchingCallbacks.Length() > MAX_GEO_REQUESTS_PER_WINDOW) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
--- a/dom/src/geolocation/nsGeolocation.h
+++ b/dom/src/geolocation/nsGeolocation.h
@@ -48,17 +48,17 @@ class nsGeolocationRequest
   NS_DECL_NSICONTENTPERMISSIONREQUEST
   NS_DECL_NSITIMERCALLBACK
 
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsGeolocationRequest, nsIContentPermissionRequest)
 
   nsGeolocationRequest(nsGeolocation* locator,
                        nsIDOMGeoPositionCallback* callback,
                        nsIDOMGeoPositionErrorCallback* errorCallback,
-                       mozilla::dom::GeoPositionOptions* aOptions,
+                       mozilla::idl::GeoPositionOptions* aOptions,
                        bool watchPositionRequest = false,
                        int32_t watchId = 0);
   void Shutdown();
 
   // Called by the geolocation device to notify that a location has changed.
   // isBetter: the accuracy is as good or better than the previous position. 
   bool Update(nsIDOMGeoPosition* aPosition, bool aIsBetter);
 
@@ -81,17 +81,17 @@ class nsGeolocationRequest
   bool mAllowed;
   bool mCleared;
   bool mIsFirstUpdate;
   bool mIsWatchPositionRequest;
 
   nsCOMPtr<nsITimer> mTimeoutTimer;
   nsCOMPtr<nsIDOMGeoPositionCallback> mCallback;
   nsCOMPtr<nsIDOMGeoPositionErrorCallback> mErrorCallback;
-  nsAutoPtr<mozilla::dom::GeoPositionOptions> mOptions;
+  nsAutoPtr<mozilla::idl::GeoPositionOptions> mOptions;
 
   nsRefPtr<nsGeolocation> mLocator;
 
   int32_t mWatchId;
 };
 
 /**
  * Singleton that manages the geolocation provider
@@ -199,21 +199,21 @@ public:
   bool WindowOwnerStillExists();
 
   // Notification from the service:
   void ServiceReady();
 
   // Versions of the DOM APIs that don't require JS option values
   nsresult WatchPosition(nsIDOMGeoPositionCallback *callback,
                          nsIDOMGeoPositionErrorCallback *errorCallback,
-                         mozilla::dom::GeoPositionOptions *options,
+                         mozilla::idl::GeoPositionOptions *options,
                          int32_t *_retval);
   nsresult GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
                               nsIDOMGeoPositionErrorCallback *errorCallback,
-                              mozilla::dom::GeoPositionOptions *options);
+                              mozilla::idl::GeoPositionOptions *options);
 private:
 
   ~nsGeolocation();
 
   bool RegisterRequestWithPrompt(nsGeolocationRequest* request);
 
   // Methods for the service when it's ready to process requests:
   nsresult GetCurrentPositionReady(nsGeolocationRequest* aRequest);
--- a/js/xpconnect/src/dictionary_helper_gen.py
+++ b/js/xpconnect/src/dictionary_helper_gen.py
@@ -127,17 +127,17 @@ def print_header_file(fd, conf):
         collect_names_and_non_primitive_attribute_types(idl, d[0], attrnames, forwards)
     
     for c in forwards:
         fd.write("class %s;\n" % c)
 
 
     fd.write("\n"
              "namespace mozilla {\n"
-             "namespace dom {\n\n")
+             "namespace idl {\n\n")
 
     dicts = []
     for d in conf.dictionaries:
         if not d[0] in set(dicts):
             idl = loadIDL(p, options.incdirs, d[1])
             print_header(idl, fd, conf, d[0], dicts)
     fd.write("}\n"
              "}\n"
@@ -210,17 +210,17 @@ def print_cpp_file(fd, conf):
     for d in conf.dictionaries:
         idl = loadIDL(p, options.incdirs, d[1])
         collect_names_and_non_primitive_attribute_types(idl, d[0], attrnames, includes)
     
     for c in includes:
       if not c in conf.exclude_automatic_type_include:
             fd.write("#include \"%s.h\"\n" % c)
 
-    fd.write("\nusing namespace mozilla::dom;\n\n")
+    fd.write("\nusing namespace mozilla::idl;\n\n")
 
     for a in attrnames:
         fd.write("static jsid %s = JSID_VOID;\n"% get_jsid(a))
 
     fd.write("\n"
              "static bool\n"
              "InternStaticJSVal(JSContext* aCx, jsid &id, const char* aString)\n"
              "{\n"
--- a/js/xpconnect/src/event_impl_gen.py
+++ b/js/xpconnect/src/event_impl_gen.py
@@ -80,18 +80,18 @@ def print_header_file(fd, conf):
     fd.write("#if defined MOZ_GENERATED_EVENT_LIST\n")
     for e in conf.simple_events:
         fd.write("MOZ_GENERATED_EVENT(%s)\n" % e);
     fd.write("#undef MOZ_GENERATED_EVENT\n");
     fd.write("\n#elif defined MOZ_GENERATED_EVENTS_INCLUDES\n")
     for e in conf.simple_events:
         fd.write("#include \"nsIDOM%s.h\"\n" % e)
     fd.write("#else\n")
-    fd.write("#ifndef _gen_mozilla_generated_events_h_\n"
-             "#define _gen_mozilla_generated_events_h_\n\n")
+    fd.write("#ifndef _gen_mozilla_idl_generated_events_h_\n"
+             "#define _gen_mozilla_idl_generated_events_h_\n\n")
     fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n")
     fd.write("#include \"nscore.h\"\n")
     fd.write("class nsEvent;\n")
     fd.write("class nsIDOMEvent;\n")
     fd.write("class nsPresContext;\n\n")
     for e in conf.simple_events:
         fd.write("nsresult\n")
         fd.write("NS_NewDOM%s(nsIDOMEvent** aInstance, nsPresContext* aPresContext, nsEvent* aEvent);\n" % e)
@@ -291,17 +291,17 @@ def write_cpp(eventname, iface, fd):
     fd.write("NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(%s)\n" % classname)
     fd.write("  NS_INTERFACE_MAP_ENTRY(nsIDOM%s)\n" % eventname)
     fd.write("  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(%s)\n" % eventname)
     fd.write("NS_INTERFACE_MAP_END_INHERITING(%s)\n\n" % basename)
 
     fd.write("nsresult\n")
     fd.write("%s::InitFromCtor(const nsAString& aType, JSContext* aCx, jsval* aVal)\n" % classname)
     fd.write("{\n");
-    fd.write("  mozilla::dom::%sInit d;\n" % eventname)
+    fd.write("  mozilla::idl::%sInit d;\n" % eventname)
     fd.write("  nsresult rv = d.Init(aCx, aVal);\n")
     fd.write("  NS_ENSURE_SUCCESS(rv, rv);\n")
     fd.write("  return Init%s(aType, d.bubbles, d.cancelable" % eventname)
     for a in baseattributes:
       fd.write(", d.%s" % a.name)
     for a in attributes:
         fd.write(", d.%s" % a.name)
     fd.write(");\n")