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/. */
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
;
21 typedef void (*nsMapRuleToAttributesFunc
)(const nsMappedAttributes
* aAttributes
,
24 typedef nsStyledElement nsMappedAttributeElementBase
;
26 class nsMappedAttributeElement
: public nsMappedAttributeElementBase
31 explicit nsMappedAttributeElement(already_AddRefed
<mozilla::dom::NodeInfo
>& aNodeInfo
)
32 : nsMappedAttributeElementBase(aNodeInfo
)
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
,
45 nsresult
* aRetval
) MOZ_OVERRIDE
;
48 #endif // NS_MAPPEDATTRIBUTEELEMENT_H_