Bug 833446: Remove nsIDOMSVGRectElement r=peterv

This commit is contained in:
David Zbarsky 2013-02-02 15:23:18 -05:00
parent ea4deaeb68
commit c0c54eafcf
6 changed files with 4 additions and 104 deletions

View File

@ -10,8 +10,6 @@
#include "mozilla/dom/SVGAnimatedLength.h"
#include <algorithm>
DOMCI_NODE_DATA(SVGRectElement, mozilla::dom::SVGRectElement)
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Rect)
namespace mozilla {
@ -36,15 +34,9 @@ nsSVGElement::LengthInfo SVGRectElement::sLengthInfo[6] =
//----------------------------------------------------------------------
// nsISupports methods
NS_IMPL_ADDREF_INHERITED(SVGRectElement,SVGRectElementBase)
NS_IMPL_RELEASE_INHERITED(SVGRectElement,SVGRectElementBase)
NS_INTERFACE_TABLE_HEAD(SVGRectElement)
NS_NODE_INTERFACE_TABLE4(SVGRectElement, nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement,
nsIDOMSVGRectElement)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGRectElement)
NS_INTERFACE_MAP_END_INHERITING(SVGRectElementBase)
NS_IMPL_ISUPPORTS_INHERITED3(SVGRectElement, SVGRectElementBase,
nsIDOMNode, nsIDOMElement,
nsIDOMSVGElement)
//----------------------------------------------------------------------
// Implementation
@ -61,14 +53,6 @@ SVGRectElement::SVGRectElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGRectElement)
//----------------------------------------------------------------------
// nsIDOMSVGRectElement methods
/* readonly attribute nsIDOMSVGAnimatedLength x; */
NS_IMETHODIMP SVGRectElement::GetX(nsIDOMSVGAnimatedLength * *aX)
{
*aX = X().get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
SVGRectElement::X()
@ -76,65 +60,30 @@ SVGRectElement::X()
return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
}
/* readonly attribute nsIDOMSVGAnimatedLength y; */
NS_IMETHODIMP SVGRectElement::GetY(nsIDOMSVGAnimatedLength * *aY)
{
*aY = Y().get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
SVGRectElement::Y()
{
return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
}
/* readonly attribute nsIDOMSVGAnimatedLength width; */
NS_IMETHODIMP SVGRectElement::GetWidth(nsIDOMSVGAnimatedLength * *aWidth)
{
*aWidth = Width().get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
SVGRectElement::Width()
{
return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
}
/* readonly attribute nsIDOMSVGAnimatedLength height; */
NS_IMETHODIMP SVGRectElement::GetHeight(nsIDOMSVGAnimatedLength * *aHeight)
{
*aHeight = Height().get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
SVGRectElement::Height()
{
return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
}
/* readonly attribute nsIDOMSVGAnimatedLength rx; */
NS_IMETHODIMP SVGRectElement::GetRx(nsIDOMSVGAnimatedLength * *aRx)
{
*aRx = Rx().get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
SVGRectElement::Rx()
{
return mLengthAttributes[ATTR_RX].ToDOMAnimatedLength(this);
}
/* readonly attribute nsIDOMSVGAnimatedLength ry; */
NS_IMETHODIMP SVGRectElement::GetRy(nsIDOMSVGAnimatedLength * *aRy)
{
*aRy = Ry().get();
return NS_OK;
}
already_AddRefed<SVGAnimatedLength>
SVGRectElement::Ry()
{

View File

@ -7,7 +7,6 @@
#define mozilla_dom_SVGRectElement_h
#include "nsSVGPathGeometryElement.h"
#include "nsIDOMSVGRectElement.h"
#include "nsSVGLength2.h"
nsresult NS_NewSVGRectElement(nsIContent **aResult,
@ -19,7 +18,7 @@ namespace mozilla {
namespace dom {
class SVGRectElement MOZ_FINAL : public SVGRectElementBase,
public nsIDOMSVGRectElement
public nsIDOMSVGElement
{
protected:
SVGRectElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@ -30,7 +29,6 @@ protected:
public:
// interfaces:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIDOMSVGRECTELEMENT
// xxx I wish we could use virtual inheritance
NS_FORWARD_NSIDOMNODE_TO_NSINODE
@ -45,8 +43,6 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; }
// WebIDL

View File

@ -329,7 +329,6 @@
#include "nsIDOMSVGMaskElement.h"
#include "nsIDOMSVGNumber.h"
#include "nsIDOMSVGRect.h"
#include "nsIDOMSVGRectElement.h"
#include "nsIDOMSVGScriptElement.h"
#include "nsIDOMSVGStopElement.h"
#include "nsIDOMSVGStyleElement.h"
@ -1112,8 +1111,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGMaskElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGRectElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGScriptElement, nsElementSH,
ELEMENT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGStopElement, nsElementSH,
@ -3126,11 +3123,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGRectElement, nsIDOMSVGRectElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRectElement)
DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGScriptElement, nsIDOMSVGScriptElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGScriptElement)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)

View File

@ -222,7 +222,6 @@ DOMCI_CLASS(SVGFilterElement)
DOMCI_CLASS(SVGImageElement)
DOMCI_CLASS(SVGMarkerElement)
DOMCI_CLASS(SVGMaskElement)
DOMCI_CLASS(SVGRectElement)
DOMCI_CLASS(SVGScriptElement)
DOMCI_CLASS(SVGStopElement)
DOMCI_CLASS(SVGStyleElement)

View File

@ -36,7 +36,6 @@ XPIDLSRCS = \
nsIDOMSVGMaskElement.idl \
nsIDOMSVGNumber.idl \
nsIDOMSVGRect.idl \
nsIDOMSVGRectElement.idl \
nsIDOMSVGScriptElement.idl \
nsIDOMSVGSVGElement.idl \
nsIDOMSVGStopElement.idl \

View File

@ -1,35 +0,0 @@
/* -*- 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/. */
#include "nsIDOMSVGElement.idl"
interface nsIDOMSVGAnimatedLength;
[scriptable, uuid(67F1F097-A2A8-40D4-A2B5-12A6E8D0455E)]
interface nsIDOMSVGRectElement
: nsIDOMSVGElement
/*
The SVG DOM makes use of multiple interface inheritance.
Since XPCOM only supports single interface inheritance,
the best thing that we can do is to promise that whenever
an object implements _this_ interface it will also
implement the following interfaces. (We then have to QI to
hop between them.)
nsIDOMSVGTests,
nsIDOMSVGLangSpace,
nsIDOMSVGExternalResourcesRequired,
nsIDOMSVGStylable,
nsIDOMSVGTransformable,
events::nsIDOMEventTarget
*/
{
readonly attribute nsIDOMSVGAnimatedLength x;
readonly attribute nsIDOMSVGAnimatedLength y;
readonly attribute nsIDOMSVGAnimatedLength width;
readonly attribute nsIDOMSVGAnimatedLength height;
readonly attribute nsIDOMSVGAnimatedLength rx;
readonly attribute nsIDOMSVGAnimatedLength ry;
};