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