mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 824327: Convert SVGMetadataElement to WebIDL r=bz
--HG-- rename : content/svg/content/src/nsSVGMetadataElement.cpp => content/svg/content/src/SVGMetadataElement.cpp rename : content/svg/content/src/nsSVGMetadataElement.cpp => content/svg/content/src/SVGMetadataElement.h
This commit is contained in:
parent
ced1decdf2
commit
e7a72ebfea
@ -63,7 +63,6 @@ CPPSRCS = \
|
||||
nsSVGLineElement.cpp \
|
||||
nsSVGMarkerElement.cpp \
|
||||
nsSVGMaskElement.cpp \
|
||||
nsSVGMetadataElement.cpp \
|
||||
nsSVGNumber2.cpp \
|
||||
nsSVGNumberPair.cpp \
|
||||
nsSVGPathDataParser.cpp \
|
||||
@ -122,6 +121,7 @@ CPPSRCS = \
|
||||
SVGDescElement.cpp \
|
||||
SVGIntegerPairSMILType.cpp \
|
||||
SVGLengthListSMILType.cpp \
|
||||
SVGMetadataElement.cpp \
|
||||
SVGMotionSMILType.cpp \
|
||||
SVGMotionSMILAttr.cpp \
|
||||
SVGMotionSMILAnimationFunction.cpp \
|
||||
@ -155,6 +155,7 @@ EXPORTS_mozilla/dom = \
|
||||
SVGAnimatedAngle.h \
|
||||
SVGAnimatedBoolean.h \
|
||||
SVGDescElement.h \
|
||||
SVGMetadataElement.h \
|
||||
SVGStopElement.h \
|
||||
SVGStyleElement.h \
|
||||
SVGTitleElement.h \
|
||||
|
59
content/svg/content/src/SVGMetadataElement.cpp
Normal file
59
content/svg/content/src/SVGMetadataElement.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
/* -*- 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 "mozilla/dom/SVGMetadataElement.h"
|
||||
#include "mozilla/dom/SVGMetadataElementBinding.h"
|
||||
|
||||
DOMCI_NODE_DATA(SVGMetadataElement, mozilla::dom::SVGMetadataElement)
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Metadata)
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
JSObject*
|
||||
SVGMetadataElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
|
||||
{
|
||||
return SVGMetadataElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsISupports methods
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(SVGMetadataElement, SVGMetadataElementBase)
|
||||
NS_IMPL_RELEASE_INHERITED(SVGMetadataElement, SVGMetadataElementBase)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(SVGMetadataElement)
|
||||
NS_NODE_INTERFACE_TABLE4(SVGMetadataElement, nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement, nsIDOMSVGMetadataElement)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGMetadataElement)
|
||||
NS_INTERFACE_MAP_END_INHERITING(SVGMetadataElementBase)
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
||||
SVGMetadataElement::SVGMetadataElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
: SVGMetadataElementBase(aNodeInfo)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
SVGMetadataElement::Init()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIDOMNode methods
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMetadataElement)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
52
content/svg/content/src/SVGMetadataElement.h
Normal file
52
content/svg/content/src/SVGMetadataElement.h
Normal file
@ -0,0 +1,52 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#ifndef mozilla_dom_SVGMetadataElement_h
|
||||
#define mozilla_dom_SVGMetadataElement_h
|
||||
|
||||
#include "nsSVGElement.h"
|
||||
#include "nsIDOMSVGMetadataElement.h"
|
||||
|
||||
nsresult NS_NewSVGMetadataElement(nsIContent **aResult,
|
||||
already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
|
||||
typedef nsSVGElement SVGMetadataElementBase;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class SVGMetadataElement MOZ_FINAL : public SVGMetadataElementBase,
|
||||
public nsIDOMSVGMetadataElement
|
||||
{
|
||||
protected:
|
||||
friend nsresult (::NS_NewSVGMetadataElement(nsIContent **aResult,
|
||||
already_AddRefed<nsINodeInfo> aNodeInfo));
|
||||
SVGMetadataElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
|
||||
virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap) MOZ_OVERRIDE;
|
||||
nsresult Init();
|
||||
|
||||
public:
|
||||
// interfaces:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIDOMSVGMETADATAELEMENT
|
||||
|
||||
// xxx I wish we could use virtual inheritance
|
||||
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
|
||||
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
|
||||
virtual nsXPCClassInfo* GetClassInfo();
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_SVGMetadataElement_h
|
@ -1,75 +0,0 @@
|
||||
/* -*- 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 "nsSVGElement.h"
|
||||
#include "nsIDOMSVGMetadataElement.h"
|
||||
|
||||
typedef nsSVGElement nsSVGMetadataElementBase;
|
||||
|
||||
class nsSVGMetadataElement : public nsSVGMetadataElementBase,
|
||||
public nsIDOMSVGMetadataElement
|
||||
{
|
||||
protected:
|
||||
friend nsresult NS_NewSVGMetadataElement(nsIContent **aResult,
|
||||
already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
nsSVGMetadataElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||
nsresult Init();
|
||||
|
||||
public:
|
||||
// interfaces:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIDOMSVGMETADATAELEMENT
|
||||
|
||||
// xxx I wish we could use virtual inheritance
|
||||
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
|
||||
|
||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
|
||||
virtual nsXPCClassInfo* GetClassInfo();
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||
};
|
||||
|
||||
NS_IMPL_NS_NEW_SVG_ELEMENT(Metadata)
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsISupports methods
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsSVGMetadataElement, nsSVGMetadataElementBase)
|
||||
NS_IMPL_RELEASE_INHERITED(nsSVGMetadataElement, nsSVGMetadataElementBase)
|
||||
|
||||
DOMCI_NODE_DATA(SVGMetadataElement, nsSVGMetadataElement)
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(nsSVGMetadataElement)
|
||||
NS_NODE_INTERFACE_TABLE4(nsSVGMetadataElement, nsIDOMNode, nsIDOMElement,
|
||||
nsIDOMSVGElement, nsIDOMSVGMetadataElement)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGMetadataElement)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsSVGMetadataElementBase)
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
||||
nsSVGMetadataElement::nsSVGMetadataElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||
: nsSVGMetadataElementBase(aNodeInfo)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsSVGMetadataElement::Init()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIDOMNode methods
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(nsSVGMetadataElement)
|
15
dom/webidl/SVGMetadataElement.webidl
Normal file
15
dom/webidl/SVGMetadataElement.webidl
Normal file
@ -0,0 +1,15 @@
|
||||
/* -*- Mode: IDL; 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/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* http://www.w3.org/TR/SVG2/
|
||||
*
|
||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
interface SVGMetadataElement : SVGElement {
|
||||
};
|
||||
|
@ -100,6 +100,7 @@ webidl_files = \
|
||||
SVGElement.webidl \
|
||||
SVGLengthList.webidl \
|
||||
SVGMatrix.webidl \
|
||||
SVGMetadataElement.webidl \
|
||||
SVGNumberList.webidl \
|
||||
SVGPathSeg.webidl \
|
||||
SVGPathSegList.webidl \
|
||||
|
Loading…
Reference in New Issue
Block a user