2013-01-16 12:50:59 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_SVGSymbolElement_h
|
|
|
|
#define mozilla_dom_SVGSymbolElement_h
|
|
|
|
|
2013-03-01 22:08:42 -08:00
|
|
|
#include "mozilla/dom/SVGTests.h"
|
2013-01-16 12:50:59 -08:00
|
|
|
#include "nsSVGElement.h"
|
|
|
|
#include "nsSVGViewBox.h"
|
|
|
|
#include "SVGAnimatedPreserveAspectRatio.h"
|
|
|
|
|
|
|
|
nsresult NS_NewSVGSymbolElement(nsIContent **aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2013-01-16 12:50:59 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
typedef nsSVGElement SVGSymbolElementBase;
|
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
class SVGSymbolElement final : public SVGSymbolElementBase,
|
2013-03-01 22:08:42 -08:00
|
|
|
public SVGTests
|
2013-01-16 12:50:59 -08:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
friend nsresult (::NS_NewSVGSymbolElement(nsIContent **aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
|
2014-08-31 18:08:04 -07:00
|
|
|
explicit SVGSymbolElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
2014-07-08 14:23:16 -07:00
|
|
|
~SVGSymbolElement();
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
|
2013-01-16 12:50:59 -08:00
|
|
|
|
|
|
|
public:
|
|
|
|
// interfaces:
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// nsIContent interface
|
2015-03-21 09:28:04 -07:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
|
2013-01-16 12:50:59 -08:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
|
2013-01-16 12:50:59 -08:00
|
|
|
|
2013-01-16 12:50:59 -08:00
|
|
|
// WebIDL
|
2013-05-09 10:42:12 -07:00
|
|
|
already_AddRefed<SVGAnimatedRect> ViewBox();
|
2013-01-16 12:50:59 -08:00
|
|
|
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
|
|
|
|
|
2013-01-16 12:50:59 -08:00
|
|
|
protected:
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual nsSVGViewBox *GetViewBox() override;
|
|
|
|
virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio() override;
|
2013-01-16 12:50:59 -08:00
|
|
|
|
|
|
|
nsSVGViewBox mViewBox;
|
|
|
|
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGSymbolElement_h
|