Bug 1321746 - Inline nsDOMClassInfoClasses.h. r=bkelly.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 02 Dec 2016 16:06:20 +1100
changeset 325267 e589f801d2211b67449475b1b8ad82cc937ca1a0
parent 325266 c0e9bfe3b8f4cff7fadccc0b5c3e81b7dd0cf826
child 325268 5d8855350a728b9577171a8d12e2a3dce13871a2
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersbkelly
bugs1321746
milestone53.0a1
Bug 1321746 - Inline nsDOMClassInfoClasses.h. r=bkelly. nsDOMClassInfoClasses.h is only #included in one place, so we might as well just put its contents in that place direclty. This also avoids some macro usage, which is nice.
dom/base/moz.build
dom/base/nsDOMClassInfoClasses.h
dom/base/nsDOMClassInfoID.h
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -61,17 +61,16 @@ EXPORTS += [
     'nsContentTypeParser.h',
     'nsContentUtils.h',
     'nsCopySupport.h',
     'nsDeprecatedOperationList.h',
     'nsDocElementCreatedNotificationRunner.h',
     'nsDocumentWarningList.h',
     'nsDOMAttributeMap.h',
     'nsDOMCID.h',
-    'nsDOMClassInfoClasses.h',
     'nsDOMClassInfoID.h',
     'nsDOMJSUtils.h',
     'nsDOMNavigationTiming.h',
     'nsDOMString.h',
     'nsFocusManager.h',
     'nsFrameMessageManager.h',
     'nsGenericDOMDataNode.h',
     'nsGkAtomList.h',
deleted file mode 100644
--- a/dom/base/nsDOMClassInfoClasses.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-// IWYU pragma: private, include "nsDOMClassInfoID.h"
-
-DOMCI_CLASS(DOMPrototype)
-DOMCI_CLASS(DOMConstructor)
-
-// CSS classes
-DOMCI_CLASS(CSSStyleRule)
-DOMCI_CLASS(CSSImportRule)
-DOMCI_CLASS(CSSMediaRule)
-DOMCI_CLASS(CSSNameSpaceRule)
-
-// XUL classes
-#ifdef MOZ_XUL
-DOMCI_CLASS(XULCommandDispatcher)
-#endif
-DOMCI_CLASS(XULControllers)
-#ifdef MOZ_XUL
-DOMCI_CLASS(TreeSelection)
-DOMCI_CLASS(TreeContentView)
-#endif
-
-#ifdef MOZ_XUL
-DOMCI_CLASS(XULTemplateBuilder)
-DOMCI_CLASS(XULTreeBuilder)
-#endif
-
-DOMCI_CLASS(CSSMozDocumentRule)
-DOMCI_CLASS(CSSSupportsRule)
-
-// @font-face in CSS
-DOMCI_CLASS(CSSFontFaceRule)
-
-DOMCI_CLASS(ContentFrameMessageManager)
-DOMCI_CLASS(ContentProcessMessageManager)
-DOMCI_CLASS(ChromeMessageBroadcaster)
-DOMCI_CLASS(ChromeMessageSender)
-
-DOMCI_CLASS(CSSKeyframeRule)
-DOMCI_CLASS(CSSKeyframesRule)
-
-// @counter-style in CSS
-DOMCI_CLASS(CSSCounterStyleRule)
-
-DOMCI_CLASS(CSSPageRule)
-
-DOMCI_CLASS(CSSFontFeatureValuesRule)
-
-DOMCI_CLASS(XULControlElement)
-DOMCI_CLASS(XULLabeledControlElement)
-DOMCI_CLASS(XULButtonElement)
-DOMCI_CLASS(XULCheckboxElement)
-DOMCI_CLASS(XULPopupElement)
--- a/dom/base/nsDOMClassInfoID.h
+++ b/dom/base/nsDOMClassInfoID.h
@@ -9,29 +9,73 @@
  * an entry in nsDOMClassInfo.
  */
 
 #ifndef nsDOMClassInfoID_h__
 #define nsDOMClassInfoID_h__
 
 #include "nsIXPCScriptable.h"
 
-#define DOMCI_CLASS(_dom_class)                                               \
-  eDOMClassInfo_##_dom_class##_id,
+enum nsDOMClassInfoID
+{
+  eDOMClassInfo_DOMPrototype_id,
+  eDOMClassInfo_DOMConstructor_id,
+
+  // CSS classes
+  eDOMClassInfo_CSSStyleRule_id,
+  eDOMClassInfo_CSSImportRule_id,
+  eDOMClassInfo_CSSMediaRule_id,
+  eDOMClassInfo_CSSNameSpaceRule_id,
+
+  // XUL classes
+#ifdef MOZ_XUL
+  eDOMClassInfo_XULCommandDispatcher_id,
+#endif
+  eDOMClassInfo_XULControllers_id,
+#ifdef MOZ_XUL
+  eDOMClassInfo_TreeSelection_id,
+  eDOMClassInfo_TreeContentView_id,
+#endif
+
+#ifdef MOZ_XUL
+  eDOMClassInfo_XULTemplateBuilder_id,
+  eDOMClassInfo_XULTreeBuilder_id,
+#endif
 
-enum nsDOMClassInfoID {
+  eDOMClassInfo_CSSMozDocumentRule_id,
+  eDOMClassInfo_CSSSupportsRule_id,
+
+  // @font-face in CSS
+  eDOMClassInfo_CSSFontFaceRule_id,
+
+  eDOMClassInfo_ContentFrameMessageManager_id,
+  eDOMClassInfo_ContentProcessMessageManager_id,
+  eDOMClassInfo_ChromeMessageBroadcaster_id,
+  eDOMClassInfo_ChromeMessageSender_id,
 
-#include "nsDOMClassInfoClasses.h"
+  eDOMClassInfo_CSSKeyframeRule_id,
+  eDOMClassInfo_CSSKeyframesRule_id,
+
+  // @counter-style in CSS
+  eDOMClassInfo_CSSCounterStyleRule_id,
+
+  eDOMClassInfo_CSSPageRule_id,
+
+  eDOMClassInfo_CSSFontFeatureValuesRule_id,
+
+  eDOMClassInfo_XULControlElement_id,
+  eDOMClassInfo_XULLabeledControlElement_id,
+  eDOMClassInfo_XULButtonElement_id,
+  eDOMClassInfo_XULCheckboxElement_id,
+  eDOMClassInfo_XULPopupElement_id,
 
   // This one better be the last one in this list
   eDOMClassInfoIDCount
 };
 
-#undef DOMCI_CLASS
-
 /**
  * nsIClassInfo helper macros
  */
 
 #ifdef MOZILLA_INTERNAL_API
 
 class nsIClassInfo;
 class nsXPCClassInfo;