mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 01:27:30 +09:00
Issue #2490 - Part 12: Convert CSSStyleRule to WebIDL.
The .style PutForwards bit is coming along for the ride here, aligning us with the behavior of Blink and Gecko.
This commit is contained in:
parent
525606c15d
commit
6176bd62d9
15 changed files with 132 additions and 55 deletions
|
|
@ -80,7 +80,6 @@
|
||||||
#include "nsIDOMCSSSupportsRule.h"
|
#include "nsIDOMCSSSupportsRule.h"
|
||||||
#include "nsIDOMCSSCounterStyleRule.h"
|
#include "nsIDOMCSSCounterStyleRule.h"
|
||||||
#include "nsIDOMCSSPageRule.h"
|
#include "nsIDOMCSSPageRule.h"
|
||||||
#include "nsIDOMCSSStyleRule.h"
|
|
||||||
#include "nsIDOMXULCommandDispatcher.h"
|
#include "nsIDOMXULCommandDispatcher.h"
|
||||||
#include "nsIControllers.h"
|
#include "nsIControllers.h"
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
|
|
@ -188,9 +187,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
||||||
// Misc Core related classes
|
// Misc Core related classes
|
||||||
|
|
||||||
// CSS classes
|
// CSS classes
|
||||||
NS_DEFINE_CLASSINFO_DATA(CSSStyleRule, nsCSSRuleSH,
|
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS |
|
|
||||||
nsIXPCScriptable::WANT_PRECREATE)
|
|
||||||
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)
|
||||||
|
|
@ -516,11 +512,6 @@ nsDOMClassInfo::Init()
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMConstructor)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMConstructor)
|
||||||
DOM_CLASSINFO_MAP_END
|
DOM_CLASSINFO_MAP_END
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(CSSStyleRule, nsIDOMCSSStyleRule)
|
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRule)
|
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleRule)
|
|
||||||
DOM_CLASSINFO_MAP_END
|
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(CSSMediaRule, nsIDOMCSSMediaRule)
|
DOM_CLASSINFO_MAP_BEGIN(CSSMediaRule, nsIDOMCSSMediaRule)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRule)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRule)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMediaRule)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMediaRule)
|
||||||
|
|
@ -2000,14 +1991,6 @@ nsCSSRuleSH::PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
css::Rule* cssRule = rule->GetCSSRule();
|
css::Rule* cssRule = rule->GetCSSRule();
|
||||||
if (!cssRule) {
|
|
||||||
// A DOMCSSStyleRule whose actual underlying rule has gone away. There
|
|
||||||
// isn't much a caller can do with this thing anyway, and only chrome code
|
|
||||||
// can get its hands on it to start with, so just wrap in the current
|
|
||||||
// global.
|
|
||||||
*parentObj = globalObj;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
nsIDocument* doc = cssRule->GetDocument();
|
nsIDocument* doc = cssRule->GetDocument();
|
||||||
if (!doc) {
|
if (!doc) {
|
||||||
*parentObj = globalObj;
|
*parentObj = globalObj;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ DOMCI_CLASS(DOMPrototype)
|
||||||
DOMCI_CLASS(DOMConstructor)
|
DOMCI_CLASS(DOMConstructor)
|
||||||
|
|
||||||
// CSS classes
|
// CSS classes
|
||||||
DOMCI_CLASS(CSSStyleRule)
|
|
||||||
DOMCI_CLASS(CSSMediaRule)
|
DOMCI_CLASS(CSSMediaRule)
|
||||||
|
|
||||||
// XUL classes
|
// XUL classes
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ class TabChildGlobal;
|
||||||
class ProcessGlobal;
|
class ProcessGlobal;
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
namespace css {
|
namespace css {
|
||||||
class StyleRule;
|
|
||||||
class MediaRule;
|
class MediaRule;
|
||||||
class DocumentRule;
|
class DocumentRule;
|
||||||
} // namespace css
|
} // namespace css
|
||||||
|
|
@ -291,7 +290,6 @@ private:
|
||||||
friend class SandboxPrivate;
|
friend class SandboxPrivate;
|
||||||
friend class nsInProcessTabChildGlobal;
|
friend class nsInProcessTabChildGlobal;
|
||||||
friend class nsWindowRoot;
|
friend class nsWindowRoot;
|
||||||
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;
|
||||||
friend class mozilla::CSSSupportsRule;
|
friend class mozilla::CSSSupportsRule;
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,10 @@ DOMInterfaces = {
|
||||||
'nativeType': 'nsICSSDeclaration'
|
'nativeType': 'nsICSSDeclaration'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'CSSStyleRule': {
|
||||||
|
'nativeType': 'mozilla::BindingStyleRule',
|
||||||
|
},
|
||||||
|
|
||||||
'CSSStyleSheet': {
|
'CSSStyleSheet': {
|
||||||
'nativeType': 'mozilla::StyleSheet',
|
'nativeType': 'mozilla::StyleSheet',
|
||||||
'binaryNames': { 'ownerRule': 'DOMOwnerRule' },
|
'binaryNames': { 'ownerRule': 'DOMOwnerRule' },
|
||||||
|
|
|
||||||
14
dom/webidl/CSSStyleRule.webidl
Normal file
14
dom/webidl/CSSStyleRule.webidl
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
/* -*- 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/#the-cssstylerule-interface
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://drafts.csswg.org/cssom/#the-cssstylerule-interface
|
||||||
|
interface CSSStyleRule : CSSRule {
|
||||||
|
attribute DOMString selectorText;
|
||||||
|
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
|
||||||
|
};
|
||||||
|
|
@ -26,6 +26,7 @@ Comment implements LegacyQueryInterface;
|
||||||
Crypto implements LegacyQueryInterface;
|
Crypto implements LegacyQueryInterface;
|
||||||
CSSPrimitiveValue implements LegacyQueryInterface;
|
CSSPrimitiveValue implements LegacyQueryInterface;
|
||||||
CSSStyleDeclaration implements LegacyQueryInterface;
|
CSSStyleDeclaration implements LegacyQueryInterface;
|
||||||
|
CSSStyleRule implements LegacyQueryInterface;
|
||||||
CSSValueList implements LegacyQueryInterface;
|
CSSValueList implements LegacyQueryInterface;
|
||||||
DOMImplementation implements LegacyQueryInterface;
|
DOMImplementation implements LegacyQueryInterface;
|
||||||
DOMParser implements LegacyQueryInterface;
|
DOMParser implements LegacyQueryInterface;
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ WEBIDL_FILES = [
|
||||||
'CSSRule.webidl',
|
'CSSRule.webidl',
|
||||||
'CSSRuleList.webidl',
|
'CSSRuleList.webidl',
|
||||||
'CSSStyleDeclaration.webidl',
|
'CSSStyleDeclaration.webidl',
|
||||||
|
'CSSStyleRule.webidl',
|
||||||
'CSSStyleSheet.webidl',
|
'CSSStyleSheet.webidl',
|
||||||
'CSSTransition.webidl',
|
'CSSTransition.webidl',
|
||||||
'CSSValue.webidl',
|
'CSSValue.webidl',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="data:text/css,div {}">
|
|
||||||
<title>Test Cross-Compartment DOM WeakMaps</title>
|
<title>Test Cross-Compartment DOM WeakMaps</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,6 @@ function setup() {
|
||||||
var item = window.frames[0].document.querySelector("body");
|
var item = window.frames[0].document.querySelector("body");
|
||||||
|
|
||||||
my_map.set(item, "success_string");
|
my_map.set(item, "success_string");
|
||||||
|
|
||||||
var rule_fail = false;
|
|
||||||
try {
|
|
||||||
my_map.set(window.frames[0].document.styleSheets[0].cssRules[0], 1);
|
|
||||||
} catch (e) {
|
|
||||||
rule_fail = true;
|
|
||||||
}
|
|
||||||
ok(rule_fail, "Using rule as a weak map key across compartments should produce an exception because it can't be wrapper preserved.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function runTest() {
|
function runTest() {
|
||||||
|
|
|
||||||
18
layout/style/BindingStyleRule.cpp
Normal file
18
layout/style/BindingStyleRule.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* -*- Mode: C++; 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/. */
|
||||||
|
|
||||||
|
#include "mozilla/BindingStyleRule.h"
|
||||||
|
#include "mozilla/dom/CSSStyleRuleBinding.h"
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
|
||||||
|
/* virtual */ JSObject*
|
||||||
|
BindingStyleRule::WrapObject(JSContext* aCx,
|
||||||
|
JS::Handle<JSObject*> aGivenProto)
|
||||||
|
{
|
||||||
|
return dom::CSSStyleRuleBinding::Wrap(aCx, this, aGivenProto);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace mozilla
|
||||||
60
layout/style/BindingStyleRule.h
Normal file
60
layout/style/BindingStyleRule.h
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
/* -*- Mode: C++; 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/. */
|
||||||
|
|
||||||
|
#ifndef mozilla_BindingStyleRule_h__
|
||||||
|
#define mozilla_BindingStyleRule_h__
|
||||||
|
|
||||||
|
#include "nscore.h"
|
||||||
|
#include "nsStringGlue.h"
|
||||||
|
#include "mozilla/css/Rule.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Superclass for mozilla::css::StyleRule, for use from bindings code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class nsICSSDeclaration;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
|
||||||
|
class BindingStyleRule : public css::Rule
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
BindingStyleRule(uint32_t aLineNumber, uint32_t aColumnNumber)
|
||||||
|
: css::Rule(aLineNumber, aColumnNumber)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
BindingStyleRule(const BindingStyleRule& aCopy)
|
||||||
|
: css::Rule(aCopy)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
virtual ~BindingStyleRule() {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
// This is pure virtual because we have no members, and are an abstract class
|
||||||
|
// to start with. The fact that we have to have this declaration at all is
|
||||||
|
// kinda dumb. :(
|
||||||
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
||||||
|
const override MOZ_MUST_OVERRIDE = 0;
|
||||||
|
|
||||||
|
// Likewise for this one. We have to override our superclass, but don't
|
||||||
|
// really need to do anything in this method.
|
||||||
|
virtual bool IsCCLeaf() const override MOZ_MUST_OVERRIDE = 0;
|
||||||
|
|
||||||
|
// WebIDL API
|
||||||
|
// For GetSelectorText/SetSelectorText, we purposefully use a signature that
|
||||||
|
// matches the nsIDOMCSSStyleRule one for now, so subclasses can just
|
||||||
|
// implement both at once. The actual implementations must never return
|
||||||
|
// anything other than NS_OK;
|
||||||
|
NS_IMETHOD GetSelectorText(nsAString& aSelectorText) = 0;
|
||||||
|
NS_IMETHOD SetSelectorText(const nsAString& aSelectorText) = 0;
|
||||||
|
virtual nsICSSDeclaration* Style() = 0;
|
||||||
|
|
||||||
|
virtual JSObject* WrapObject(JSContext* aCx,
|
||||||
|
JS::Handle<JSObject*> aGivenProto) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mozilla
|
||||||
|
|
||||||
|
#endif // mozilla_BindingStyleRule_h__
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
#include "mozilla/MemoryReporting.h"
|
#include "mozilla/MemoryReporting.h"
|
||||||
#include "mozilla/css/GroupRule.h"
|
#include "mozilla/css/GroupRule.h"
|
||||||
#include "mozilla/css/Declaration.h"
|
#include "mozilla/css/Declaration.h"
|
||||||
|
#include "mozilla/dom/CSSStyleRuleBinding.h"
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
#include "nsIAtom.h"
|
#include "nsIAtom.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
|
@ -26,7 +27,6 @@
|
||||||
#include "nsCSSPseudoClasses.h"
|
#include "nsCSSPseudoClasses.h"
|
||||||
#include "nsCSSAnonBoxes.h"
|
#include "nsCSSAnonBoxes.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsDOMClassInfoID.h"
|
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsError.h"
|
#include "nsError.h"
|
||||||
#include "mozAutoDocUpdate.h"
|
#include "mozAutoDocUpdate.h"
|
||||||
|
|
@ -1235,13 +1235,18 @@ StyleRule::Type() const
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
StyleRule::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
|
StyleRule::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
|
||||||
|
{
|
||||||
|
NS_ADDREF(*aStyle = Style());
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsICSSDeclaration*
|
||||||
|
StyleRule::Style()
|
||||||
{
|
{
|
||||||
if (!mDOMDeclaration) {
|
if (!mDOMDeclaration) {
|
||||||
mDOMDeclaration.reset(new DOMCSSDeclarationImpl(this));
|
mDOMDeclaration.reset(new DOMCSSDeclarationImpl(this));
|
||||||
}
|
}
|
||||||
*aStyle = mDOMDeclaration.get();
|
return mDOMDeclaration.get();
|
||||||
NS_ADDREF(*aStyle);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
@ -1256,11 +1261,10 @@ StyleRule::StyleRule(nsCSSSelectorList* aSelector,
|
||||||
Declaration* aDeclaration,
|
Declaration* aDeclaration,
|
||||||
uint32_t aLineNumber,
|
uint32_t aLineNumber,
|
||||||
uint32_t aColumnNumber)
|
uint32_t aColumnNumber)
|
||||||
: Rule(aLineNumber, aColumnNumber),
|
: BindingStyleRule(aLineNumber, aColumnNumber)
|
||||||
mSelector(aSelector),
|
, mSelector(aSelector)
|
||||||
mDeclaration(aDeclaration)
|
, mDeclaration(aDeclaration)
|
||||||
{
|
{
|
||||||
SetIsNotDOMBinding();
|
|
||||||
NS_PRECONDITION(aDeclaration, "must have a declaration");
|
NS_PRECONDITION(aDeclaration, "must have a declaration");
|
||||||
|
|
||||||
mDeclaration->SetOwningRule(this);
|
mDeclaration->SetOwningRule(this);
|
||||||
|
|
@ -1268,11 +1272,10 @@ StyleRule::StyleRule(nsCSSSelectorList* aSelector,
|
||||||
|
|
||||||
// for |Clone|
|
// for |Clone|
|
||||||
StyleRule::StyleRule(const StyleRule& aCopy)
|
StyleRule::StyleRule(const StyleRule& aCopy)
|
||||||
: Rule(aCopy),
|
: BindingStyleRule(aCopy)
|
||||||
mSelector(aCopy.mSelector ? aCopy.mSelector->Clone() : nullptr),
|
, mSelector(aCopy.mSelector ? aCopy.mSelector->Clone() : nullptr)
|
||||||
mDeclaration(new Declaration(*aCopy.mDeclaration))
|
, mDeclaration(new Declaration(*aCopy.mDeclaration))
|
||||||
{
|
{
|
||||||
SetIsNotDOMBinding();
|
|
||||||
mDeclaration->SetOwningRule(this);
|
mDeclaration->SetOwningRule(this);
|
||||||
// rest is constructed lazily on existing data
|
// rest is constructed lazily on existing data
|
||||||
}
|
}
|
||||||
|
|
@ -1301,7 +1304,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(StyleRule)
|
||||||
else
|
else
|
||||||
NS_INTERFACE_MAP_ENTRY(nsICSSStyleRuleDOMWrapper)
|
NS_INTERFACE_MAP_ENTRY(nsICSSStyleRuleDOMWrapper)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleRule)
|
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleRule)
|
||||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSStyleRule)
|
|
||||||
NS_INTERFACE_MAP_END_INHERITING(Rule)
|
NS_INTERFACE_MAP_END_INHERITING(Rule)
|
||||||
|
|
||||||
NS_IMPL_ADDREF_INHERITED(StyleRule, Rule)
|
NS_IMPL_ADDREF_INHERITED(StyleRule, Rule)
|
||||||
|
|
@ -1496,12 +1498,5 @@ StyleRule::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ JSObject*
|
|
||||||
StyleRule::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|
||||||
{
|
|
||||||
NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor");
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace css
|
} // namespace css
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/MemoryReporting.h"
|
#include "mozilla/MemoryReporting.h"
|
||||||
#include "mozilla/UniquePtr.h"
|
#include "mozilla/UniquePtr.h"
|
||||||
#include "mozilla/css/Rule.h"
|
#include "mozilla/BindingStyleRule.h"
|
||||||
|
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
|
|
@ -325,7 +325,7 @@ namespace css {
|
||||||
|
|
||||||
class Declaration;
|
class Declaration;
|
||||||
|
|
||||||
class StyleRule final : public Rule
|
class StyleRule final : public BindingStyleRule
|
||||||
, public nsICSSStyleRuleDOMWrapper
|
, public nsICSSStyleRuleDOMWrapper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -350,6 +350,7 @@ public:
|
||||||
// WebIDL interface
|
// WebIDL interface
|
||||||
uint16_t Type() const override;
|
uint16_t Type() const override;
|
||||||
void GetCssTextImpl(nsAString& aCssText) const override;
|
void GetCssTextImpl(nsAString& aCssText) const override;
|
||||||
|
virtual nsICSSDeclaration* Style() override;
|
||||||
|
|
||||||
// null for style attribute
|
// null for style attribute
|
||||||
nsCSSSelectorList* Selector() { return mSelector; }
|
nsCSSSelectorList* Selector() { return mSelector; }
|
||||||
|
|
@ -369,8 +370,6 @@ public:
|
||||||
|
|
||||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||||
|
|
||||||
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~StyleRule();
|
~StyleRule();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ EXPORTS += [
|
||||||
|
|
||||||
EXPORTS.mozilla += [
|
EXPORTS.mozilla += [
|
||||||
'AnimationCollection.h',
|
'AnimationCollection.h',
|
||||||
|
'BindingStyleRule.h',
|
||||||
'CSSEnabledState.h',
|
'CSSEnabledState.h',
|
||||||
'CSSStyleSheet.h',
|
'CSSStyleSheet.h',
|
||||||
'CSSVariableDeclarations.h',
|
'CSSVariableDeclarations.h',
|
||||||
|
|
@ -177,10 +178,18 @@ UNIFIED_SOURCES += [
|
||||||
'SVGAttrAnimationRuleProcessor.cpp',
|
'SVGAttrAnimationRuleProcessor.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
# nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h.
|
# - BindingStyleRule.cpp doesn't necessarily need to be built separately,
|
||||||
# nsLayoutStylesheetCache.cpp needs to be built separately because it uses
|
# however, it may shift unified build boundaries, causing
|
||||||
|
# the Unified CPP containing it to include nsStyleCoord.cpp, which
|
||||||
|
# includes, via nsStyleCoord.h, <type_traits>, which ends up including
|
||||||
|
# <xutility>, which fails in much the way described in
|
||||||
|
# <https://bugzilla.mozilla.org/show_bug.cgi?id=1331102>.
|
||||||
|
# - nsCSSRuleProcessor.cpp needs to be built separately because it uses
|
||||||
|
# plarena.h.
|
||||||
|
# - nsLayoutStylesheetCache.cpp needs to be built separately because it uses
|
||||||
# nsExceptionHandler.h, which includes windows.h.
|
# nsExceptionHandler.h, which includes windows.h.
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
|
'BindingStyleRule.cpp',
|
||||||
'nsCSSRuleProcessor.cpp',
|
'nsCSSRuleProcessor.cpp',
|
||||||
'nsLayoutStylesheetCache.cpp',
|
'nsLayoutStylesheetCache.cpp',
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@
|
||||||
#define NS_ICSS_STYLE_RULE_DOM_WRAPPER_IID \
|
#define NS_ICSS_STYLE_RULE_DOM_WRAPPER_IID \
|
||||||
{0xcee1bbb6, 0x0a32, 0x4cf3, {0x8d, 0x42, 0xba, 0x39, 0x38, 0xe9, 0xec, 0xaa}}
|
{0xcee1bbb6, 0x0a32, 0x4cf3, {0x8d, 0x42, 0xba, 0x39, 0x38, 0xe9, 0xec, 0xaa}}
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace css {
|
||||||
|
class StyleRule;
|
||||||
|
} // namespace css
|
||||||
|
} // namespace mozilla
|
||||||
|
|
||||||
class nsICSSStyleRuleDOMWrapper : public nsIDOMCSSStyleRule {
|
class nsICSSStyleRuleDOMWrapper : public nsIDOMCSSStyleRule {
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue