mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
Issue #2490 - Part 10: Convert CSSNamespaceRule to WebIDL.
This commit is contained in:
parent
264f152ba0
commit
95642cb4e5
9 changed files with 26 additions and 16 deletions
|
|
@ -198,9 +198,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||||
NS_DEFINE_CLASSINFO_DATA(CSSMediaRule, nsCSSRuleSH,
|
NS_DEFINE_CLASSINFO_DATA(CSSMediaRule, nsCSSRuleSH,
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS |
|
DOM_DEFAULT_SCRIPTABLE_FLAGS |
|
||||||
nsIXPCScriptable::WANT_PRECREATE)
|
nsIXPCScriptable::WANT_PRECREATE)
|
||||||
NS_DEFINE_CLASSINFO_DATA(CSSNameSpaceRule, nsCSSRuleSH,
|
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS |
|
|
||||||
nsIXPCScriptable::WANT_PRECREATE)
|
|
||||||
|
|
||||||
// XUL classes
|
// XUL classes
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
|
|
@ -538,10 +535,6 @@ nsDOMClassInfo::Init()
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMediaRule)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMediaRule)
|
||||||
DOM_CLASSINFO_MAP_END
|
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
|
#ifdef MOZ_XUL
|
||||||
DOM_CLASSINFO_MAP_BEGIN(XULCommandDispatcher, nsIDOMXULCommandDispatcher)
|
DOM_CLASSINFO_MAP_BEGIN(XULCommandDispatcher, nsIDOMXULCommandDispatcher)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandDispatcher)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandDispatcher)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ DOMCI_CLASS(DOMConstructor)
|
||||||
DOMCI_CLASS(CSSStyleRule)
|
DOMCI_CLASS(CSSStyleRule)
|
||||||
DOMCI_CLASS(CSSImportRule)
|
DOMCI_CLASS(CSSImportRule)
|
||||||
DOMCI_CLASS(CSSMediaRule)
|
DOMCI_CLASS(CSSMediaRule)
|
||||||
DOMCI_CLASS(CSSNameSpaceRule)
|
|
||||||
|
|
||||||
// XUL classes
|
// XUL classes
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ class ProcessGlobal;
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
namespace css {
|
namespace css {
|
||||||
class ImportRule;
|
class ImportRule;
|
||||||
class NameSpaceRule;
|
|
||||||
class StyleRule;
|
class StyleRule;
|
||||||
class MediaRule;
|
class MediaRule;
|
||||||
class DocumentRule;
|
class DocumentRule;
|
||||||
|
|
@ -294,7 +293,6 @@ private:
|
||||||
friend class nsInProcessTabChildGlobal;
|
friend class nsInProcessTabChildGlobal;
|
||||||
friend class nsWindowRoot;
|
friend class nsWindowRoot;
|
||||||
friend class mozilla::css::ImportRule;
|
friend class mozilla::css::ImportRule;
|
||||||
friend class mozilla::css::NameSpaceRule;
|
|
||||||
friend class mozilla::css::StyleRule;
|
friend class mozilla::css::StyleRule;
|
||||||
friend class mozilla::css::MediaRule;
|
friend class mozilla::css::MediaRule;
|
||||||
friend class mozilla::css::DocumentRule;
|
friend class mozilla::css::DocumentRule;
|
||||||
|
|
|
||||||
|
|
@ -201,12 +201,17 @@ DOMInterfaces = {
|
||||||
'wrapperCache': False
|
'wrapperCache': False
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'CSSNamespaceRule': {
|
||||||
|
'nativeType': 'mozilla::css::NameSpaceRule',
|
||||||
|
},
|
||||||
|
|
||||||
'CSSPrimitiveValue': {
|
'CSSPrimitiveValue': {
|
||||||
'nativeType': 'nsROCSSPrimitiveValue',
|
'nativeType': 'nsROCSSPrimitiveValue',
|
||||||
},
|
},
|
||||||
|
|
||||||
'CSSRule': {
|
'CSSRule': {
|
||||||
'hasXPConnectImpls': True,
|
'hasXPConnectImpls': True,
|
||||||
|
'concrete': False,
|
||||||
'nativeType': 'mozilla::css::Rule'
|
'nativeType': 'mozilla::css::Rule'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
#include "AudioContext.h"
|
#include "AudioContext.h"
|
||||||
#include "js/TypeDecls.h"
|
#include "js/TypeDecls.h"
|
||||||
#include "mozilla/MemoryReporting.h"
|
#include "mozilla/MemoryReporting.h"
|
||||||
|
#include "mozilla/dom/TypedArray.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ var interfaceNamesInGlobalScope =
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
"CSSMozDocumentRule",
|
"CSSMozDocumentRule",
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// 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!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
"CSSPageRule",
|
"CSSPageRule",
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
|
|
||||||
16
dom/webidl/CSSNamespaceRule.webidl
Normal file
16
dom/webidl/CSSNamespaceRule.webidl
Normal file
|
|
@ -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. <See
|
||||||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1326514>.
|
||||||
|
// readonly attribute DOMString namespaceURI;
|
||||||
|
// readonly attribute DOMString prefix;
|
||||||
|
};
|
||||||
|
|
@ -91,6 +91,7 @@ WEBIDL_FILES = [
|
||||||
'CSS.webidl',
|
'CSS.webidl',
|
||||||
'CSSAnimation.webidl',
|
'CSSAnimation.webidl',
|
||||||
'CSSLexer.webidl',
|
'CSSLexer.webidl',
|
||||||
|
'CSSNamespaceRule.webidl',
|
||||||
'CSSPrimitiveValue.webidl',
|
'CSSPrimitiveValue.webidl',
|
||||||
'CSSPseudoElement.webidl',
|
'CSSPseudoElement.webidl',
|
||||||
'CSSRule.webidl',
|
'CSSRule.webidl',
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
#include "nsCSSParser.h"
|
#include "nsCSSParser.h"
|
||||||
#include "nsDOMClassInfoID.h"
|
#include "nsDOMClassInfoID.h"
|
||||||
#include "mozilla/dom/CSSStyleDeclarationBinding.h"
|
#include "mozilla/dom/CSSStyleDeclarationBinding.h"
|
||||||
|
#include "mozilla/dom/CSSNamespaceRuleBinding.h"
|
||||||
#include "StyleRule.h"
|
#include "StyleRule.h"
|
||||||
#include "nsFont.h"
|
#include "nsFont.h"
|
||||||
#include "nsIURI.h"
|
#include "nsIURI.h"
|
||||||
|
|
@ -1109,7 +1110,6 @@ NameSpaceRule::NameSpaceRule(nsIAtom* aPrefix, const nsString& aURLSpec,
|
||||||
mPrefix(aPrefix),
|
mPrefix(aPrefix),
|
||||||
mURLSpec(aURLSpec)
|
mURLSpec(aURLSpec)
|
||||||
{
|
{
|
||||||
SetIsNotDOMBinding();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy)
|
NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy)
|
||||||
|
|
@ -1117,7 +1117,6 @@ NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy)
|
||||||
mPrefix(aCopy.mPrefix),
|
mPrefix(aCopy.mPrefix),
|
||||||
mURLSpec(aCopy.mURLSpec)
|
mURLSpec(aCopy.mURLSpec)
|
||||||
{
|
{
|
||||||
SetIsNotDOMBinding();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NameSpaceRule::~NameSpaceRule()
|
NameSpaceRule::~NameSpaceRule()
|
||||||
|
|
@ -1137,7 +1136,6 @@ NS_INTERFACE_MAP_BEGIN(NameSpaceRule)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSNameSpaceRule)
|
|
||||||
NS_INTERFACE_MAP_END_INHERITING(Rule)
|
NS_INTERFACE_MAP_END_INHERITING(Rule)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -1218,8 +1216,7 @@ NameSpaceRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
||||||
NameSpaceRule::WrapObject(JSContext* aCx,
|
NameSpaceRule::WrapObject(JSContext* aCx,
|
||||||
JS::Handle<JSObject*> aGivenProto)
|
JS::Handle<JSObject*> aGivenProto)
|
||||||
{
|
{
|
||||||
NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor");
|
return CSSNamespaceRuleBinding::Wrap(aCx, this, aGivenProto);
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace css
|
} // namespace css
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue