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