Bug 589561 - Rename HTMLTimeRanges to TimeRanges, HTMLMediaError to MediaError. r=roc a=roc
authorChris Pearce <chris@pearce.org.nz>
Wed, 25 Aug 2010 20:43:00 +1200
changeset 51394 37f61e9d618a32ade3367c514598454b9b735a54
parent 51393 cec16a1741fb0c350fe5aebd4dd2a6e73b13a54f
child 51395 2ba7ee65686d8e3824dc8ff6c0738ef8b6e6921b
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, roc
bugs589561
milestone2.0b5pre
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 589561 - Rename HTMLTimeRanges to TimeRanges, HTMLMediaError to MediaError. r=roc a=roc
content/html/content/public/nsHTMLMediaElement.h
content/html/content/src/Makefile.in
content/html/content/src/nsHTMLAudioElement.cpp
content/html/content/src/nsHTMLMediaElement.cpp
content/html/content/src/nsHTMLMediaError.cpp
content/html/content/src/nsHTMLMediaError.h
content/html/content/src/nsHTMLTimeRanges.cpp
content/html/content/src/nsHTMLTimeRanges.h
content/html/content/src/nsHTMLVideoElement.cpp
content/html/content/src/nsMediaError.cpp
content/html/content/src/nsMediaError.h
content/html/content/src/nsTimeRanges.cpp
content/html/content/src/nsTimeRanges.h
content/media/nsBuiltinDecoder.h
content/media/nsBuiltinDecoderReader.h
content/media/nsBuiltinDecoderStateMachine.h
content/media/nsMediaDecoder.h
content/media/ogg/nsOggReader.cpp
content/media/ogg/nsOggReader.h
content/media/raw/nsRawReader.cpp
content/media/raw/nsRawReader.h
content/media/test/test_constants.html
content/media/test/test_decode_error.html
content/media/test/test_info_leak.html
content/media/wave/nsWaveDecoder.cpp
content/media/wave/nsWaveDecoder.h
content/media/webm/nsWebMReader.cpp
content/media/webm/nsWebMReader.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/html/Makefile.in
dom/interfaces/html/nsIDOMHTMLMediaElement.idl
dom/interfaces/html/nsIDOMHTMLMediaError.idl
dom/interfaces/html/nsIDOMHTMLTimeRanges.idl
dom/interfaces/html/nsIDOMMediaError.idl
dom/interfaces/html/nsIDOMTimeRanges.idl
--- a/content/html/content/public/nsHTMLMediaElement.h
+++ b/content/html/content/public/nsHTMLMediaElement.h
@@ -484,17 +484,17 @@ protected:
 
   // Holds a reference to the first channel we open to the media resource.
   // Once the decoder is created, control over the channel passes to the
   // decoder, and we null out this reference. We must store this in case
   // we need to cancel the channel before control of it passes to the decoder.
   nsCOMPtr<nsIChannel> mChannel;
 
   // Error attribute
-  nsCOMPtr<nsIDOMHTMLMediaError> mError;
+  nsCOMPtr<nsIDOMMediaError> mError;
 
   // The current media load ID. This is incremented every time we start a
   // new load. Async events note the ID when they're first sent, and only fire
   // if the ID is unchanged when they come to fire.
   PRUint32 mCurrentLoadID;
 
   // Points to the child source elements, used to iterate through the children
   // when selecting a resource to load.
--- a/content/html/content/src/Makefile.in
+++ b/content/html/content/src/Makefile.in
@@ -114,19 +114,19 @@ CPPSRCS		= \
 		nsDOMValidityState.cpp \
 		nsIConstraintValidation.cpp \
 		$(NULL)
 
 ifdef MOZ_MEDIA
 CPPSRCS		+= \
 		nsHTMLAudioElement.cpp \
 		nsHTMLMediaElement.cpp \
-		nsHTMLMediaError.cpp \
+		nsMediaError.cpp \
 		nsHTMLSourceElement.cpp \
-		nsHTMLTimeRanges.cpp \
+		nsTimeRanges.cpp \
 		nsHTMLVideoElement.cpp \
 		$(NULL)
 endif
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/content/html/content/src/nsHTMLAudioElement.cpp
+++ b/content/html/content/src/nsHTMLAudioElement.cpp
@@ -60,17 +60,16 @@
 #include "nsJSUtils.h"
 
 #include "nsIRenderingContext.h"
 #include "nsITimer.h"
 
 #include "nsEventDispatcher.h"
 #include "nsIDOMDocumentEvent.h"
 #include "nsIDOMProgressEvent.h"
-#include "nsHTMLMediaError.h"
 
 nsGenericHTMLElement*
 NS_NewHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                        PRUint32 aFromParser)
 {
   /*
    * nsHTMLAudioElement's will be created without a nsINodeInfo passed in
    * if someone says "var audio = new Audio();" in JavaScript, in a case like
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -34,17 +34,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMHTMLMediaElement.h"
 #include "nsIDOMHTMLSourceElement.h"
 #include "nsHTMLMediaElement.h"
-#include "nsHTMLTimeRanges.h"
+#include "nsTimeRanges.h"
 #include "nsGenericHTMLElement.h"
 #include "nsPresContext.h"
 #include "nsIPresShell.h"
 #include "nsGkAtoms.h"
 #include "nsSize.h"
 #include "nsIFrame.h"
 #include "nsIDocument.h"
 #include "nsIDOMDocument.h"
@@ -65,17 +65,17 @@
 #include "jsapi.h"
 
 #include "nsIRenderingContext.h"
 #include "nsITimer.h"
 
 #include "nsEventDispatcher.h"
 #include "nsIDOMDocumentEvent.h"
 #include "nsIDOMProgressEvent.h"
-#include "nsHTMLMediaError.h"
+#include "nsMediaError.h"
 #include "nsICategoryManager.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsMediaStream.h"
 
 #include "nsIDOMHTMLVideoElement.h"
 #include "nsIContentPolicy.h"
 #include "nsContentPolicyUtils.h"
 #include "nsContentErrors.h"
@@ -403,18 +403,18 @@ NS_IMPL_STRING_ATTR(nsHTMLMediaElement, 
 /* readonly attribute nsIDOMHTMLMediaElement mozAutoplayEnabled; */
 NS_IMETHODIMP nsHTMLMediaElement::GetMozAutoplayEnabled(PRBool *aAutoplayEnabled)
 {
   *aAutoplayEnabled = mAutoplayEnabled;
 
   return NS_OK;
 }
 
-/* readonly attribute nsIDOMHTMLMediaError error; */
-NS_IMETHODIMP nsHTMLMediaElement::GetError(nsIDOMHTMLMediaError * *aError)
+/* readonly attribute nsIDOMMediaError error; */
+NS_IMETHODIMP nsHTMLMediaElement::GetError(nsIDOMMediaError * *aError)
 {
   NS_IF_ADDREF(*aError = mError);
 
   return NS_OK;
 }
 
 /* readonly attribute boolean ended; */
 NS_IMETHODIMP nsHTMLMediaElement::GetEnded(PRBool *aEnded)
@@ -492,17 +492,17 @@ void nsHTMLMediaElement::AbortExistingLo
     fireTimeUpdate = mDecoder->GetCurrentTime() != 0.0;
     mDecoder->Shutdown();
     mDecoder = nsnull;
   }
 
   if (mNetworkState == nsIDOMHTMLMediaElement::NETWORK_LOADING ||
       mNetworkState == nsIDOMHTMLMediaElement::NETWORK_IDLE)
   {
-    mError = new nsHTMLMediaError(nsIDOMHTMLMediaError::MEDIA_ERR_ABORTED);
+    mError = new nsMediaError(nsIDOMMediaError::MEDIA_ERR_ABORTED);
     DispatchProgressEvent(NS_LITERAL_STRING("abort"));
   }
 
   mError = nsnull;
   mLoadedFirstFrame = PR_FALSE;
   mAutoplaying = PR_TRUE;
   mIsLoadingFromSrcAttribute = PR_FALSE;
   mSuspendedAfterFirstFrame = PR_FALSE;
@@ -532,17 +532,17 @@ void nsHTMLMediaElement::AbortExistingLo
 
   mIsRunningSelectResource = PR_FALSE;
 }
 
 void nsHTMLMediaElement::NoSupportedMediaSourceError()
 {
   NS_ASSERTION(mDelayingLoadEvent, "Load event not delayed during source selection?");
 
-  mError = new nsHTMLMediaError(nsIDOMHTMLMediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
+  mError = new nsMediaError(nsIDOMMediaError::MEDIA_ERR_SRC_NOT_SUPPORTED);
   mNetworkState = nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE;
   DispatchAsyncProgressEvent(NS_LITERAL_STRING("error"));
   // This clears mDelayingLoadEvent, so AddRemoveSelfReference will be called
   ChangeDelayLoadStatus(PR_FALSE);
 }
 
 /* void load (); */
 NS_IMETHODIMP nsHTMLMediaElement::Load()
@@ -1793,28 +1793,28 @@ void nsHTMLMediaElement::ResourceLoaded(
   AddRemoveSelfReference();
   ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA);
   // The download has stopped
   DispatchAsyncSimpleEvent(NS_LITERAL_STRING("suspend"));
 }
 
 void nsHTMLMediaElement::NetworkError()
 {
-  mError = new nsHTMLMediaError(nsIDOMHTMLMediaError::MEDIA_ERR_NETWORK);
+  mError = new nsMediaError(nsIDOMMediaError::MEDIA_ERR_NETWORK);
   mBegun = PR_FALSE;
   DispatchAsyncProgressEvent(NS_LITERAL_STRING("error"));
   mNetworkState = nsIDOMHTMLMediaElement::NETWORK_EMPTY;
   AddRemoveSelfReference();
   DispatchAsyncSimpleEvent(NS_LITERAL_STRING("emptied"));
   ChangeDelayLoadStatus(PR_FALSE);
 }
 
 void nsHTMLMediaElement::DecodeError()
 {
-  mError = new nsHTMLMediaError(nsIDOMHTMLMediaError::MEDIA_ERR_DECODE);
+  mError = new nsMediaError(nsIDOMMediaError::MEDIA_ERR_DECODE);
   mBegun = PR_FALSE;
   DispatchAsyncProgressEvent(NS_LITERAL_STRING("error"));
   mNetworkState = nsIDOMHTMLMediaElement::NETWORK_EMPTY;
   AddRemoveSelfReference();
   DispatchAsyncSimpleEvent(NS_LITERAL_STRING("emptied"));
   ChangeDelayLoadStatus(PR_FALSE);
 }
 
@@ -2350,17 +2350,17 @@ nsHTMLMediaElement::CopyInnerTo(nsGeneri
                                           nsLayoutUtils::SFE_WANT_NEW_SURFACE);
       dest->mPrintSurface = res.mSurface;
       dest->mMediaSize = nsIntSize(res.mSize.width, res.mSize.height);
     }
   }
   return rv;
 }
 
-nsresult nsHTMLMediaElement::GetBuffered(nsIDOMHTMLTimeRanges** aBuffered)
+nsresult nsHTMLMediaElement::GetBuffered(nsIDOMTimeRanges** aBuffered)
 {
-  nsHTMLTimeRanges* ranges = new nsHTMLTimeRanges();
+  nsTimeRanges* ranges = new nsTimeRanges();
   NS_ADDREF(*aBuffered = ranges);
   if (mReadyState >= nsIDOMHTMLMediaElement::HAVE_CURRENT_DATA && mDecoder) {
     return mDecoder->GetBuffered(ranges);
   }
   return NS_OK;
 }
--- a/content/html/content/src/nsHTMLVideoElement.cpp
+++ b/content/html/content/src/nsHTMLVideoElement.cpp
@@ -59,17 +59,17 @@
 #include "jsapi.h"
 
 #include "nsIRenderingContext.h"
 #include "nsITimer.h"
 
 #include "nsEventDispatcher.h"
 #include "nsIDOMDocumentEvent.h"
 #include "nsIDOMProgressEvent.h"
-#include "nsHTMLMediaError.h"
+#include "nsMediaError.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Video)
 
 NS_IMPL_ADDREF_INHERITED(nsHTMLVideoElement, nsHTMLMediaElement)
 NS_IMPL_RELEASE_INHERITED(nsHTMLVideoElement, nsHTMLMediaElement)
 
 DOMCI_NODE_DATA(HTMLVideoElement, nsHTMLVideoElement)
 
rename from content/html/content/src/nsHTMLMediaError.cpp
rename to content/html/content/src/nsMediaError.cpp
--- a/content/html/content/src/nsHTMLMediaError.cpp
+++ b/content/html/content/src/nsMediaError.cpp
@@ -30,34 +30,34 @@
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
-#include "nsHTMLMediaError.h"
+#include "nsMediaError.h"
 #include "nsContentUtils.h"
 
-NS_IMPL_ADDREF(nsHTMLMediaError)
-NS_IMPL_RELEASE(nsHTMLMediaError)
+NS_IMPL_ADDREF(nsMediaError)
+NS_IMPL_RELEASE(nsMediaError)
 
-DOMCI_DATA(HTMLMediaError, nsHTMLMediaError)
+DOMCI_DATA(MediaError, nsMediaError)
 
-NS_INTERFACE_MAP_BEGIN(nsHTMLMediaError)
+NS_INTERFACE_MAP_BEGIN(nsMediaError)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLMediaError)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(HTMLMediaError)
+  NS_INTERFACE_MAP_ENTRY(nsIDOMMediaError)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MediaError)
 NS_INTERFACE_MAP_END
 
-nsHTMLMediaError::nsHTMLMediaError(PRUint16 aCode) :
+nsMediaError::nsMediaError(PRUint16 aCode) :
   mCode(aCode)
 {
 }
 
-NS_IMETHODIMP nsHTMLMediaError::GetCode(PRUint16* aCode)
+NS_IMETHODIMP nsMediaError::GetCode(PRUint16* aCode)
 {
   if (aCode)
     *aCode = mCode;
 
   return NS_OK;
 }
rename from content/html/content/src/nsHTMLMediaError.h
rename to content/html/content/src/nsMediaError.h
--- a/content/html/content/src/nsHTMLMediaError.h
+++ b/content/html/content/src/nsMediaError.h
@@ -30,26 +30,26 @@
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
-#include "nsIDOMHTMLMediaError.h"
+#include "nsIDOMMediaError.h"
 #include "nsISupports.h"
 
-class nsHTMLMediaError : public nsIDOMHTMLMediaError
+class nsMediaError : public nsIDOMMediaError
 {
 public:
-  nsHTMLMediaError(PRUint16 aCode);
+  nsMediaError(PRUint16 aCode);
 
   // nsISupports
   NS_DECL_ISUPPORTS
 
-  // nsIDOMHTMLMediaError
-  NS_DECL_NSIDOMHTMLMEDIAERROR
+  // nsIDOMMediaError
+  NS_DECL_NSIDOMMEDIAERROR
 
 private:
   // Error code
   PRUint16 mCode;
 };
rename from content/html/content/src/nsHTMLTimeRanges.cpp
rename to content/html/content/src/nsTimeRanges.cpp
--- a/content/html/content/src/nsHTMLTimeRanges.cpp
+++ b/content/html/content/src/nsTimeRanges.cpp
@@ -31,49 +31,49 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsHTMLTimeRanges.h"
+#include "nsTimeRanges.h"
 #include "nsDOMError.h"
 #include "nsContentUtils.h"
 
-NS_IMPL_ADDREF(nsHTMLTimeRanges)
-NS_IMPL_RELEASE(nsHTMLTimeRanges)
+NS_IMPL_ADDREF(nsTimeRanges)
+NS_IMPL_RELEASE(nsTimeRanges)
 
-DOMCI_DATA(HTMLTimeRanges, nsHTMLTimeRanges)
+DOMCI_DATA(TimeRanges, nsTimeRanges)
 
-NS_INTERFACE_MAP_BEGIN(nsHTMLTimeRanges)
+NS_INTERFACE_MAP_BEGIN(nsTimeRanges)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLTimeRanges)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(HTMLTimeRanges)
+  NS_INTERFACE_MAP_ENTRY(nsIDOMTimeRanges)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(TimeRanges)
 NS_INTERFACE_MAP_END
 
 NS_IMETHODIMP
-nsHTMLTimeRanges::GetLength(PRUint32* aLength) {
+nsTimeRanges::GetLength(PRUint32* aLength) {
   *aLength = mRanges.Length();
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsHTMLTimeRanges::Start(PRUint32 aIndex, float* aTime) {
+nsTimeRanges::Start(PRUint32 aIndex, float* aTime) {
   if (aIndex >= mRanges.Length())
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   *aTime = mRanges[aIndex].mStart;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsHTMLTimeRanges::End(PRUint32 aIndex, float* aTime) {
+nsTimeRanges::End(PRUint32 aIndex, float* aTime) {
   if (aIndex >= mRanges.Length())
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   *aTime = mRanges[aIndex].mEnd;
   return NS_OK;
 }
 
 void
-nsHTMLTimeRanges::Add(float aStart, float aEnd) {
+nsTimeRanges::Add(float aStart, float aEnd) {
   mRanges.AppendElement(TimeRange(aStart,aEnd));
 }
rename from content/html/content/src/nsHTMLTimeRanges.h
rename to content/html/content/src/nsTimeRanges.h
--- a/content/html/content/src/nsHTMLTimeRanges.h
+++ b/content/html/content/src/nsTimeRanges.h
@@ -31,26 +31,26 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "nsIDOMHTMLTimeRanges.h"
+#include "nsIDOMTimeRanges.h"
 #include "nsISupports.h"
 #include "nsTArray.h"
 
 // Implements media TimeRanges:
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#timeranges
-class nsHTMLTimeRanges : public nsIDOMHTMLTimeRanges {
+class nsTimeRanges : public nsIDOMTimeRanges {
 public:
   NS_DECL_ISUPPORTS
-  NS_DECL_NSIDOMHTMLTIMERANGES
+  NS_DECL_NSIDOMTIMERANGES
 
   void Add(float aStart, float aEnd);
 
 private:
 
   struct TimeRange {
     TimeRange(float aStart, float aEnd)
       : mStart(aStart),
--- a/content/media/nsBuiltinDecoder.h
+++ b/content/media/nsBuiltinDecoder.h
@@ -289,17 +289,17 @@ public:
 
   // Update the playback position. This can result in a timeupdate event
   // and an invalidate of the frame being dispatched asynchronously if
   // there is no such event currently queued.
   // Only called on the decoder thread. Must be called with
   // the decode monitor held.
   virtual void UpdatePlaybackPosition(PRInt64 aTime) = 0;
 
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered) = 0;
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered) = 0;
   
   // Causes the state machine to switch to buffering state, and to
   // immediately stop playback and buffer downloaded data. Must be called
   // with the decode monitor held. Called on the state machine thread and
   // the main thread.
   virtual void StartBuffering() = 0;
 };
 
@@ -425,17 +425,17 @@ class nsBuiltinDecoder : public nsMediaD
   // Returns the monitor for other threads to synchronise access to
   // state.
   Monitor& GetMonitor() { 
     return mMonitor; 
   }
 
   // Constructs the time ranges representing what segments of the media
   // are buffered and playable.
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered) {
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered) {
     return mDecoderStateMachine->GetBuffered(aBuffered);
   }
 
  public:
   // Return the current state. Can be called on any thread. If called from
   // a non-main thread, the decoder monitor must be held.
   PlayState GetState() {
     return mPlayState;
--- a/content/media/nsBuiltinDecoderReader.h
+++ b/content/media/nsBuiltinDecoderReader.h
@@ -455,17 +455,17 @@ public:
 
   // Queue of video samples. This queue is threadsafe.
   MediaQueue<VideoData> mVideoQueue;
 
   // Populates aBuffered with the time ranges which are buffered. aStartTime
   // must be the presentation time of the first sample/frame in the media, e.g.
   // the media time corresponding to playback time/position 0. This function
   // should only be called on the main thread.
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered,
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered,
                                PRInt64 aStartTime) = 0;
 
 protected:
 
   // Pumps the decode until we reach frames/samples required to play at
   // time aTarget (ms).
   nsresult DecodeToTarget(PRInt64 aTarget);
 
--- a/content/media/nsBuiltinDecoderStateMachine.h
+++ b/content/media/nsBuiltinDecoderStateMachine.h
@@ -229,17 +229,17 @@ public:
   nsBuiltinDecoder* mDecoder;
 
   // The decoder monitor must be obtained before modifying this state.
   // NotifyAll on the monitor must be called when the state is changed by
   // the main thread so the decoder thread can wake up.
   // Accessed on state machine, audio, main, and AV thread. 
   State mState;
 
-  nsresult GetBuffered(nsHTMLTimeRanges* aBuffered) {
+  nsresult GetBuffered(nsTimeRanges* aBuffered) {
     NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
     return mReader->GetBuffered(aBuffered, mStartTime);
   }
 
 protected:
 
   // Returns PR_TRUE when there's decoded audio waiting to play.
   // The decoder monitor must be held.
--- a/content/media/nsMediaDecoder.h
+++ b/content/media/nsMediaDecoder.h
@@ -46,17 +46,17 @@
 #include "gfxContext.h"
 #include "gfxRect.h"
 #include "nsITimer.h"
 #include "ImageLayers.h"
 
 class nsHTMLMediaElement;
 class nsMediaStream;
 class nsIStreamListener;
-class nsHTMLTimeRanges;
+class nsTimeRanges;
 
 // All methods of nsMediaDecoder must be called from the main thread only
 // with the exception of GetImageContainer, SetVideoData and GetStatistics,
 // which can be called from any thread.
 class nsMediaDecoder : public nsIObserver
 {
 public:
   typedef mozilla::TimeStamp TimeStamp;
@@ -234,17 +234,17 @@ public:
   // Set the video width, height, pixel aspect ratio, and current image.
   // Ownership of the image is transferred to the decoder.
   void SetVideoData(const gfxIntSize& aSize,
                     float aPixelAspectRatio,
                     Image* aImage);
 
   // Constructs the time ranges representing what segments of the media
   // are buffered and playable.
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered) = 0;
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered) = 0;
 
   // Returns PR_TRUE if we can play the entire media through without stopping
   // to buffer, given the current download and playback rates.
   PRBool CanPlayThrough();
 
 protected:
 
   // Start timer to update download progress information.
--- a/content/media/ogg/nsOggReader.cpp
+++ b/content/media/ogg/nsOggReader.cpp
@@ -37,17 +37,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 #include "nsError.h"
 #include "nsBuiltinDecoderStateMachine.h"
 #include "nsBuiltinDecoder.h"
 #include "nsOggReader.h"
 #include "VideoUtils.h"
 #include "theora/theoradec.h"
-#include "nsHTMLTimeRanges.h"
+#include "nsTimeRanges.h"
 
 using namespace mozilla;
 
 // Un-comment to enable logging of seek bisections.
 //#define SEEK_LOGGING
 
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* gBuiltinDecoderLog;
@@ -1534,17 +1534,17 @@ nsresult nsOggReader::SeekBisection(PRIn
     NS_ASSERTION(endTime >= seekTarget, "End must be after seek target");
   }
 
   SEEK_LOG(PR_LOG_DEBUG, ("Seek complete in %d bisections.", hops));
 
   return NS_OK;
 }
 
-nsresult nsOggReader::GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime)
+nsresult nsOggReader::GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime)
 {
   NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
   nsMediaStream* stream = mDecoder->GetCurrentStream();
 
   // Traverse across the buffered byte ranges, determining the time ranges
   // they contain. nsMediaStream::GetNextCachedData(offset) returns -1 when
   // offset is after the end of the media stream, or there's no more cached
   // data after the offset. This loop will run until we've checked every
--- a/content/media/ogg/nsOggReader.h
+++ b/content/media/ogg/nsOggReader.h
@@ -44,17 +44,17 @@
 #include <vorbis/codec.h>
 #include "nsBuiltinDecoderReader.h"
 #include "nsOggCodecState.h"
 #include "VideoUtils.h"
 
 using namespace mozilla;
 
 class nsMediaDecoder;
-class nsHTMLTimeRanges;
+class nsTimeRanges;
 
 class nsOggReader : public nsBuiltinDecoderReader
 {
 public:
   nsOggReader(nsBuiltinDecoder* aDecoder);
   ~nsOggReader();
 
   virtual nsresult Init();
@@ -83,17 +83,17 @@ public:
   virtual PRBool HasVideo()
   {
     mozilla::MonitorAutoEnter mon(mMonitor);
     return mTheoraState != 0 && mTheoraState->mActive;
   }
 
   virtual nsresult ReadMetadata();
   virtual nsresult Seek(PRInt64 aTime, PRInt64 aStartTime, PRInt64 aEndTime, PRInt64 aCurrentTime);
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime);
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime);
 
 private:
 
   PRBool HasSkeleton()
   {
     MonitorAutoEnter mon(mMonitor);
     return mSkeletonState != 0 && mSkeletonState->mActive;
   }
--- a/content/media/raw/nsRawReader.cpp
+++ b/content/media/raw/nsRawReader.cpp
@@ -296,12 +296,12 @@ nsresult nsRawReader::Seek(PRInt64 aTime
   return NS_OK;
 }
 
 PRInt64 nsRawReader::FindEndTime(PRInt64 aEndTime)
 {
   return -1;
 }
 
-nsresult nsRawReader::GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime)
+nsresult nsRawReader::GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime)
 {
   return NS_OK;
 }
--- a/content/media/raw/nsRawReader.h
+++ b/content/media/raw/nsRawReader.h
@@ -108,17 +108,17 @@ public:
   virtual PRBool HasVideo()
   {
     return PR_TRUE;
   }
 
   virtual nsresult ReadMetadata();
   virtual nsresult Seek(PRInt64 aTime, PRInt64 aStartTime, PRInt64 aEndTime, PRInt64 aCurrentTime);
   virtual PRInt64 FindEndTime(PRInt64 aEndOffset);
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime);
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime);
 
 private:
   PRBool ReadFromStream(nsMediaStream *aStream, PRUint8 *aBuf,
                         PRUint32 aLength);
 
   nsRawVideoHeader mMetadata;
   PRUint32 mCurrentFrame;
   double mFrameRate;
--- a/content/media/test/test_constants.html
+++ b/content/media/test/test_constants.html
@@ -78,30 +78,30 @@ is(HTMLSourceElement.HAVE_NOTHING, undef
 is(HTMLSourceElement.HAVE_METADATA, undefined);
 is(HTMLSourceElement.HAVE_CURRENT_DATA, undefined);
 is(HTMLSourceElement.HAVE_FUTURE_DATA, undefined);
 is(HTMLSourceElement.HAVE_ENOUGH_DATA, undefined);
 is(HTMLSourceElement.MEDIA_ERR_ABORTED, undefined);
 is(HTMLSourceElement.MEDIA_ERR_NETWORK, undefined);
 is(HTMLSourceElement.MEDIA_ERR_DECODE, undefined);
 is(HTMLSourceElement.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
-is(HTMLMediaError.NETWORK_EMPTY, undefined);
-is(HTMLMediaError.NETWORK_IDLE, undefined);
-is(HTMLMediaError.NETWORK_LOADING, undefined);
-is(HTMLMediaError.NETWORK_LOADED, undefined);
-is(HTMLMediaError.NETWORK_NO_SOURCE, undefined);
-is(HTMLMediaError.HAVE_NOTHING, undefined);
-is(HTMLMediaError.HAVE_METADATA, undefined);
-is(HTMLMediaError.HAVE_CURRENT_DATA, undefined);
-is(HTMLMediaError.HAVE_FUTURE_DATA, undefined);
-is(HTMLMediaError.HAVE_ENOUGH_DATA, undefined);
-is(HTMLMediaError.MEDIA_ERR_ABORTED, 1);
-is(HTMLMediaError.MEDIA_ERR_NETWORK, 2);
-is(HTMLMediaError.MEDIA_ERR_DECODE, 3);
-is(HTMLMediaError.MEDIA_ERR_SRC_NOT_SUPPORTED, 4);
+is(MediaError.NETWORK_EMPTY, undefined);
+is(MediaError.NETWORK_IDLE, undefined);
+is(MediaError.NETWORK_LOADING, undefined);
+is(MediaError.NETWORK_LOADED, undefined);
+is(MediaError.NETWORK_NO_SOURCE, undefined);
+is(MediaError.HAVE_NOTHING, undefined);
+is(MediaError.HAVE_METADATA, undefined);
+is(MediaError.HAVE_CURRENT_DATA, undefined);
+is(MediaError.HAVE_FUTURE_DATA, undefined);
+is(MediaError.HAVE_ENOUGH_DATA, undefined);
+is(MediaError.MEDIA_ERR_ABORTED, 1);
+is(MediaError.MEDIA_ERR_NETWORK, 2);
+is(MediaError.MEDIA_ERR_DECODE, 3);
+is(MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED, 4);
 is(document.body.NETWORK_EMPTY, undefined);
 is(document.body.NETWORK_IDLE, undefined);
 is(document.body.NETWORK_LOADING, undefined);
 is(document.body.NETWORK_LOADED, undefined);
 is(document.body.NETWORK_NO_SOURCE, undefined);
 is(document.body.HAVE_NOTHING, undefined);             
 is(document.body.HAVE_METADATA, undefined);
 is(document.body.HAVE_CURRENT_DATA, undefined);
@@ -218,26 +218,27 @@ is(HTMLSourceElement.prototype.HAVE_NOTH
 is(HTMLSourceElement.prototype.HAVE_METADATA, undefined);
 is(HTMLSourceElement.prototype.HAVE_CURRENT_DATA, undefined);
 is(HTMLSourceElement.prototype.HAVE_FUTURE_DATA, undefined);
 is(HTMLSourceElement.prototype.HAVE_ENOUGH_DATA, undefined);
 is(HTMLSourceElement.prototype.MEDIA_ERR_ABORTED, undefined);
 is(HTMLSourceElement.prototype.MEDIA_ERR_NETWORK, undefined);
 is(HTMLSourceElement.prototype.MEDIA_ERR_DECODE, undefined);
 is(HTMLSourceElement.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, undefined);
-is(HTMLMediaError.prototype.NETWORK_EMPTY, undefined);
-is(HTMLMediaError.prototype.NETWORK_IDLE, undefined);
-is(HTMLMediaError.prototype.NETWORK_LOADING, undefined);
-is(HTMLMediaError.prototype.NETWORK_LOADED, undefined);
-is(HTMLMediaError.prototype.NETWORK_NO_SOURCE, undefined);
-is(HTMLMediaError.prototype.HAVE_NOTHING, undefined);
-is(HTMLMediaError.prototype.HAVE_METADATA, undefined);
-is(HTMLMediaError.prototype.HAVE_CURRENT_DATA, undefined);
-is(HTMLMediaError.prototype.HAVE_FUTURE_DATA, undefined);
-is(HTMLMediaError.prototype.HAVE_ENOUGH_DATA, undefined);
-is(HTMLMediaError.prototype.MEDIA_ERR_ABORTED, 1);
-is(HTMLMediaError.prototype.MEDIA_ERR_NETWORK, 2);
-is(HTMLMediaError.prototype.MEDIA_ERR_DECODE, 3);
-is(HTMLMediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, 4);
+is(MediaError.prototype.NETWORK_EMPTY, undefined);
+is(MediaError.prototype.NETWORK_IDLE, undefined);
+is(MediaError.prototype.NETWORK_LOADING, undefined);
+is(MediaError.prototype.NETWORK_LOADED, undefined);
+is(MediaError.prototype.NETWORK_NO_SOURCE, undefined);
+is(MediaError.prototype.HAVE_NOTHING, undefined);
+is(MediaError.prototype.HAVE_METADATA, undefined);
+is(MediaError.prototype.HAVE_CURRENT_DATA, undefined);
+is(MediaError.prototype.HAVE_FUTURE_DATA, undefined);
+is(MediaError.prototype.HAVE_ENOUGH_DATA, undefined);
+is(MediaError.prototype.MEDIA_ERR_ABORTED, 1);
+is(MediaError.prototype.MEDIA_ERR_NETWORK, 2);
+is(MediaError.prototype.MEDIA_ERR_DECODE, 3);
+is(MediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED, 4);
+ok(document.getElementsByTagName("video")[0].buffered instanceof TimeRanges, "video.buffered must be TimeRanges object");
 </script>
 </pre>
 </body>
 </html>
--- a/content/media/test/test_decode_error.html
+++ b/content/media/test/test_decode_error.html
@@ -19,18 +19,18 @@ gDecodeErrorTests.forEach(function (test
     return;
   }
 
   v1.addEventListener("error", function (event) {
     event.stopPropagation();
     var el = event.currentTarget;
     is(event.type, "error", "Expected event of type 'error'");
     ok(el.error, "Element 'error' attr expected to have a value");
-    ok(el.error instanceof HTMLMediaError, "Element 'error' attr expected to be HTMLMediaError");
-    is(el.error.code, HTMLMediaError.MEDIA_ERR_DECODE, "Expected a decode error");
+    ok(el.error instanceof MediaError, "Element 'error' attr expected to be MediaError");
+    is(el.error.code, MediaError.MEDIA_ERR_DECODE, "Expected a decode error");
     is(el.networkState, HTMLMediaElement.NETWORK_EMPTY, "networkState should be EMPTY");
     el._sawError = true;
   }, false);
 
   v1.addEventListener("emptied", function (event) {
     var el = event.currentTarget;
     is(el.networkState, HTMLMediaElement.NETWORK_EMPTY, "networkState should be EMPTY");
     ok(el._sawError, "Expected error event");
--- a/content/media/test/test_info_leak.html
+++ b/content/media/test/test_info_leak.html
@@ -117,17 +117,17 @@ function checkState() {
     test_is(gMedia.seeking, false, "Seeking leaked");
     test_is(gMedia.currentTime, 0, "Leaked currentTime");
     test_ok(isNaN(gMedia.duration), "Leaked duration");
     test_is(gMedia.paused, true, "Paused leaked");
     test_is(gMedia.ended, false, "Ended leaked");
     test_is(gMedia.autoplay, false, "Autoplay leaked");
     test_is(gMedia.controls, false, "Controls leaked");
     test_is(gMedia.muted, false, "muted leaked");
-    test_ok(gMedia.error==null || gMedia.error.code==HTMLMediaError.MEDIA_ERR_SRC_NOT_SUPPORTED,
+    test_ok(gMedia.error==null || gMedia.error.code==MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED,
             "Error code should not exist or be SRC_NOT_SUPPORTED. gMedia.error=" +
             (gMedia.error ? gMedia.error.code : "null"));
     test_is(gMedia.currentSrc, "", "Leaked currentSrc");
   }
   if (!gFinished) {
     setTimeout(checkState, 1);
   }
 }
--- a/content/media/wave/nsWaveDecoder.cpp
+++ b/content/media/wave/nsWaveDecoder.cpp
@@ -44,17 +44,17 @@
 #include "nsIObserver.h"
 #include "nsISeekableStream.h"
 #include "nsAudioStream.h"
 #include "nsAutoLock.h"
 #include "nsHTMLMediaElement.h"
 #include "nsNetUtil.h"
 #include "nsThreadUtils.h"
 #include "nsWaveDecoder.h"
-#include "nsHTMLTimeRanges.h"
+#include "nsTimeRanges.h"
 
 using mozilla::TimeDuration;
 using mozilla::TimeStamp;
 
 #ifdef PR_LOGGING
 static PRLogModuleInfo* gWaveDecoderLog;
 #define LOG(type, msg) PR_LOG(gWaveDecoderLog, type, msg)
 #else
@@ -165,17 +165,17 @@ public:
   // Called by decoder and main thread.
   nsHTMLMediaElement::NextFrameStatus GetNextFrameStatus();
 
   // Clear the flag indicating that a playback position change event is
   // currently queued and return the current time. This is called from the
   // main thread.
   float GetTimeForPositionChange();
 
-  nsresult GetBuffered(nsHTMLTimeRanges* aBuffered);
+  nsresult GetBuffered(nsTimeRanges* aBuffered);
 
 private:
   // Returns PR_TRUE if we're in shutdown state. Threadsafe.
   PRBool IsShutdown();
 
   // Reads from the media stream. Returns PR_FALSE on failure or EOF.  If
   // aBytesRead is non-null, the number of bytes read will be returned via
   // this.
@@ -1176,17 +1176,17 @@ nsWaveStateMachine::FirePositionChanged(
   }
 
   mPositionChangeQueued = PR_TRUE;
   nsCOMPtr<nsIRunnable> event = NS_NewRunnableMethod(mDecoder, &nsWaveDecoder::PlaybackPositionChanged);
   NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
 }
 
 nsresult
-nsWaveStateMachine::GetBuffered(nsHTMLTimeRanges* aBuffered)
+nsWaveStateMachine::GetBuffered(nsTimeRanges* aBuffered)
 {
   PRInt64 startOffset = mStream->GetNextCachedData(mWavePCMOffset);
   while (startOffset >= 0) {
     PRInt64 endOffset = mStream->GetCachedDataEnd(startOffset);
     // Bytes [startOffset..endOffset] are cached.
     aBuffered->Add(BytesToTime(startOffset - mWavePCMOffset),
                    BytesToTime(endOffset - mWavePCMOffset));
     startOffset = mStream->GetNextCachedData(endOffset);
@@ -1670,13 +1670,13 @@ void
 nsWaveDecoder::MoveLoadsToBackground()
 {
   if (mStream) {
     mStream->MoveLoadsToBackground();
   }
 }
 
 nsresult
-nsWaveDecoder::GetBuffered(nsHTMLTimeRanges* aBuffered)
+nsWaveDecoder::GetBuffered(nsTimeRanges* aBuffered)
 {
   NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
   return mPlaybackStateMachine->GetBuffered(aBuffered);
 }
--- a/content/media/wave/nsWaveDecoder.h
+++ b/content/media/wave/nsWaveDecoder.h
@@ -129,17 +129,17 @@
   the audio backend (sydneyaudio via nsAudioStream) currently supports.  The
   supported sample rate is artificially limited to arbitrarily selected sane
   values.  Support for additional channels (and other new features) would
   require extending nsWaveDecoder to support parsing the newer
   WAVE_FORMAT_EXTENSIBLE chunk format.
  */
 
 class nsWaveStateMachine;
-class nsHTMLTimeRanges;
+class nsTimeRanges;
 
 class nsWaveDecoder : public nsMediaDecoder
 {
   friend class nsWaveStateMachine;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
@@ -234,17 +234,17 @@ class nsWaveDecoder : public nsMediaDeco
   // Tells mStream to put all loads in the background.
   virtual void MoveLoadsToBackground();
 
   // Called asynchronously to shut down the decoder
   void Stop();
 
   // Constructs the time ranges representing what segments of the media
   // are buffered and playable.
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered);
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered);
 
 private:
   // Notifies the element that seeking has started.
   void SeekingStarted();
 
   // Notifies the element that seeking has completed.
   void SeekingStopped();
 
--- a/content/media/webm/nsWebMReader.cpp
+++ b/content/media/webm/nsWebMReader.cpp
@@ -688,12 +688,12 @@ nsresult nsWebMReader::Seek(PRInt64 aTar
   }
   int r = nestegg_track_seek(mContext, 0, aTarget * NS_PER_MS);
   if (r != 0) {
     return NS_ERROR_FAILURE;
   }
   return DecodeToTarget(aTarget);
 }
 
-nsresult nsWebMReader::GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime)
+nsresult nsWebMReader::GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime)
 {
   return NS_OK;
 }
--- a/content/media/webm/nsWebMReader.h
+++ b/content/media/webm/nsWebMReader.h
@@ -120,17 +120,17 @@ public:
   virtual PRBool HasVideo()
   {
     mozilla::MonitorAutoEnter mon(mMonitor);
     return mHasVideo;
   }
 
   virtual nsresult ReadMetadata();
   virtual nsresult Seek(PRInt64 aTime, PRInt64 aStartTime, PRInt64 aEndTime, PRInt64 aCurrentTime);
-  virtual nsresult GetBuffered(nsHTMLTimeRanges* aBuffered, PRInt64 aStartTime);
+  virtual nsresult GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime);
 
 private:
   // Value passed to NextPacket to determine if we are reading a video or an
   // audio packet.
   enum TrackType {
     VIDEO = 0,
     AUDIO = 1
   };
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -302,18 +302,18 @@
 #include "nsIDOMHTMLTableColElement.h"
 #include "nsIDOMHTMLTableElement.h"
 #include "nsIDOMHTMLTableRowElement.h"
 #include "nsIDOMHTMLTableSectionElem.h"
 #include "nsIDOMHTMLTextAreaElement.h"
 #include "nsIDOMNSHTMLTextAreaElement.h"
 #include "nsIDOMHTMLTitleElement.h"
 #include "nsIDOMHTMLUListElement.h"
-#include "nsIDOMHTMLMediaError.h"
-#include "nsIDOMHTMLTimeRanges.h"
+#include "nsIDOMMediaError.h"
+#include "nsIDOMTimeRanges.h"
 #include "nsIDOMHTMLSourceElement.h"
 #include "nsIDOMHTMLVideoElement.h"
 #include "nsIDOMHTMLAudioElement.h"
 #include "nsIDOMProgressEvent.h"
 #include "nsIDOMNSUIEvent.h"
 #include "nsIDOMCSS2Properties.h"
 #include "nsIDOMCSSCharsetRule.h"
 #include "nsIDOMCSSImportRule.h"
@@ -1355,21 +1355,21 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(CSSFontFaceStyleDecl, nsCSSStyleDeclSH,
                            ARRAY_SCRIPTABLE_FLAGS)
 
 #if defined(MOZ_MEDIA)
   NS_DEFINE_CLASSINFO_DATA(HTMLVideoElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLSourceElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(HTMLMediaError, nsDOMGenericSH,
+  NS_DEFINE_CLASSINFO_DATA(MediaError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLAudioElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(HTMLTimeRanges, nsDOMGenericSH,
+  NS_DEFINE_CLASSINFO_DATA(TimeRanges, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 #endif
 
   NS_DEFINE_CLASSINFO_DATA(ProgressEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(XMLHttpRequestUpload, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
@@ -3880,27 +3880,27 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLSourceElement, nsIDOMHTMLSourceElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLSourceElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(HTMLMediaError, nsIDOMHTMLMediaError)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLMediaError)
+  DOM_CLASSINFO_MAP_BEGIN(MediaError, nsIDOMMediaError)
+    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMediaError)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(HTMLAudioElement, nsIDOMHTMLAudioElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAudioElement)
     DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(HTMLTimeRanges, nsIDOMHTMLTimeRanges)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTimeRanges)
+  DOM_CLASSINFO_MAP_BEGIN(TimeRanges, nsIDOMTimeRanges)
+    DOM_CLASSINFO_MAP_ENTRY(nsIDOMTimeRanges)
     DOM_CLASSINFO_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END  
 #endif
 
   DOM_CLASSINFO_MAP_BEGIN(ProgressEvent, nsIDOMProgressEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMProgressEvent)
     DOM_CLASSINFO_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -426,19 +426,19 @@ DOMCI_CLASS(GeoPositionError)
 // @font-face in CSS
 DOMCI_CLASS(CSSFontFaceRule)
 DOMCI_CLASS(CSSFontFaceStyleDecl)
 
 #if defined(MOZ_MEDIA)
 // WhatWG Video Element
 DOMCI_CLASS(HTMLVideoElement)
 DOMCI_CLASS(HTMLSourceElement)
-DOMCI_CLASS(HTMLMediaError)
+DOMCI_CLASS(MediaError)
 DOMCI_CLASS(HTMLAudioElement)
-DOMCI_CLASS(HTMLTimeRanges)
+DOMCI_CLASS(TimeRanges)
 #endif
 
 DOMCI_CLASS(ProgressEvent)
 
 DOMCI_CLASS(XMLHttpRequestUpload)
 
 // DOM Traversal NodeIterator class
 DOMCI_CLASS(NodeIterator)
--- a/dom/interfaces/html/Makefile.in
+++ b/dom/interfaces/html/Makefile.in
@@ -99,18 +99,18 @@ SDK_XPIDLSRCS =					\
 	nsIDOMHTMLTableCellElement.idl		\
 	nsIDOMHTMLTableColElement.idl		\
 	nsIDOMHTMLTableElement.idl		\
 	nsIDOMHTMLTableRowElement.idl		\
 	nsIDOMHTMLTableSectionElem.idl		\
 	nsIDOMHTMLTextAreaElement.idl		\
 	nsIDOMHTMLTitleElement.idl		\
 	nsIDOMHTMLUListElement.idl		\
-	nsIDOMHTMLMediaError.idl		\
-	nsIDOMHTMLTimeRanges.idl		\
+	nsIDOMMediaError.idl		\
+	nsIDOMTimeRanges.idl		\
 	nsIDOMHTMLByteRanges.idl		\
 	nsIDOMHTMLMediaElement.idl		\
 	nsIDOMHTMLSourceElement.idl		\
 	nsIDOMHTMLVideoElement.idl		\
 	nsIDOMHTMLAudioElement.idl		\
 	nsIDOMHTMLVoidCallback.idl		\
 	nsIDOMValidityState.idl		\
 	$(NULL)
--- a/dom/interfaces/html/nsIDOMHTMLMediaElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMediaElement.idl
@@ -32,18 +32,18 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIDOMHTMLElement.idl"
-#include "nsIDOMHTMLMediaError.idl"
-#include "nsIDOMHTMLTimeRanges.idl"
+#include "nsIDOMMediaError.idl"
+#include "nsIDOMTimeRanges.idl"
 
 /**
  * The nsIDOMHTMLMediaElement interface is an interface to be implemented by the HTML
  * <audio> and <video> elements.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#htmlmediaelement
  *
@@ -56,29 +56,29 @@
 #undef GetCurrentTime
 #endif
 %}
 
 [scriptable, uuid(f748b7db-4ab9-4370-835d-59f30c8de57c)]
 interface nsIDOMHTMLMediaElement : nsIDOMHTMLElement
 {
   // error state
-  readonly attribute nsIDOMHTMLMediaError error;
+  readonly attribute nsIDOMMediaError error;
 
   // network state
            attribute DOMString src;
   readonly attribute DOMString currentSrc;
   const unsigned short NETWORK_EMPTY = 0;
   const unsigned short NETWORK_IDLE = 1;
   const unsigned short NETWORK_LOADING = 2;
   const unsigned short NETWORK_LOADED = 3;
   const unsigned short NETWORK_NO_SOURCE = 4;
   readonly attribute unsigned short networkState;
            attribute DOMString preload;  
-  readonly attribute nsIDOMHTMLTimeRanges buffered;
+  readonly attribute nsIDOMTimeRanges buffered;
   void load();
   DOMString canPlayType(in DOMString type);
 
   // ready state
   const unsigned short HAVE_NOTHING = 0;
   const unsigned short HAVE_METADATA = 1;
   const unsigned short HAVE_CURRENT_DATA = 2;
   const unsigned short HAVE_FUTURE_DATA = 3;
rename from dom/interfaces/html/nsIDOMHTMLMediaError.idl
rename to dom/interfaces/html/nsIDOMMediaError.idl
--- a/dom/interfaces/html/nsIDOMHTMLMediaError.idl
+++ b/dom/interfaces/html/nsIDOMMediaError.idl
@@ -33,17 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "domstubs.idl"
 
 [scriptable, uuid(7bd8c29f-8a76-453f-9373-79f820f2dc01)]
-interface nsIDOMHTMLMediaError : nsISupports
+interface nsIDOMMediaError : nsISupports
 {
   /* The download of the media resource was aborted by
      the user agent at the user's requet */
   const unsigned short MEDIA_ERR_ABORTED = 1;
 
   /* A network error of some description caused the 
      user agent to stop downloading the media resource */
   const unsigned short MEDIA_ERR_NETWORK = 2;
rename from dom/interfaces/html/nsIDOMHTMLTimeRanges.idl
rename to dom/interfaces/html/nsIDOMTimeRanges.idl
--- a/dom/interfaces/html/nsIDOMHTMLTimeRanges.idl
+++ b/dom/interfaces/html/nsIDOMTimeRanges.idl
@@ -32,18 +32,18 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "domstubs.idl"
 
-[scriptable, uuid(5C9995A1-9FCE-44E8-AA7F-DE52FF4C3F46)]
-interface nsIDOMHTMLTimeRanges : nsISupports
+[scriptable, uuid(a45a7bec-1ff9-4fba-8a9d-e99606c987fc)]
+interface nsIDOMTimeRanges : nsISupports
 {
   /* The number of ranges represented by the time range object */
   readonly attribute unsigned long length;
 
   /* The position of the start of the index'd range, in seconds measured
      from the start of the timeline that this object represents */
   float start(in unsigned long index);