зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1449103 part 2 - Make CSSKeyframesRule inherit from Rule directly. r=emilio
The spec doesn't say CSSKeyframesRule needs to inherit CSSGroupingRule. It inherited GroupRule because Gecko's keyframes rule implementation relies on that to manage its children. MozReview-Commit-ID: CnVP2tozwQU --HG-- extra : rebase_source : 63c61d7b7d003ff82bd73e183516f6076a2dafb6
This commit is contained in:
Родитель
70a598f41e
Коммит
637c9b2a86
|
@ -7,20 +7,22 @@
|
||||||
#ifndef mozilla_dom_CSSKeyframesRule_h
|
#ifndef mozilla_dom_CSSKeyframesRule_h
|
||||||
#define mozilla_dom_CSSKeyframesRule_h
|
#define mozilla_dom_CSSKeyframesRule_h
|
||||||
|
|
||||||
#include "mozilla/css/GroupRule.h"
|
#include "mozilla/css/Rule.h"
|
||||||
#include "mozilla/dom/CSSKeyframeRule.h"
|
#include "mozilla/dom/CSSKeyframeRule.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class CSSKeyframesRule : public css::GroupRule
|
class CSSKeyframesRule : public css::Rule
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
using css::GroupRule::GroupRule;
|
using css::Rule::Rule;
|
||||||
virtual ~CSSKeyframesRule() {}
|
virtual ~CSSKeyframesRule() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t GetType() const final { return Rule::KEYFRAMES_RULE; }
|
int32_t GetType() const final { return Rule::KEYFRAMES_RULE; }
|
||||||
|
// Let's not worry for now about sorting out whether we're a leaf or not.
|
||||||
|
bool IsCCLeaf() const override { return false; }
|
||||||
|
|
||||||
// WebIDL interface
|
// WebIDL interface
|
||||||
uint16_t Type() const final { return CSSRuleBinding::KEYFRAMES_RULE; }
|
uint16_t Type() const final { return CSSRuleBinding::KEYFRAMES_RULE; }
|
||||||
|
|
|
@ -158,10 +158,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||||
|
|
||||||
ServoKeyframesRule::ServoKeyframesRule(RefPtr<RawServoKeyframesRule> aRawRule,
|
ServoKeyframesRule::ServoKeyframesRule(RefPtr<RawServoKeyframesRule> aRawRule,
|
||||||
uint32_t aLine, uint32_t aColumn)
|
uint32_t aLine, uint32_t aColumn)
|
||||||
// Although this class inherits from GroupRule, we don't want to use
|
|
||||||
// it at all, so it is fine to call the constructor for Gecko. We can
|
|
||||||
// make CSSKeyframesRule inherit from Rule directly once we can get
|
|
||||||
// rid of nsCSSKeyframeRule.
|
|
||||||
: dom::CSSKeyframesRule(aLine, aColumn)
|
: dom::CSSKeyframesRule(aLine, aColumn)
|
||||||
, mRawRule(Move(aRawRule))
|
, mRawRule(Move(aRawRule))
|
||||||
{
|
{
|
||||||
|
@ -347,7 +343,6 @@ ServoKeyframesRule::FindRule(const nsAString& aKey)
|
||||||
ServoKeyframesRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
ServoKeyframesRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
||||||
{
|
{
|
||||||
size_t n = aMallocSizeOf(this);
|
size_t n = aMallocSizeOf(this);
|
||||||
n += GroupRule::SizeOfExcludingThis(aMallocSizeOf);
|
|
||||||
if (mKeyframeList) {
|
if (mKeyframeList) {
|
||||||
n += mKeyframeList->SizeOfIncludingThis(aMallocSizeOf);
|
n += mKeyframeList->SizeOfIncludingThis(aMallocSizeOf);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче