no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / html / HTMLLIElement.h
blobe73a49107e76fcb2b1f312b315159f8c8e1f1e5b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef mozilla_dom_HTMLLIElement_h
8 #define mozilla_dom_HTMLLIElement_h
10 #include "mozilla/Attributes.h"
12 #include "nsGenericHTMLElement.h"
14 namespace mozilla::dom {
16 class HTMLLIElement final : public nsGenericHTMLElement {
17 public:
18 explicit HTMLLIElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
19 : nsGenericHTMLElement(std::move(aNodeInfo)) {}
21 // nsISupports
22 NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLIElement, nsGenericHTMLElement)
24 bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
25 const nsAString& aValue,
26 nsIPrincipal* aMaybeScriptedPrincipal,
27 nsAttrValue& aResult) override;
28 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
29 nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
30 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
32 // WebIDL API
33 void GetType(DOMString& aType) { GetHTMLAttr(nsGkAtoms::type, aType); }
34 void SetType(const nsAString& aType, mozilla::ErrorResult& rv) {
35 SetHTMLAttr(nsGkAtoms::type, aType, rv);
37 int32_t Value() const { return GetIntAttr(nsGkAtoms::value, 0); }
38 void SetValue(int32_t aValue, mozilla::ErrorResult& rv) {
39 SetHTMLIntAttr(nsGkAtoms::value, aValue, rv);
42 static const nsAttrValue::EnumTable kULTypeTable[];
43 static const nsAttrValue::EnumTable kOLTypeTable[];
45 protected:
46 virtual ~HTMLLIElement();
48 JSObject* WrapNode(JSContext*, JS::Handle<JSObject*> aGivenProto) override;
50 private:
51 static void MapAttributesIntoRule(MappedDeclarationsBuilder&);
54 } // namespace mozilla::dom
56 #endif // mozilla_dom_HTMLLIElement_h