Backed out changeset 9dee4f98503c (bug 851892)

This commit is contained in:
Sebastian Hengst 2017-01-20 19:30:23 +01:00
Родитель e533169d2c
Коммит e21b4b941f
9 изменённых файлов: 16 добавлений и 26 удалений

Просмотреть файл

@ -199,6 +199,9 @@ 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
@ -536,6 +539,10 @@ 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)

Просмотреть файл

@ -23,6 +23,7 @@ enum nsDOMClassInfoID
eDOMClassInfo_CSSStyleRule_id,
eDOMClassInfo_CSSImportRule_id,
eDOMClassInfo_CSSMediaRule_id,
eDOMClassInfo_CSSNameSpaceRule_id,
// XUL classes
#ifdef MOZ_XUL

Просмотреть файл

@ -21,6 +21,7 @@ class ProcessGlobal;
} // namespace dom
namespace css {
class ImportRule;
class NameSpaceRule;
class StyleRule;
class MediaRule;
class DocumentRule;
@ -295,6 +296,7 @@ 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;

Просмотреть файл

@ -200,17 +200,12 @@ DOMInterfaces = {
'wrapperCache': False
},
'CSSNamespaceRule': {
'nativeType': 'mozilla::css::NameSpaceRule',
},
'CSSPrimitiveValue': {
'nativeType': 'nsROCSSPrimitiveValue',
},
'CSSRule': {
'hasXPConnectImpls': True,
'concrete': False,
'nativeType': 'mozilla::css::Rule'
},

Просмотреть файл

@ -15,7 +15,6 @@
#include "nsTArray.h"
#include "js/TypeDecls.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/TypedArray.h"
namespace mozilla {

Просмотреть файл

@ -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!

Просмотреть файл

@ -1,16 +0,0 @@
/* -*- 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;
};

Просмотреть файл

@ -90,7 +90,6 @@ WEBIDL_FILES = [
'CSS.webidl',
'CSSAnimation.webidl',
'CSSLexer.webidl',
'CSSNamespaceRule.webidl',
'CSSPrimitiveValue.webidl',
'CSSPseudoElement.webidl',
'CSSRule.webidl',

Просмотреть файл

@ -33,7 +33,6 @@
#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"
@ -1121,6 +1120,7 @@ NameSpaceRule::NameSpaceRule(nsIAtom* aPrefix, const nsString& aURLSpec,
mPrefix(aPrefix),
mURLSpec(aURLSpec)
{
SetIsNotDOMBinding();
}
NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy)
@ -1128,6 +1128,7 @@ NameSpaceRule::NameSpaceRule(const NameSpaceRule& aCopy)
mPrefix(aCopy.mPrefix),
mURLSpec(aCopy.mURLSpec)
{
SetIsNotDOMBinding();
}
NameSpaceRule::~NameSpaceRule()
@ -1147,6 +1148,7 @@ NS_INTERFACE_MAP_BEGIN(NameSpaceRule)
return NS_OK;
}
else
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSNameSpaceRule)
NS_INTERFACE_MAP_END_INHERITING(Rule)
bool
@ -1227,7 +1229,8 @@ NameSpaceRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
NameSpaceRule::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto)
{
return CSSNamespaceRuleBinding::Wrap(aCx, this, aGivenProto);
NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor");
return nullptr;
}
} // namespace css