Line data Source code
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 :
7 : #ifndef nsXMLElement_h___
8 : #define nsXMLElement_h___
9 :
10 : #include "mozilla/Attributes.h"
11 : #include "nsIDOMElement.h"
12 : #include "mozilla/dom/Element.h"
13 : #include "mozilla/dom/DOMRect.h"
14 :
15 : class nsXMLElement : public mozilla::dom::Element,
16 : public nsIDOMElement
17 : {
18 : public:
19 642 : explicit nsXMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
20 642 : : mozilla::dom::Element(aNodeInfo)
21 : {
22 642 : }
23 :
24 : // nsISupports
25 : NS_DECL_ISUPPORTS_INHERITED
26 :
27 : // nsIDOMNode
28 0 : NS_FORWARD_NSIDOMNODE_TO_NSINODE
29 :
30 : // nsIDOMElement
31 0 : NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
32 :
33 : // nsINode interface methods
34 : virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
35 : bool aPreallocateChildren) const override;
36 :
37 0 : virtual nsIDOMNode* AsDOMNode() override { return this; }
38 :
39 : virtual void UnbindFromTree(bool aDeep = true,
40 : bool aNullParent = true) override;
41 :
42 : protected:
43 3 : virtual ~nsXMLElement() {}
44 :
45 : virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
46 : };
47 :
48 : #endif // nsXMLElement_h___
|