2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-12-12 10:59:31 +03:00
|
|
|
|
2013-03-20 20:22:26 +04:00
|
|
|
#ifndef mozilla_dom_SVGDocument_h
|
|
|
|
#define mozilla_dom_SVGDocument_h
|
2001-12-12 10:59:31 +03:00
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-03-20 20:22:26 +04:00
|
|
|
#include "mozilla/dom/XMLDocument.h"
|
2001-12-12 10:59:31 +03:00
|
|
|
|
2013-03-20 20:22:26 +04:00
|
|
|
class nsSVGElement;
|
|
|
|
|
2013-03-20 20:22:26 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-05-24 23:29:11 +04:00
|
|
|
class SVGForeignObjectElement;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class SVGDocument final : public XMLDocument
|
2001-12-12 10:59:31 +03:00
|
|
|
{
|
2014-05-24 23:29:11 +04:00
|
|
|
friend class SVGForeignObjectElement; // To call EnsureNonSVGUserAgentStyleSheetsLoaded
|
|
|
|
|
2011-03-26 19:06:27 +03:00
|
|
|
public:
|
2014-05-24 22:51:06 +04:00
|
|
|
SVGDocument()
|
|
|
|
: XMLDocument("image/svg+xml")
|
2014-05-24 23:29:11 +04:00
|
|
|
, mHasLoadedNonSVGUserAgentStyleSheets(false)
|
2014-05-24 22:51:06 +04:00
|
|
|
{
|
2014-05-24 23:28:48 +04:00
|
|
|
mType = eSVG;
|
2014-05-24 22:51:06 +04:00
|
|
|
}
|
|
|
|
|
2018-01-25 17:59:42 +03:00
|
|
|
virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis,
|
|
|
|
bool aNotify) override;
|
2018-01-23 16:30:18 +03:00
|
|
|
virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex,
|
|
|
|
bool aNotify) override;
|
2017-04-20 22:57:48 +03:00
|
|
|
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
|
|
|
|
bool aPreallocateChildren) const override;
|
2013-03-20 20:22:26 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual SVGDocument* AsSVGDocument() override {
|
2014-05-24 23:29:11 +04:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void EnsureNonSVGUserAgentStyleSheetsLoaded();
|
|
|
|
|
|
|
|
bool mHasLoadedNonSVGUserAgentStyleSheets;
|
2001-12-12 10:59:31 +03:00
|
|
|
};
|
|
|
|
|
2013-03-20 20:22:26 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGDocument_h
|