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/. */
|
2005-01-25 06:55:03 +03:00
|
|
|
|
2013-12-09 06:52:54 +04:00
|
|
|
#include "mozilla/ArrayUtils.h"
|
2011-10-11 09:50:08 +04:00
|
|
|
|
2013-01-18 23:52:40 +04:00
|
|
|
#include "mozilla/dom/SVGClipPathElement.h"
|
2013-01-18 23:53:08 +04:00
|
|
|
#include "mozilla/dom/SVGClipPathElementBinding.h"
|
2006-12-26 20:47:52 +03:00
|
|
|
#include "nsGkAtoms.h"
|
2007-08-28 03:11:14 +04:00
|
|
|
|
2013-01-18 23:52:40 +04:00
|
|
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(ClipPath)
|
2011-10-11 09:50:08 +04:00
|
|
|
|
2013-01-18 23:52:40 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2013-01-18 23:53:08 +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
|
|
|
SVGClipPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
2013-01-18 23:53:08 +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 SVGClipPathElementBinding::Wrap(aCx, this, aGivenProto);
|
2013-01-18 23:53:08 +04:00
|
|
|
}
|
|
|
|
|
2013-01-18 23:52:40 +04:00
|
|
|
nsSVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] =
|
2007-08-28 03:11:14 +04:00
|
|
|
{
|
|
|
|
{ &nsGkAtoms::clipPathUnits,
|
|
|
|
sSVGUnitTypesMap,
|
2013-02-18 06:14:02 +04:00
|
|
|
SVG_UNIT_TYPE_USERSPACEONUSE
|
2007-08-28 03:11:14 +04:00
|
|
|
}
|
|
|
|
};
|
2005-01-25 06:55:03 +03:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Implementation
|
|
|
|
|
2014-06-20 06:01:40 +04:00
|
|
|
SVGClipPathElement::SVGClipPathElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
2013-01-18 23:52:40 +04:00
|
|
|
: SVGClipPathElementBase(aNodeInfo)
|
2005-01-25 06:55:03 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-07-01 11:02:46 +04:00
|
|
|
already_AddRefed<SVGAnimatedEnumeration>
|
2013-01-18 23:53:08 +04:00
|
|
|
SVGClipPathElement::ClipPathUnits()
|
|
|
|
{
|
2013-07-01 11:02:46 +04:00
|
|
|
return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this);
|
2005-01-25 06:55:03 +03:00
|
|
|
}
|
|
|
|
|
2007-08-28 03:11:14 +04:00
|
|
|
nsSVGElement::EnumAttributesInfo
|
2013-01-18 23:52:40 +04:00
|
|
|
SVGClipPathElement::GetEnumInfo()
|
2007-08-28 03:11:14 +04:00
|
|
|
{
|
|
|
|
return EnumAttributesInfo(mEnumAttributes, sEnumInfo,
|
2011-10-11 09:50:08 +04:00
|
|
|
ArrayLength(sEnumInfo));
|
2007-08-28 03:11:14 +04:00
|
|
|
}
|
2005-01-25 06:55:03 +03:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// nsIDOMNode methods
|
|
|
|
|
2013-01-18 23:52:40 +04:00
|
|
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGClipPathElement)
|
2005-01-25 06:55:03 +03:00
|
|
|
|
2013-01-18 23:52:40 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|