Bug 1265584 [wpt PR 11167] - [Gecko Bug 1265584] Move wptrunner marionette usage...
[gecko.git] / dom / html / HTMLDivElement.h
blob9c7730ca88055810b7dd0fed16cf4cf117afbbeb
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 HTMLDivElement_h___
7 #define HTMLDivElement_h___
9 #include "mozilla/Attributes.h"
10 #include "nsGenericHTMLElement.h"
12 namespace mozilla {
13 namespace dom {
15 class HTMLDivElement final : public nsGenericHTMLElement
17 public:
18 explicit HTMLDivElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
19 : nsGenericHTMLElement(aNodeInfo)
23 void GetAlign(DOMString& aAlign)
25 GetHTMLAttr(nsGkAtoms::align, aAlign);
27 void SetAlign(const nsAString& aAlign, mozilla::ErrorResult& aError)
29 SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
32 virtual bool ParseAttribute(int32_t aNamespaceID,
33 nsAtom* aAttribute,
34 const nsAString& aValue,
35 nsIPrincipal* aMaybeScriptedPrincipal,
36 nsAttrValue& aResult) override;
37 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
38 virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
39 virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
40 bool aPreallocateChildren) const override;
42 protected:
43 virtual ~HTMLDivElement();
45 virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
47 private:
48 static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
49 MappedDeclarations&);
52 } // namespace dom
53 } // namespace mozilla
55 #endif /* HTMLDivElement_h___ */