Bug 975658 - Move kTrackKind into HTMLTrackElement.cpp. r=reyre
authorCameron McCormack <cam@mcc.id.au>
Sat, 22 Feb 2014 14:06:48 +1100
changeset 170396 ea62c234c00254a96c5418abd116881a7f0a1f13
parent 170395 94be578706750ce0c894a2b65d1d96a5718ff4fa
child 170397 9b59ba1ae73e3714629c6aef9c4fe3e80ca1df1a
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersreyre
bugs975658
milestone30.0a1
Bug 975658 - Move kTrackKind into HTMLTrackElement.cpp. r=reyre
content/html/content/src/HTMLTrackElement.cpp
content/html/content/src/HTMLTrackElement.h
--- a/content/html/content/src/HTMLTrackElement.cpp
+++ b/content/html/content/src/HTMLTrackElement.cpp
@@ -56,16 +56,26 @@ NS_NewHTMLTrackElement(already_AddRefed<
   }
 
   return new mozilla::dom::HTMLTrackElement(aNodeInfo);
 }
 
 namespace mozilla {
 namespace dom {
 
+// Map html attribute string values to TextTrackKind enums.
+static MOZ_CONSTEXPR nsAttrValue::EnumTable kKindTable[] = {
+  { "subtitles", static_cast<int16_t>(TextTrackKind::Subtitles) },
+  { "captions", static_cast<int16_t>(TextTrackKind::Captions) },
+  { "descriptions", static_cast<int16_t>(TextTrackKind::Descriptions) },
+  { "chapters", static_cast<int16_t>(TextTrackKind::Chapters) },
+  { "metadata", static_cast<int16_t>(TextTrackKind::Metadata) },
+  { 0 }
+};
+
 // The default value for kKindTable is "subtitles"
 static MOZ_CONSTEXPR const char* kKindTableDefaultString = kKindTable->tag;
 
 /** HTMLTrackElement */
 HTMLTrackElement::HTMLTrackElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsGenericHTMLElement(aNodeInfo)
 {
 #ifdef PR_LOGGING
--- a/content/html/content/src/HTMLTrackElement.h
+++ b/content/html/content/src/HTMLTrackElement.h
@@ -16,26 +16,16 @@
 #include "nsIDocument.h"
 #include "nsIDOMHTMLElement.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIHttpChannel.h"
 
 namespace mozilla {
 namespace dom {
 
-// Map html attribute string values to TextTrackKind enums.
-static MOZ_CONSTEXPR nsAttrValue::EnumTable kKindTable[] = {
-  { "subtitles", static_cast<int16_t>(TextTrackKind::Subtitles) },
-  { "captions", static_cast<int16_t>(TextTrackKind::Captions) },
-  { "descriptions", static_cast<int16_t>(TextTrackKind::Descriptions) },
-  { "chapters", static_cast<int16_t>(TextTrackKind::Chapters) },
-  { "metadata", static_cast<int16_t>(TextTrackKind::Metadata) },
-  { 0 }
-};
-
 class WebVTTListener;
 
 class HTMLTrackElement MOZ_FINAL : public nsGenericHTMLElement
 {
 public:
   HTMLTrackElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~HTMLTrackElement();