diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index c6ce77fa91c6..6af55170b22d 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -199,9 +199,6 @@ static nsDOMClassInfoData sClassInfoData[] = { NS_DEFINE_CLASSINFO_DATA(CSSMediaRule, nsCSSRuleSH, DOM_DEFAULT_SCRIPTABLE_FLAGS | nsIXPCScriptable::WANT_PRECREATE) - NS_DEFINE_CLASSINFO_DATA(CSSNameSpaceRule, nsCSSRuleSH, - DOM_DEFAULT_SCRIPTABLE_FLAGS | - nsIXPCScriptable::WANT_PRECREATE) // XUL classes #ifdef MOZ_XUL @@ -539,10 +536,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMediaRule) DOM_CLASSINFO_MAP_END - DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSNameSpaceRule, nsIDOMCSSRule) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRule) - DOM_CLASSINFO_MAP_END - #ifdef MOZ_XUL DOM_CLASSINFO_MAP_BEGIN(XULCommandDispatcher, nsIDOMXULCommandDispatcher) DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandDispatcher) diff --git a/dom/base/nsDOMClassInfoID.h b/dom/base/nsDOMClassInfoID.h index 8a71ae209086..88b7876e03e7 100644 --- a/dom/base/nsDOMClassInfoID.h +++ b/dom/base/nsDOMClassInfoID.h @@ -23,7 +23,6 @@ enum nsDOMClassInfoID eDOMClassInfo_CSSStyleRule_id, eDOMClassInfo_CSSImportRule_id, eDOMClassInfo_CSSMediaRule_id, - eDOMClassInfo_CSSNameSpaceRule_id, // XUL classes #ifdef MOZ_XUL diff --git a/dom/base/nsWrapperCache.h b/dom/base/nsWrapperCache.h index aa5d63db32eb..5a1f42117d63 100644 --- a/dom/base/nsWrapperCache.h +++ b/dom/base/nsWrapperCache.h @@ -21,7 +21,6 @@ class ProcessGlobal; } // namespace dom namespace css { class ImportRule; -class NameSpaceRule; class StyleRule; class MediaRule; class DocumentRule; @@ -296,7 +295,6 @@ private: friend class nsInProcessTabChildGlobal; friend class nsWindowRoot; friend class mozilla::css::ImportRule; - friend class mozilla::css::NameSpaceRule; friend class mozilla::css::StyleRule; friend class mozilla::css::MediaRule; friend class mozilla::css::DocumentRule; diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index 7f5f27ee2b6c..92376c14d5be 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -200,12 +200,17 @@ DOMInterfaces = { 'wrapperCache': False }, +'CSSNamespaceRule': { + 'nativeType': 'mozilla::css::NameSpaceRule', +}, + 'CSSPrimitiveValue': { 'nativeType': 'nsROCSSPrimitiveValue', }, 'CSSRule': { 'hasXPConnectImpls': True, + 'concrete': False, 'nativeType': 'mozilla::css::Rule' }, diff --git a/dom/media/webaudio/AudioBuffer.h b/dom/media/webaudio/AudioBuffer.h index 35627d7a1cbf..4d6f468e58d6 100644 --- a/dom/media/webaudio/AudioBuffer.h +++ b/dom/media/webaudio/AudioBuffer.h @@ -15,6 +15,7 @@ #include "nsTArray.h" #include "js/TypeDecls.h" #include "mozilla/MemoryReporting.h" +#include "mozilla/dom/TypedArray.h" namespace mozilla { diff --git a/dom/tests/mochitest/general/test_interfaces.html b/dom/tests/mochitest/general/test_interfaces.html index 0d51a2e628d2..22115cd6c429 100644 --- a/dom/tests/mochitest/general/test_interfaces.html +++ b/dom/tests/mochitest/general/test_interfaces.html @@ -249,7 +249,7 @@ var interfaceNamesInGlobalScope = // IMPORTANT: Do not change this list without review from a DOM peer! "CSSMozDocumentRule", // IMPORTANT: Do not change this list without review from a DOM peer! - "CSSNameSpaceRule", + "CSSNamespaceRule", // IMPORTANT: Do not change this list without review from a DOM peer! "CSSPageRule", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/webidl/CSSNamespaceRule.webidl b/dom/webidl/CSSNamespaceRule.webidl new file mode 100644 index 000000000000..0051c904a72d --- /dev/null +++ b/dom/webidl/CSSNamespaceRule.webidl @@ -0,0 +1,16 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. + * + * The origin of this IDL file is + * https://drafts.csswg.org/cssom/#cssnamespacerule + */ + +// https://drafts.csswg.org/cssom/#cssnamespacerule +interface CSSNamespaceRule : CSSRule { + // Not implemented yet. . + // readonly attribute DOMString namespaceURI; + // readonly attribute DOMString prefix; +}; diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index 83ffd095cb26..5816c050250b 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -90,6 +90,7 @@ WEBIDL_FILES = [ 'CSS.webidl', 'CSSAnimation.webidl', 'CSSLexer.webidl', + 'CSSNamespaceRule.webidl', 'CSSPrimitiveValue.webidl', 'CSSPseudoElement.webidl', 'CSSRule.webidl', diff --git a/layout/style/nsCSSRules.cpp b/layout/style/nsCSSRules.cpp index b009ea19b660..8c958f76ba18 100644 --- a/layout/style/nsCSSRules.cpp +++ b/layout/style/nsCSSRules.cpp @@ -33,6 +33,7 @@ #include "nsCSSParser.h" #include "nsDOMClassInfoID.h" #include "mozilla/dom/CSSStyleDeclarationBinding.h" +#include "mozilla/dom/CSSNamespaceRuleBinding.h" #include "StyleRule.h" #include "nsFont.h" #include "nsIURI.h" @@ -1060,7 +1061,6 @@ NameSpaceRule::NameSpaceRule(nsIAtom* aPrefix, const nsString& aURLSpec, mPrefix(aPrefix), mURLSpec(aURLSpec) { - SetIsNotDOMBinding(); } NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy) @@ -1068,7 +1068,6 @@ NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy) mPrefix(aCopy.mPrefix), mURLSpec(aCopy.mURLSpec) { - SetIsNotDOMBinding(); } NameSpaceRule::~NameSpaceRule() @@ -1086,7 +1085,6 @@ NS_INTERFACE_MAP_BEGIN(NameSpaceRule) return NS_OK; } else - NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSNameSpaceRule) NS_INTERFACE_MAP_END_INHERITING(Rule) #ifdef DEBUG @@ -1161,8 +1159,7 @@ NameSpaceRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const NameSpaceRule::WrapObject(JSContext* aCx, JS::Handle aGivenProto) { - NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor"); - return nullptr; + return CSSNamespaceRuleBinding::Wrap(aCx, this, aGivenProto); } } // namespace css