nsXMLElement.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* -*- Mode: C++; tab-width: 8; 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 nsXMLElement_h___
  6. #define nsXMLElement_h___
  7. #include "mozilla/Attributes.h"
  8. #include "nsIDOMElement.h"
  9. #include "mozilla/dom/ElementInlines.h"
  10. #include "mozilla/dom/DOMRect.h"
  11. class nsXMLElement : public mozilla::dom::Element,
  12. public nsIDOMElement
  13. {
  14. public:
  15. explicit nsXMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
  16. : mozilla::dom::Element(aNodeInfo)
  17. {
  18. }
  19. // nsISupports
  20. NS_DECL_ISUPPORTS_INHERITED
  21. // nsIDOMNode
  22. NS_FORWARD_NSIDOMNODE_TO_NSINODE
  23. // nsIDOMElement
  24. NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
  25. // nsINode interface methods
  26. virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
  27. virtual nsIDOMNode* AsDOMNode() override { return this; }
  28. virtual void UnbindFromTree(bool aDeep = true,
  29. bool aNullParent = true) override;
  30. protected:
  31. virtual ~nsXMLElement() {}
  32. virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
  33. };
  34. #endif // nsXMLElement_h___