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_HTMLTableCaptionElement_h
7 #define mozilla_dom_HTMLTableCaptionElement_h
9 #include "mozilla/Attributes.h"
10 #include "nsGenericHTMLElement.h"
15 class HTMLTableCaptionElement final
: public nsGenericHTMLElement
18 explicit HTMLTableCaptionElement(already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
)
19 : nsGenericHTMLElement(std::move(aNodeInfo
))
21 SetHasWeirdParserInsertionMode();
24 void GetAlign(DOMString
& aAlign
)
26 GetHTMLAttr(nsGkAtoms::align
, aAlign
);
28 void SetAlign(const nsAString
& aAlign
, ErrorResult
& aError
)
30 SetHTMLAttr(nsGkAtoms::align
, aAlign
, aError
);
33 virtual bool ParseAttribute(int32_t aNamespaceID
,
35 const nsAString
& aValue
,
36 nsIPrincipal
* aMaybeScriptedPrincipal
,
37 nsAttrValue
& aResult
) override
;
38 virtual nsMapRuleToAttributesFunc
GetAttributeMappingFunction() const override
;
39 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom
* aAttribute
) const override
;
41 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
44 virtual ~HTMLTableCaptionElement();
46 virtual JSObject
* WrapNode(JSContext
*aCx
, JS::Handle
<JSObject
*> aGivenProto
) override
;
49 static void MapAttributesIntoRule(const nsMappedAttributes
* aAttributes
,
54 } // namespace mozilla
56 #endif /* mozilla_dom_HTMLTableCaptionElement_h */