Bumping manifests a=b2g-bump
[gecko.git] / layout / style / SVGAttrAnimationRuleProcessor.cpp
blobc1323e2a74b430a14c7e0d316de69c33413fd604
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 */
8 /*
9 * style rule processor for rules from SMIL Animation of SVG mapped
10 * attributes (attributes whose values are mapped into style)
13 #include "SVGAttrAnimationRuleProcessor.h"
14 #include "nsRuleProcessorData.h"
15 #include "nsSVGElement.h"
17 using namespace mozilla;
18 using namespace mozilla::dom;
20 SVGAttrAnimationRuleProcessor::SVGAttrAnimationRuleProcessor()
24 SVGAttrAnimationRuleProcessor::~SVGAttrAnimationRuleProcessor()
28 NS_IMPL_ISUPPORTS(SVGAttrAnimationRuleProcessor, nsIStyleRuleProcessor)
30 /* virtual */ void
31 SVGAttrAnimationRuleProcessor::RulesMatching(ElementRuleProcessorData* aData)
33 ElementRulesMatching(aData->mElement, aData->mRuleWalker);
36 void
37 SVGAttrAnimationRuleProcessor::ElementRulesMatching(Element* aElement,
38 nsRuleWalker* aRuleWalker)
40 if (aElement->IsSVG()) {
41 static_cast<nsSVGElement*>(aElement)->
42 WalkAnimatedContentStyleRules(aRuleWalker);
46 /* virtual */ nsRestyleHint
47 SVGAttrAnimationRuleProcessor::HasStateDependentStyle(StateRuleProcessorData* aData)
49 return nsRestyleHint(0);
52 /* virtual */ nsRestyleHint
53 SVGAttrAnimationRuleProcessor::HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData)
55 return nsRestyleHint(0);
58 /* virtual */ bool
59 SVGAttrAnimationRuleProcessor::HasDocumentStateDependentStyle(StateRuleProcessorData* aData)
61 return false;
64 /* virtual */ nsRestyleHint
65 SVGAttrAnimationRuleProcessor::HasAttributeDependentStyle(AttributeRuleProcessorData* aData)
67 return nsRestyleHint(0);
70 /* virtual */ bool
71 SVGAttrAnimationRuleProcessor::MediumFeaturesChanged(nsPresContext* aPresContext)
73 return false;
76 /* virtual */ void
77 SVGAttrAnimationRuleProcessor::RulesMatching(PseudoElementRuleProcessorData* aData)
79 // If SMIL Animation of SVG attributes can ever target
80 // pseudo-elements, we need to adjust either
81 // nsStyleSet::RuleNodeWithReplacement or the test in
82 // ElementRestyler::RestyleSelf (added in bug 977991 patch 4) to
83 // handle such styles.
86 /* virtual */ void
87 SVGAttrAnimationRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData)
89 // If SMIL Animation of SVG attributes can ever target anonymous boxes,
90 // see comment in RulesMatching(PseudoElementRuleProcessorData*).
93 #ifdef MOZ_XUL
94 /* virtual */ void
95 SVGAttrAnimationRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
97 // If SMIL Animation of SVG attributes can ever target XUL tree pseudos,
98 // see comment in RulesMatching(PseudoElementRuleProcessorData*).
100 #endif
102 /* virtual */ size_t
103 SVGAttrAnimationRuleProcessor::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
105 return 0; // SVGAttrAnimationRuleProcessors are charged to the DOM, not layout
108 /* virtual */ size_t
109 SVGAttrAnimationRuleProcessor::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
111 return 0; // SVGAttrAnimationRuleProcessors are charged to the DOM, not layout
114 size_t
115 SVGAttrAnimationRuleProcessor::DOMSizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
117 size_t n = aMallocSizeOf(this);
119 return n;