Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/HTMLTableSectionElement.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_HTMLTableSectionElement_h
7
#define mozilla_dom_HTMLTableSectionElement_h
8
9
#include "mozilla/Attributes.h"
10
#include "nsGenericHTMLElement.h"
11
#include "nsContentList.h" // For ctor.
12
13
namespace mozilla {
14
namespace dom {
15
16
class HTMLTableSectionElement final : public nsGenericHTMLElement
17
{
18
public:
19
  explicit HTMLTableSectionElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
20
    : nsGenericHTMLElement(std::move(aNodeInfo))
21
0
  {
22
0
    SetHasWeirdParserInsertionMode();
23
0
  }
24
25
  // nsISupports
26
  NS_DECL_ISUPPORTS_INHERITED
27
28
  nsIHTMLCollection* Rows();
29
  already_AddRefed<nsGenericHTMLElement>
30
    InsertRow(int32_t aIndex, ErrorResult& aError);
31
  void DeleteRow(int32_t aValue, ErrorResult& aError);
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
66
  virtual bool ParseAttribute(int32_t aNamespaceID,
67
                              nsAtom* aAttribute,
68
                              const nsAString& aValue,
69
                              nsIPrincipal* aMaybeScriptedPrincipal,
70
                              nsAttrValue& aResult) override;
71
  virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
72
  NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
73
74
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
75
76
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLTableSectionElement,
77
                                                     nsGenericHTMLElement)
78
protected:
79
  virtual ~HTMLTableSectionElement();
80
81
  virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
82
83
  RefPtr<nsContentList> mRows;
84
85
private:
86
  static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
87
                                    MappedDeclarations&);
88
};
89
90
} // namespace dom
91
} // namespace mozilla
92
93
#endif /* mozilla_dom_HTMLTableSectionElement_h */