/work/obj-fuzz/dist/include/mozilla/dom/HTMLTableColElement.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 mozilla_dom_HTMLTableColElement_h |
7 | | #define mozilla_dom_HTMLTableColElement_h |
8 | | |
9 | | #include "mozilla/Attributes.h" |
10 | | #include "nsGenericHTMLElement.h" |
11 | | |
12 | | namespace mozilla { |
13 | | namespace dom { |
14 | | |
15 | | class HTMLTableColElement final : public nsGenericHTMLElement |
16 | | { |
17 | | public: |
18 | | explicit HTMLTableColElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) |
19 | | : nsGenericHTMLElement(std::move(aNodeInfo)) |
20 | 0 | { |
21 | 0 | SetHasWeirdParserInsertionMode(); |
22 | 0 | } |
23 | | |
24 | | uint32_t Span() const |
25 | 0 | { |
26 | 0 | return GetIntAttr(nsGkAtoms::span, 1); |
27 | 0 | } |
28 | | void SetSpan(uint32_t aSpan, ErrorResult& aError) |
29 | 0 | { |
30 | 0 | SetUnsignedIntAttr(nsGkAtoms::span, aSpan, 1, aError); |
31 | 0 | } |
32 | | |
33 | | void GetAlign(DOMString& aAlign) |
34 | 0 | { |
35 | 0 | GetHTMLAttr(nsGkAtoms::align, aAlign); |
36 | 0 | } |
37 | | void SetAlign(const nsAString& aAlign, ErrorResult& aError) |
38 | 0 | { |
39 | 0 | SetHTMLAttr(nsGkAtoms::align, aAlign, aError); |
40 | 0 | } |
41 | | void GetCh(DOMString& aCh) |
42 | 0 | { |
43 | 0 | GetHTMLAttr(nsGkAtoms::_char, aCh); |
44 | 0 | } |
45 | | void SetCh(const nsAString& aCh, ErrorResult& aError) |
46 | 0 | { |
47 | 0 | SetHTMLAttr(nsGkAtoms::_char, aCh, aError); |
48 | 0 | } |
49 | | void GetChOff(DOMString& aChOff) |
50 | 0 | { |
51 | 0 | GetHTMLAttr(nsGkAtoms::charoff, aChOff); |
52 | 0 | } |
53 | | void SetChOff(const nsAString& aChOff, ErrorResult& aError) |
54 | 0 | { |
55 | 0 | SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError); |
56 | 0 | } |
57 | | void GetVAlign(DOMString& aVAlign) |
58 | 0 | { |
59 | 0 | GetHTMLAttr(nsGkAtoms::valign, aVAlign); |
60 | 0 | } |
61 | | void SetVAlign(const nsAString& aVAlign, ErrorResult& aError) |
62 | 0 | { |
63 | 0 | SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError); |
64 | 0 | } |
65 | | void GetWidth(DOMString& aWidth) |
66 | 0 | { |
67 | 0 | GetHTMLAttr(nsGkAtoms::width, aWidth); |
68 | 0 | } |
69 | | void SetWidth(const nsAString& aWidth, ErrorResult& aError) |
70 | 0 | { |
71 | 0 | SetHTMLAttr(nsGkAtoms::width, aWidth, aError); |
72 | 0 | } |
73 | | |
74 | | virtual bool ParseAttribute(int32_t aNamespaceID, |
75 | | nsAtom* aAttribute, |
76 | | const nsAString& aValue, |
77 | | nsIPrincipal* aMaybeScriptedPrincipal, |
78 | | nsAttrValue& aResult) override; |
79 | | nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override; |
80 | | NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override; |
81 | | |
82 | | virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; |
83 | | |
84 | | protected: |
85 | | virtual ~HTMLTableColElement(); |
86 | | |
87 | | virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override; |
88 | | |
89 | | private: |
90 | | static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, |
91 | | MappedDeclarations&); |
92 | | }; |
93 | | |
94 | | } // namespace dom |
95 | | } // namespace mozilla |
96 | | |
97 | | #endif /* mozilla_dom_HTMLTableColElement_h */ |