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: */
|
2012-05-21 15:12:37 +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/. */
|
2010-04-29 03:00:53 +04:00
|
|
|
|
2013-01-06 13:32:02 +04:00
|
|
|
#include "mozilla/dom/SVGAnimateMotionElement.h"
|
2013-01-06 13:32:03 +04:00
|
|
|
#include "mozilla/dom/SVGAnimateMotionElementBinding.h"
|
2010-04-29 03:00:53 +04:00
|
|
|
|
2013-01-06 13:32:02 +04:00
|
|
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(AnimateMotion)
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2010-04-29 03:00:53 +04:00
|
|
|
|
2013-01-06 13:32:03 +04:00
|
|
|
JSObject*
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
SVGAnimateMotionElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
2013-01-06 13:32:03 +04:00
|
|
|
{
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
return SVGAnimateMotionElementBinding::Wrap(aCx, this, aGivenProto);
|
2013-01-06 13:32:03 +04:00
|
|
|
}
|
|
|
|
|
2010-04-29 03:00:53 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Implementation
|
|
|
|
|
2014-06-20 06:01:40 +04:00
|
|
|
SVGAnimateMotionElement::SVGAnimateMotionElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
2013-01-06 13:32:02 +04:00
|
|
|
: SVGAnimationElement(aNodeInfo)
|
2010-04-29 03:00:53 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// nsIDOMNode methods
|
|
|
|
|
2013-01-06 13:32:02 +04:00
|
|
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateMotionElement)
|
2010-04-29 03:00:53 +04:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
|
|
nsSMILAnimationFunction&
|
2013-01-06 13:32:02 +04:00
|
|
|
SVGAnimateMotionElement::AnimationFunction()
|
2010-04-29 03:00:53 +04:00
|
|
|
{
|
|
|
|
return mAnimationFunction;
|
|
|
|
}
|
2010-04-29 03:00:54 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2013-01-06 13:32:02 +04:00
|
|
|
SVGAnimateMotionElement::GetTargetAttributeName(int32_t *aNamespaceID,
|
|
|
|
nsIAtom **aLocalName) const
|
2010-04-29 03:00:54 +04:00
|
|
|
{
|
|
|
|
// <animateMotion> doesn't take an attributeName, since it doesn't target an
|
|
|
|
// 'attribute' per se. We'll use a unique dummy attribute-name so that our
|
|
|
|
// nsSMILTargetIdentifier logic (which requires a attribute name) still works.
|
2010-10-07 23:19:32 +04:00
|
|
|
*aNamespaceID = kNameSpaceID_None;
|
|
|
|
*aLocalName = nsGkAtoms::mozAnimateMotionDummyAttr;
|
2011-10-17 18:59:28 +04:00
|
|
|
return true;
|
2010-04-29 03:00:54 +04:00
|
|
|
}
|
|
|
|
|
2013-01-06 13:32:02 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|