Bumping gaia.json for 8 gaia revision(s) a=gaia-bump
[gecko.git] / dom / base / nsMappedAttributeElement.h
blob301b0682d133a6e26d8c618f93276a91a6a67906
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set tw=80 expandtab softtabstop=2 ts=2 sw=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/. */
7 /**
8 * nsMappedAttributeElement is the base for elements supporting style mapped
9 * attributes via nsMappedAttributes (HTML and MathML).
12 #ifndef NS_MAPPEDATTRIBUTEELEMENT_H_
13 #define NS_MAPPEDATTRIBUTEELEMENT_H_
15 #include "mozilla/Attributes.h"
16 #include "nsStyledElement.h"
18 class nsMappedAttributes;
19 struct nsRuleData;
21 typedef void (*nsMapRuleToAttributesFunc)(const nsMappedAttributes* aAttributes,
22 nsRuleData* aData);
24 typedef nsStyledElement nsMappedAttributeElementBase;
26 class nsMappedAttributeElement : public nsMappedAttributeElementBase
29 protected:
31 explicit nsMappedAttributeElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
32 : nsMappedAttributeElementBase(aNodeInfo)
35 public:
36 virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
38 static void MapNoAttributesInto(const nsMappedAttributes* aAttributes,
39 nsRuleData* aRuleData);
41 NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) MOZ_OVERRIDE;
42 virtual bool SetMappedAttribute(nsIDocument* aDocument,
43 nsIAtom* aName,
44 nsAttrValue& aValue,
45 nsresult* aRetval) MOZ_OVERRIDE;
48 #endif // NS_MAPPEDATTRIBUTEELEMENT_H_