2013-01-19 12:56:00 -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_SVGAnimatedLength_h
|
|
|
|
#define mozilla_dom_SVGAnimatedLength_h
|
|
|
|
|
2013-05-29 13:43:41 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-01-19 12:56:00 -08:00
|
|
|
#include "nsSVGElement.h"
|
2013-03-11 15:05:58 -07:00
|
|
|
|
|
|
|
class nsSVGLength2;
|
2013-01-19 12:56:00 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
2014-04-11 14:26:29 -07:00
|
|
|
|
|
|
|
class DOMSVGLength;
|
|
|
|
|
2013-01-19 12:56:00 -08:00
|
|
|
namespace dom {
|
|
|
|
|
2013-07-05 11:57:35 -07:00
|
|
|
class SVGAnimatedLength MOZ_FINAL : public nsWrapperCache
|
2013-01-19 12:56:00 -08:00
|
|
|
{
|
|
|
|
public:
|
2013-07-05 11:57:35 -07:00
|
|
|
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedLength)
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedLength)
|
2013-01-19 12:56:00 -08:00
|
|
|
|
|
|
|
SVGAnimatedLength(nsSVGLength2* aVal, nsSVGElement *aSVGElement)
|
|
|
|
: mVal(aVal), mSVGElement(aSVGElement)
|
2014-10-07 02:44:49 -07:00
|
|
|
{
|
|
|
|
}
|
2013-01-19 12:56:00 -08:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
nsSVGElement* GetParentObject() { return mSVGElement; }
|
2014-04-08 15:27:18 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
2014-04-11 14:26:29 -07:00
|
|
|
already_AddRefed<DOMSVGLength> BaseVal();
|
|
|
|
already_AddRefed<DOMSVGLength> AnimVal();
|
2013-01-19 12:56:00 -08:00
|
|
|
|
|
|
|
protected:
|
2014-06-24 09:36:45 -07:00
|
|
|
~SVGAnimatedLength();
|
|
|
|
|
2013-01-19 12:56:00 -08:00
|
|
|
nsSVGLength2* mVal; // kept alive because it belongs to content
|
|
|
|
nsRefPtr<nsSVGElement> mSVGElement;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGAnimatedLength_h
|