diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/style/SVGAttrAnimationRuleProcessor.cpp | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/style/SVGAttrAnimationRuleProcessor.cpp')
-rw-r--r-- | layout/style/SVGAttrAnimationRuleProcessor.cpp | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/layout/style/SVGAttrAnimationRuleProcessor.cpp b/layout/style/SVGAttrAnimationRuleProcessor.cpp new file mode 100644 index 000000000..9eb31b1b2 --- /dev/null +++ b/layout/style/SVGAttrAnimationRuleProcessor.cpp @@ -0,0 +1,122 @@ +/* -*- 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/. + */ + +/* + * style rule processor for rules from SMIL Animation of SVG mapped + * attributes (attributes whose values are mapped into style) + */ + +#include "SVGAttrAnimationRuleProcessor.h" +#include "nsRuleProcessorData.h" +#include "nsSVGElement.h" + +using namespace mozilla; +using namespace mozilla::dom; + +SVGAttrAnimationRuleProcessor::SVGAttrAnimationRuleProcessor() +{ +} + +SVGAttrAnimationRuleProcessor::~SVGAttrAnimationRuleProcessor() +{ +} + +NS_IMPL_ISUPPORTS(SVGAttrAnimationRuleProcessor, nsIStyleRuleProcessor) + +/* virtual */ void +SVGAttrAnimationRuleProcessor::RulesMatching(ElementRuleProcessorData* aData) +{ + ElementRulesMatching(aData->mElement, aData->mRuleWalker); +} + +void +SVGAttrAnimationRuleProcessor::ElementRulesMatching(Element* aElement, + nsRuleWalker* aRuleWalker) +{ + if (aElement->IsSVGElement()) { + static_cast<nsSVGElement*>(aElement)-> + WalkAnimatedContentStyleRules(aRuleWalker); + } +} + +/* virtual */ nsRestyleHint +SVGAttrAnimationRuleProcessor::HasStateDependentStyle(StateRuleProcessorData* aData) +{ + return nsRestyleHint(0); +} + +/* virtual */ nsRestyleHint +SVGAttrAnimationRuleProcessor::HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) +{ + return nsRestyleHint(0); +} + +/* virtual */ bool +SVGAttrAnimationRuleProcessor::HasDocumentStateDependentStyle(StateRuleProcessorData* aData) +{ + return false; +} + +/* virtual */ nsRestyleHint +SVGAttrAnimationRuleProcessor::HasAttributeDependentStyle( + AttributeRuleProcessorData* aData, + RestyleHintData& aRestyleHintDataResult) +{ + return nsRestyleHint(0); +} + +/* virtual */ bool +SVGAttrAnimationRuleProcessor::MediumFeaturesChanged(nsPresContext* aPresContext) +{ + return false; +} + +/* virtual */ void +SVGAttrAnimationRuleProcessor::RulesMatching(PseudoElementRuleProcessorData* aData) +{ + // If SMIL Animation of SVG attributes can ever target + // pseudo-elements, we need to adjust either + // nsStyleSet::RuleNodeWithReplacement or the test in + // ElementRestyler::RestyleSelf (added in bug 977991 patch 4) to + // handle such styles. +} + +/* virtual */ void +SVGAttrAnimationRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData) +{ + // If SMIL Animation of SVG attributes can ever target anonymous boxes, + // see comment in RulesMatching(PseudoElementRuleProcessorData*). +} + +#ifdef MOZ_XUL +/* virtual */ void +SVGAttrAnimationRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData) +{ + // If SMIL Animation of SVG attributes can ever target XUL tree pseudos, + // see comment in RulesMatching(PseudoElementRuleProcessorData*). +} +#endif + +/* virtual */ size_t +SVGAttrAnimationRuleProcessor::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const +{ + return 0; // SVGAttrAnimationRuleProcessors are charged to the DOM, not layout +} + +/* virtual */ size_t +SVGAttrAnimationRuleProcessor::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const +{ + return 0; // SVGAttrAnimationRuleProcessors are charged to the DOM, not layout +} + +size_t +SVGAttrAnimationRuleProcessor::DOMSizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const +{ + size_t n = aMallocSizeOf(this); + + return n; +} |