1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_dom_HTMLTableSectionElement_h
6 #define mozilla_dom_HTMLTableSectionElement_h
8 #include "mozilla/Attributes.h"
9 #include "nsGenericHTMLElement.h"
10 #include "nsContentList.h" // For ctor.
15 class HTMLTableSectionElement MOZ_FINAL
: public nsGenericHTMLElement
18 explicit HTMLTableSectionElement(already_AddRefed
<mozilla::dom::NodeInfo
>& aNodeInfo
)
19 : nsGenericHTMLElement(aNodeInfo
)
21 SetHasWeirdParserInsertionMode();
25 NS_DECL_ISUPPORTS_INHERITED
27 nsIHTMLCollection
* Rows();
28 already_AddRefed
<nsGenericHTMLElement
>
29 InsertRow(int32_t aIndex
, ErrorResult
& aError
);
30 void DeleteRow(int32_t aValue
, ErrorResult
& aError
);
32 void GetAlign(nsString
& aAlign
)
34 GetHTMLAttr(nsGkAtoms::align
, aAlign
);
36 void SetAlign(const nsAString
& aAlign
, ErrorResult
& aError
)
38 SetHTMLAttr(nsGkAtoms::align
, aAlign
, aError
);
40 void GetCh(nsString
& aCh
)
42 GetHTMLAttr(nsGkAtoms::_char
, aCh
);
44 void SetCh(const nsAString
& aCh
, ErrorResult
& aError
)
46 SetHTMLAttr(nsGkAtoms::_char
, aCh
, aError
);
48 void GetChOff(nsString
& aChOff
)
50 GetHTMLAttr(nsGkAtoms::charoff
, aChOff
);
52 void SetChOff(const nsAString
& aChOff
, ErrorResult
& aError
)
54 SetHTMLAttr(nsGkAtoms::charoff
, aChOff
, aError
);
56 void GetVAlign(nsString
& aVAlign
)
58 GetHTMLAttr(nsGkAtoms::valign
, aVAlign
);
60 void SetVAlign(const nsAString
& aVAlign
, ErrorResult
& aError
)
62 SetHTMLAttr(nsGkAtoms::valign
, aVAlign
, aError
);
65 virtual bool ParseAttribute(int32_t aNamespaceID
,
67 const nsAString
& aValue
,
68 nsAttrValue
& aResult
) MOZ_OVERRIDE
;
69 virtual nsMapRuleToAttributesFunc
GetAttributeMappingFunction() const MOZ_OVERRIDE
;
70 NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom
* aAttribute
) const MOZ_OVERRIDE
;
72 virtual nsresult
Clone(mozilla::dom::NodeInfo
*aNodeInfo
, nsINode
**aResult
) const MOZ_OVERRIDE
;
74 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLTableSectionElement
,
77 virtual ~HTMLTableSectionElement();
79 virtual JSObject
* WrapNode(JSContext
*aCx
) MOZ_OVERRIDE
;
81 nsRefPtr
<nsContentList
> mRows
;
84 static void MapAttributesIntoRule(const nsMappedAttributes
* aAttributes
,
89 } // namespace mozilla
91 #endif /* mozilla_dom_HTMLTableSectionElement_h */