Bug 466234: provide audio and video interfaces even when media is diabled, so that content popup menu construction works, r/sr=roc, r=weilbacher, a191=beltzner
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 28 Nov 2008 15:32:29 -0800
changeset 22111 b32dc52a37ffc49dcd8a17cbc8e53e2fdcb2570c
parent 22110 30adfe786ffaf746040facfc35f1220f7e221415
child 22112 aadde428c8ce836b8c9f8ddaee8f3e53b6548696
push idunknown
push userunknown
push dateunknown
reviewersweilbacher
bugs466234
milestone1.9.1b3pre
Bug 466234: provide audio and video interfaces even when media is diabled, so that content popup menu construction works, r/sr=roc, r=weilbacher, a191=beltzner
dom/public/idl/html/Makefile.in
dom/public/nsDOMClassInfoID.h
dom/src/base/nsDOMClassInfo.cpp
--- a/dom/public/idl/html/Makefile.in
+++ b/dom/public/idl/html/Makefile.in
@@ -99,30 +99,25 @@ SDK_XPIDLSRCS =					\
 	nsIDOMHTMLTableCellElement.idl		\
 	nsIDOMHTMLTableColElement.idl		\
 	nsIDOMHTMLTableElement.idl		\
 	nsIDOMHTMLTableRowElement.idl		\
 	nsIDOMHTMLTableSectionElem.idl		\
 	nsIDOMHTMLTextAreaElement.idl		\
 	nsIDOMHTMLTitleElement.idl		\
 	nsIDOMHTMLUListElement.idl		\
-	$(NULL)
-
-ifdef MOZ_MEDIA
-SDK_XPIDLSRCS +=				\
 	nsIDOMHTMLMediaError.idl		\
 	nsIDOMHTMLTimeRanges.idl		\
 	nsIDOMHTMLByteRanges.idl		\
 	nsIDOMHTMLMediaElement.idl		\
 	nsIDOMHTMLSourceElement.idl		\
 	nsIDOMHTMLVideoElement.idl		\
 	nsIDOMHTMLAudioElement.idl		\
 	nsIDOMHTMLVoidCallback.idl		\
 	$(NULL)
-endif
 
 XPIDLSRCS = 					\
 	nsIDOMHTMLCanvasElement.idl		\
 	nsIDOMNSHTMLAnchorElement.idl		\
 	nsIDOMNSHTMLAnchorElement2.idl		\
 	nsIDOMNSHTMLAreaElement.idl		\
 	nsIDOMNSHTMLAreaElement2.idl		\
 	nsIDOMNSHTMLButtonElement.idl		\
--- a/dom/public/nsDOMClassInfoID.h
+++ b/dom/public/nsDOMClassInfoID.h
@@ -430,22 +430,21 @@ enum nsDOMClassInfoID {
   eDOMClassInfo_GeoPosition_id,
   eDOMClassInfo_GeoPositionError_id,
 
   // @font-face in CSS
   eDOMClassInfo_CSSFontFaceRule_id,
   eDOMClassInfo_CSSFontFaceStyleDecl_id,
 
   // WhatWG Video Element
-#if defined(MOZ_MEDIA)
   eDOMClassInfo_HTMLVideoElement_id,
   eDOMClassInfo_HTMLSourceElement_id,
   eDOMClassInfo_HTMLMediaError_id,
   eDOMClassInfo_HTMLAudioElement_id,
-#endif
+
   eDOMClassInfo_ProgressEvent_id,
 
   eDOMClassInfo_XMLHttpRequestUpload_id,
 
   // DOM Traversal NodeIterator class
   eDOMClassInfo_NodeIterator_id,
 
   eDOMClassInfo_DataTransfer_id,
--- a/dom/src/base/nsDOMClassInfo.cpp
+++ b/dom/src/base/nsDOMClassInfo.cpp
@@ -311,22 +311,20 @@
 #include "nsIDOMHTMLTableColElement.h"
 #include "nsIDOMHTMLTableElement.h"
 #include "nsIDOMHTMLTableRowElement.h"
 #include "nsIDOMHTMLTableSectionElem.h"
 #include "nsIDOMHTMLTextAreaElement.h"
 #include "nsIDOMNSHTMLTextAreaElement.h"
 #include "nsIDOMHTMLTitleElement.h"
 #include "nsIDOMHTMLUListElement.h"
-#if defined(MOZ_MEDIA)
 #include "nsIDOMHTMLMediaError.h"
 #include "nsIDOMHTMLSourceElement.h"
 #include "nsIDOMHTMLVideoElement.h"
 #include "nsIDOMHTMLAudioElement.h"
-#endif
 #include "nsIDOMProgressEvent.h"
 #include "nsIDOMNSUIEvent.h"
 #include "nsIDOMCSS2Properties.h"
 #include "nsIDOMCSSCharsetRule.h"
 #include "nsIDOMCSSImportRule.h"
 #include "nsIDOMCSSMediaRule.h"
 #include "nsIDOMCSSFontFaceRule.h"
 #include "nsIDOMCSSMozDocumentRule.h"
@@ -1267,26 +1265,24 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(GeoPositionError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   
   NS_DEFINE_CLASSINFO_DATA(CSSFontFaceRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(CSSFontFaceStyleDecl, nsCSSStyleDeclSH,
                            ARRAY_SCRIPTABLE_FLAGS)
 
-#if defined(MOZ_MEDIA) 
   NS_DEFINE_CLASSINFO_DATA(HTMLVideoElement, nsHTMLElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLSourceElement, nsHTMLElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLMediaError, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(HTMLAudioElement, nsHTMLElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-#endif
 
   NS_DEFINE_CLASSINFO_DATA(ProgressEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(XMLHttpRequestUpload, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
 
   // DOM Traversal NodeIterator class  
@@ -3502,17 +3498,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSFontFaceRule)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSFontFaceStyleDecl,
                                       nsIDOMCSSStyleDeclaration)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
   DOM_CLASSINFO_MAP_END
 
-#if defined(MOZ_MEDIA)
   DOM_CLASSINFO_MAP_BEGIN(HTMLVideoElement, nsIDOMHTMLVideoElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLVideoElement)
     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
@@ -3523,17 +3518,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_EVENT_MAP_ENTRIES
   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
 
-#endif
   DOM_CLASSINFO_MAP_BEGIN(ProgressEvent, nsIDOMProgressEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMProgressEvent)
     DOM_CLASSINFO_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(XMLHttpRequestUpload, nsIXMLHttpRequestUpload)
     DOM_CLASSINFO_MAP_ENTRY(nsIXMLHttpRequestEventTarget)
     DOM_CLASSINFO_MAP_ENTRY(nsIXMLHttpRequestUpload)