Bug 1867190 - Initialise the PHC allocate delay later r=glandium
[gecko.git] / dom / html / HTMLTableCaptionElement.h
blob452ef7833d7104b3206d16e2729c499b34b4d41d
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"
12 namespace mozilla::dom {
14 class HTMLTableCaptionElement final : public nsGenericHTMLElement {
15 public:
16 explicit HTMLTableCaptionElement(
17 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
18 : nsGenericHTMLElement(std::move(aNodeInfo)) {
19 SetHasWeirdParserInsertionMode();
22 void GetAlign(DOMString& aAlign) { GetHTMLAttr(nsGkAtoms::align, aAlign); }
23 void SetAlign(const nsAString& aAlign, ErrorResult& aError) {
24 SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
27 bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
28 const nsAString& aValue,
29 nsIPrincipal* aMaybeScriptedPrincipal,
30 nsAttrValue& aResult) override;
31 nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
32 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
34 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
36 protected:
37 virtual ~HTMLTableCaptionElement();
39 JSObject* WrapNode(JSContext*, JS::Handle<JSObject*> aGivenProto) override;
41 private:
42 static void MapAttributesIntoRule(MappedDeclarationsBuilder&);
45 } // namespace mozilla::dom
47 #endif /* mozilla_dom_HTMLTableCaptionElement_h */