Bug 726400 - Backed out changeset 4ad6c040729f. r=backout.
authorChris Pearce <cpearce@mozilla.com>
Mon, 26 Mar 2012 14:41:14 +1300
changeset 90283 95c4ed9b56f2d35e296b51691fe93b3f65461f4b
parent 90282 4ad6c040729f220a079a0c771117ef973375c7ba
child 90284 75b2f91a3b8053dbb06d2b796a2d38b3b81f98d1
push id22336
push usermbrubeck@mozilla.com
push dateMon, 26 Mar 2012 18:22:18 +0000
treeherdermozilla-central@a30fd69f1e0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs726400
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 726400 - Backed out changeset 4ad6c040729f. r=backout.
content/html/content/public/nsHTMLMediaElement.h
content/html/content/src/nsHTMLMediaElement.cpp
content/media/ogg/nsOggDecoder.h
content/media/raw/nsRawDecoder.h
content/media/wave/nsWaveDecoder.h
content/media/webm/nsWebMDecoder.h
--- a/content/html/content/public/nsHTMLMediaElement.h
+++ b/content/html/content/public/nsHTMLMediaElement.h
@@ -272,20 +272,16 @@ public:
   static CanPlayStatus GetCanPlay(const nsAString& aType);
 
   // Returns true if we should handle this MIME type when it appears
   // as an <object> or as a toplevel page. If, in practice, our support
   // for the type is more limited than appears in the wild, we should return
   // false here even if CanHandleMediaType would return true.
   static bool ShouldHandleMediaType(const char* aMIMEType);
 
-#ifdef MOZ_RAW
-  static bool IsRawEnabled();
-#endif
-
 #ifdef MOZ_OGG
   static bool IsOggEnabled();
   static bool IsOggType(const nsACString& aType);
   static const char gOggTypes[3][16];
   static char const *const gOggCodecs[3];
 #endif
 
 #ifdef MOZ_WAVE
--- a/content/html/content/src/nsHTMLMediaElement.cpp
+++ b/content/html/content/src/nsHTMLMediaElement.cpp
@@ -1707,18 +1707,17 @@ static const char gRawTypes[][16] = {
   "video/x-raw",
   "video/x-raw-yuv"
 };
 
 static const char* gRawCodecs[] = {
   nsnull
 };
 
-bool
-nsHTMLMediaElement::IsRawEnabled()
+static bool IsRawEnabled()
 {
   return Preferences::GetBool("media.raw.enabled");
 }
 
 static bool IsRawType(const nsACString& aType)
 {
   if (!IsRawEnabled()) {
     return false;
--- a/content/media/ogg/nsOggDecoder.h
+++ b/content/media/ogg/nsOggDecoder.h
@@ -39,18 +39,13 @@
 #if !defined(nsOggDecoder_h_)
 #define nsOggDecoder_h_
 
 #include "nsBuiltinDecoder.h"
 
 class nsOggDecoder : public nsBuiltinDecoder
 {
 public:
-  virtual nsMediaDecoder* Clone() {
-    if (!nsHTMLMediaElement::IsOggEnabled()) {
-      return nsnull;
-    }
-    return new nsOggDecoder();
-  }
+  virtual nsMediaDecoder* Clone() { return new nsOggDecoder(); }
   virtual nsDecoderStateMachine* CreateStateMachine();
 };
 
 #endif
--- a/content/media/raw/nsRawDecoder.h
+++ b/content/media/raw/nsRawDecoder.h
@@ -37,18 +37,13 @@
 #if !defined(nsRawDecoder_h_)
 #define nsRawDecoder_h_
 
 #include "nsBuiltinDecoder.h"
 
 class nsRawDecoder : public nsBuiltinDecoder
 {
 public:
-  virtual nsMediaDecoder* Clone() { 
-    if (!nsHTMLMediaElement::IsRawEnabled()) {
-      return nsnull;
-    }    
-    return new nsRawDecoder();
-  }
+  virtual nsMediaDecoder* Clone() { return new nsRawDecoder(); }
   virtual nsDecoderStateMachine* CreateStateMachine();
 };
 
 #endif
--- a/content/media/wave/nsWaveDecoder.h
+++ b/content/media/wave/nsWaveDecoder.h
@@ -50,18 +50,13 @@
  * require extending nsWaveDecoder to support parsing the newer
  * WAVE_FORMAT_EXTENSIBLE chunk format.
 **/
 
 
 class nsWaveDecoder : public nsBuiltinDecoder
 {
 public:
-  virtual nsMediaDecoder* Clone() {
-    if (!nsHTMLMediaElement::IsWaveEnabled()) {
-      return nsnull;
-    }
-    return new nsWaveDecoder();
-  }
-  virtual nsDecoderStateMachine* CreateStateMachine();
+   virtual nsMediaDecoder* Clone() { return new nsWaveDecoder(); }
+   virtual nsDecoderStateMachine* CreateStateMachine();
 };
 
 #endif
--- a/content/media/webm/nsWebMDecoder.h
+++ b/content/media/webm/nsWebMDecoder.h
@@ -39,18 +39,13 @@
 #if !defined(nsWebMDecoder_h_)
 #define nsWebMDecoder_h_
 
 #include "nsBuiltinDecoder.h"
 
 class nsWebMDecoder : public nsBuiltinDecoder
 {
 public:
-  virtual nsMediaDecoder* Clone() {
-    if (!nsHTMLMediaElement::IsWebMEnabled()) {
-      return nsnull;
-    }
-    return new nsWebMDecoder();
-  }
+  virtual nsMediaDecoder* Clone() { return new nsWebMDecoder(); }
   virtual nsDecoderStateMachine* CreateStateMachine();
 };
 
 #endif