/work/obj-fuzz/dist/include/mozilla/dom/HTMLFontElement.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 | | #ifndef HTMLFontElement_h___ |
7 | | #define HTMLFontElement_h___ |
8 | | |
9 | | #include "mozilla/Attributes.h" |
10 | | #include "nsGenericHTMLElement.h" |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | class HTMLFontElement final : public nsGenericHTMLElement |
16 | | { |
17 | | public: |
18 | | explicit HTMLFontElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) |
19 | | : nsGenericHTMLElement(std::move(aNodeInfo)) |
20 | | { |
21 | | } |
22 | | |
23 | | void GetColor(DOMString& aColor) |
24 | 0 | { |
25 | 0 | GetHTMLAttr(nsGkAtoms::color, aColor); |
26 | 0 | } |
27 | | void SetColor(const nsAString& aColor, ErrorResult& aError) |
28 | 0 | { |
29 | 0 | SetHTMLAttr(nsGkAtoms::color, aColor, aError); |
30 | 0 | } |
31 | | void GetFace(DOMString& aFace) |
32 | 0 | { |
33 | 0 | GetHTMLAttr(nsGkAtoms::face, aFace); |
34 | 0 | } |
35 | | void SetFace(const nsAString& aFace, ErrorResult& aError) |
36 | 0 | { |
37 | 0 | SetHTMLAttr(nsGkAtoms::face, aFace, aError); |
38 | 0 | } |
39 | | void GetSize(DOMString& aSize) |
40 | 0 | { |
41 | 0 | GetHTMLAttr(nsGkAtoms::size, aSize); |
42 | 0 | } |
43 | | void SetSize(const nsAString& aSize, ErrorResult& aError) |
44 | 0 | { |
45 | 0 | SetHTMLAttr(nsGkAtoms::size, aSize, aError); |
46 | 0 | } |
47 | | |
48 | | virtual bool ParseAttribute(int32_t aNamespaceID, |
49 | | nsAtom* aAttribute, |
50 | | const nsAString& aValue, |
51 | | nsIPrincipal* aMaybeScriptedPrincipal, |
52 | | nsAttrValue& aResult) override; |
53 | | NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override; |
54 | | virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override; |
55 | | virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; |
56 | | |
57 | | protected: |
58 | | virtual ~HTMLFontElement(); |
59 | | |
60 | | virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override; |
61 | | |
62 | | private: |
63 | | static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, |
64 | | MappedDeclarations&); |
65 | | }; |
66 | | |
67 | | } // namespace dom |
68 | | } // namespace mozilla |
69 | | |
70 | | #endif /* HTMLFontElement_h___ */ |