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: */
|
2013-05-09 21:42:12 +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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_SVGAnimatedRect_h
|
|
|
|
#define mozilla_dom_SVGAnimatedRect_h
|
|
|
|
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2019-01-06 20:52:55 +03:00
|
|
|
#include "mozilla/dom/SVGElement.h"
|
2013-05-09 21:42:12 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
#include "mozilla/ErrorResult.h"
|
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2019-06-20 17:03:54 +03:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
class SVGAnimatedViewBox;
|
2019-06-20 17:03:54 +03:00
|
|
|
|
2013-05-09 21:42:12 +04:00
|
|
|
namespace dom {
|
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
class SVGRect;
|
|
|
|
|
|
|
|
// Despite the name of this class appearing to be generic,
|
|
|
|
// SVGAnimatedRect is only used for viewBox attributes.
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class SVGAnimatedRect final : public nsWrapperCache {
|
2013-05-09 21:42:12 +04:00
|
|
|
public:
|
2013-07-23 12:34:17 +04:00
|
|
|
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedRect)
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedRect)
|
2013-05-09 21:42:12 +04:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGAnimatedRect(SVGAnimatedViewBox* aVal, SVGElement* aSVGElement);
|
2013-05-09 21:42:12 +04:00
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
SVGElement* GetParentObject() const { return mSVGElement; }
|
2013-05-09 21:42:12 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) override;
|
2013-05-09 21:42:12 +04:00
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
already_AddRefed<SVGRect> GetBaseVal();
|
2013-05-09 21:42:12 +04:00
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
already_AddRefed<SVGRect> GetAnimVal();
|
2013-05-09 21:42:12 +04:00
|
|
|
|
|
|
|
private:
|
2014-06-24 20:36:45 +04:00
|
|
|
virtual ~SVGAnimatedRect();
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGAnimatedViewBox* mVal; // kept alive because it belongs to content
|
2018-12-21 11:58:14 +03:00
|
|
|
RefPtr<SVGElement> mSVGElement;
|
2013-05-09 21:42:12 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGAnimatedRect_h
|