Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / html / HTMLTableSectionElement.h
blobe1ea59622cc31c5a0663ede940b744ad76379721
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
9 #include "mozilla/Attributes.h"
10 #include "nsGenericHTMLElement.h"
11 #include "nsContentList.h" // For ctor.
13 namespace mozilla::dom {
15 class HTMLTableSectionElement final : public nsGenericHTMLElement {
16 public:
17 explicit HTMLTableSectionElement(
18 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
19 : nsGenericHTMLElement(std::move(aNodeInfo)) {
20 SetHasWeirdParserInsertionMode();
23 // nsISupports
24 NS_DECL_ISUPPORTS_INHERITED
26 nsIHTMLCollection* Rows();
27 already_AddRefed<nsGenericHTMLElement> InsertRow(int32_t aIndex,
28 ErrorResult& aError);
29 void DeleteRow(int32_t aValue, ErrorResult& aError);
31 void GetAlign(DOMString& aAlign) { GetHTMLAttr(nsGkAtoms::align, aAlign); }
32 void SetAlign(const nsAString& aAlign, ErrorResult& aError) {
33 SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
35 void GetCh(DOMString& aCh) { GetHTMLAttr(nsGkAtoms::_char, aCh); }
36 void SetCh(const nsAString& aCh, ErrorResult& aError) {
37 SetHTMLAttr(nsGkAtoms::_char, aCh, aError);
39 void GetChOff(DOMString& aChOff) { GetHTMLAttr(nsGkAtoms::charoff, aChOff); }
40 void SetChOff(const nsAString& aChOff, ErrorResult& aError) {
41 SetHTMLAttr(nsGkAtoms::charoff, aChOff, aError);
43 void GetVAlign(DOMString& aVAlign) {
44 GetHTMLAttr(nsGkAtoms::valign, aVAlign);
46 void SetVAlign(const nsAString& aVAlign, ErrorResult& aError) {
47 SetHTMLAttr(nsGkAtoms::valign, aVAlign, aError);
50 bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
51 const nsAString& aValue,
52 nsIPrincipal* aMaybeScriptedPrincipal,
53 nsAttrValue& aResult) override;
54 nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
55 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
57 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
59 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLTableSectionElement,
60 nsGenericHTMLElement)
61 protected:
62 virtual ~HTMLTableSectionElement();
64 virtual JSObject* WrapNode(JSContext* aCx,
65 JS::Handle<JSObject*> aGivenProto) override;
67 RefPtr<nsContentList> mRows;
69 private:
70 static void MapAttributesIntoRule(MappedDeclarationsBuilder&);
73 } // namespace mozilla::dom
75 #endif /* mozilla_dom_HTMLTableSectionElement_h */