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/. */
7 #ifndef DOM_SVG_SVGDOCUMENT_H_
8 #define DOM_SVG_SVGDOCUMENT_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/dom/XMLDocument.h"
18 class SVGForeignObjectElement
;
20 class SVGDocument final
: public XMLDocument
{
22 SVGDocument() : XMLDocument("image/svg+xml") { mType
= eSVG
; }
24 nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
27 inline SVGDocument
* Document::AsSVGDocument() {
28 MOZ_ASSERT(IsSVGDocument());
29 return static_cast<SVGDocument
*>(this);
32 inline const SVGDocument
* Document::AsSVGDocument() const {
33 MOZ_ASSERT(IsSVGDocument());
34 return static_cast<const SVGDocument
*>(this);
38 } // namespace mozilla
40 #endif // DOM_SVG_SVGDOCUMENT_H_