2007-12-04 06:51:36 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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/. */
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2013-01-06 14:14:43 +00:00
|
|
|
#ifndef mozilla_dom_SVGTextPathElement_h
|
|
|
|
#define mozilla_dom_SVGTextPathElement_h
|
2007-12-04 06:51:36 +00:00
|
|
|
|
|
|
|
#include "nsSVGEnum.h"
|
|
|
|
#include "nsSVGLength2.h"
|
2008-06-14 09:01:02 +00:00
|
|
|
#include "nsSVGString.h"
|
2013-02-08 19:55:49 +00:00
|
|
|
#include "mozilla/dom/SVGTextContentElement.h"
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2012-01-26 09:57:21 +00:00
|
|
|
class nsIAtom;
|
|
|
|
class nsIContent;
|
2013-01-06 14:14:43 +00:00
|
|
|
|
|
|
|
nsresult NS_NewSVGTextPathElement(nsIContent **aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2012-01-26 09:57:21 +00:00
|
|
|
|
2013-01-06 14:14:43 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2013-02-08 19:55:49 +00:00
|
|
|
// textPath Method Types
|
|
|
|
static const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
|
|
|
|
static const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
|
|
|
|
static const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
|
|
|
|
// textPath Spacing Types
|
|
|
|
static const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
|
|
|
|
static const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
|
|
|
|
static const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
|
|
|
|
|
2013-01-06 14:14:43 +00:00
|
|
|
typedef SVGTextContentElement SVGTextPathElementBase;
|
|
|
|
|
2013-03-28 01:23:09 +00:00
|
|
|
class SVGTextPathElement MOZ_FINAL : public SVGTextPathElementBase
|
2007-12-04 06:51:36 +00:00
|
|
|
{
|
2013-12-20 16:38:51 +00:00
|
|
|
friend class ::SVGTextFrame;
|
2007-12-04 06:51:36 +00:00
|
|
|
|
|
|
|
protected:
|
2013-01-06 14:14:43 +00:00
|
|
|
friend nsresult (::NS_NewSVGTextPathElement(nsIContent **aResult,
|
2014-06-20 02:01:40 +00:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
|
2014-09-01 01:08:04 +00:00
|
|
|
explicit SVGTextPathElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
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 14:13:33 +00:00
|
|
|
virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) MOZ_OVERRIDE;
|
2013-01-06 14:14:43 +00:00
|
|
|
|
2007-12-04 06:51:36 +00:00
|
|
|
public:
|
|
|
|
// nsIContent interface
|
2013-05-08 05:11:24 +00:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2014-06-20 02:01:40 +00:00
|
|
|
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2013-01-06 14:14:43 +00:00
|
|
|
// WebIDL
|
2013-01-19 20:56:00 +00:00
|
|
|
already_AddRefed<SVGAnimatedLength> StartOffset();
|
2013-07-01 07:02:46 +00:00
|
|
|
already_AddRefed<SVGAnimatedEnumeration> Method();
|
|
|
|
already_AddRefed<SVGAnimatedEnumeration> Spacing();
|
2013-06-14 22:37:27 +00:00
|
|
|
already_AddRefed<SVGAnimatedString> Href();
|
2013-01-02 20:24:07 +00:00
|
|
|
|
2013-01-06 14:14:43 +00:00
|
|
|
protected:
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2013-05-08 05:11:24 +00:00
|
|
|
virtual LengthAttributesInfo GetLengthInfo() MOZ_OVERRIDE;
|
|
|
|
virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
|
|
|
|
virtual StringAttributesInfo GetStringInfo() MOZ_OVERRIDE;
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2013-07-24 00:01:35 +00:00
|
|
|
enum { /* TEXTLENGTH, */ STARTOFFSET = 1 };
|
|
|
|
nsSVGLength2 mLengthAttributes[2];
|
|
|
|
virtual nsSVGLength2* LengthAttributes() MOZ_OVERRIDE
|
|
|
|
{ return mLengthAttributes; }
|
|
|
|
static LengthInfo sLengthInfo[2];
|
|
|
|
|
|
|
|
enum { /* LENGTHADJUST, */ METHOD = 1, SPACING };
|
|
|
|
nsSVGEnum mEnumAttributes[3];
|
|
|
|
virtual nsSVGEnum* EnumAttributes() MOZ_OVERRIDE
|
|
|
|
{ return mEnumAttributes; }
|
2007-12-04 06:51:36 +00:00
|
|
|
static nsSVGEnumMapping sMethodMap[];
|
|
|
|
static nsSVGEnumMapping sSpacingMap[];
|
2013-07-24 00:01:35 +00:00
|
|
|
static EnumInfo sEnumInfo[3];
|
2007-12-04 06:51:36 +00:00
|
|
|
|
2008-06-14 09:01:02 +00:00
|
|
|
enum { HREF };
|
|
|
|
nsSVGString mStringAttributes[1];
|
|
|
|
static StringInfo sStringInfo[1];
|
2007-12-04 06:51:36 +00:00
|
|
|
};
|
|
|
|
|
2013-01-06 14:14:43 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGTextPathElement_h
|