2013-05-09 17:42:12 +00: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/. */
|
|
|
|
|
|
|
|
#include "SVGAnimatedRect.h"
|
|
|
|
#include "mozilla/dom/SVGAnimatedRectBinding.h"
|
|
|
|
#include "nsSVGElement.h"
|
|
|
|
#include "nsSVGViewBox.h"
|
|
|
|
#include "SVGIRect.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
|
|
|
|
|
2013-07-23 08:34:17 +00:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
|
2013-05-09 17:42:12 +00:00
|
|
|
|
|
|
|
SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement)
|
|
|
|
: mVal(aVal)
|
|
|
|
, mSVGElement(aSVGElement)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SVGAnimatedRect::~SVGAnimatedRect()
|
|
|
|
{
|
|
|
|
nsSVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
|
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<SVGIRect>
|
2013-05-20 11:46:12 +00:00
|
|
|
SVGAnimatedRect::GetBaseVal()
|
2013-05-09 17:42:12 +00:00
|
|
|
{
|
2013-05-20 11:46:12 +00:00
|
|
|
return mVal->ToDOMBaseVal(mSVGElement);
|
2013-05-09 17:42:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
already_AddRefed<SVGIRect>
|
2013-05-20 11:46:12 +00:00
|
|
|
SVGAnimatedRect::GetAnimVal()
|
2013-05-09 17:42:12 +00:00
|
|
|
{
|
2013-05-20 11:46:12 +00:00
|
|
|
return mVal->ToDOMAnimVal(mSVGElement);
|
2013-05-09 17:42:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
JSObject*
|
2014-04-08 22:27:18 +00:00
|
|
|
SVGAnimatedRect::WrapObject(JSContext* aCx)
|
2013-05-09 17:42:12 +00:00
|
|
|
{
|
Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""
plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 22:27:17 +00:00
|
|
|
return SVGAnimatedRectBinding::Wrap(aCx, this);
|
2013-05-09 17:42:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|