/work/obj-fuzz/dist/include/mozilla/dom/HTMLLIElement.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #ifndef mozilla_dom_HTMLLIElement_h |
8 | | #define mozilla_dom_HTMLLIElement_h |
9 | | |
10 | | #include "mozilla/Attributes.h" |
11 | | |
12 | | #include "nsGenericHTMLElement.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | class HTMLLIElement final : public nsGenericHTMLElement |
18 | | { |
19 | | public: |
20 | | explicit HTMLLIElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) |
21 | | : nsGenericHTMLElement(std::move(aNodeInfo)) |
22 | 0 | { |
23 | 0 | } |
24 | | |
25 | | // nsISupports |
26 | | NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLLIElement, nsGenericHTMLElement) |
27 | | |
28 | | virtual bool ParseAttribute(int32_t aNamespaceID, |
29 | | nsAtom* aAttribute, |
30 | | const nsAString& aValue, |
31 | | nsIPrincipal* aMaybeScriptedPrincipal, |
32 | | nsAttrValue& aResult) override; |
33 | | NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override; |
34 | | virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override; |
35 | | virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; |
36 | | |
37 | | // WebIDL API |
38 | | void GetType(DOMString& aType) |
39 | 0 | { |
40 | 0 | GetHTMLAttr(nsGkAtoms::type, aType); |
41 | 0 | } |
42 | | void SetType(const nsAString& aType, mozilla::ErrorResult& rv) |
43 | 0 | { |
44 | 0 | SetHTMLAttr(nsGkAtoms::type, aType, rv); |
45 | 0 | } |
46 | | int32_t Value() const |
47 | 0 | { |
48 | 0 | return GetIntAttr(nsGkAtoms::value, 0); |
49 | 0 | } |
50 | | void SetValue(int32_t aValue, mozilla::ErrorResult& rv) |
51 | 0 | { |
52 | 0 | SetHTMLIntAttr(nsGkAtoms::value, aValue, rv); |
53 | 0 | } |
54 | | |
55 | | protected: |
56 | | virtual ~HTMLLIElement(); |
57 | | |
58 | | virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override; |
59 | | |
60 | | private: |
61 | | static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, |
62 | | MappedDeclarations&); |
63 | | }; |
64 | | |
65 | | } // namespace dom |
66 | | } // namespace mozilla |
67 | | |
68 | | #endif // mozilla_dom_HTMLLIElement_h |