Bug 853386 - Remove nsIDOMSVGRect and classinfo for SVGRect. r=Ms2ger

This commit is contained in:
Andrea Marchesini 2013-05-09 13:42:12 -04:00
parent 031eb2e92c
commit 5f4f41fbe6
9 changed files with 1 additions and 111 deletions

View File

@ -6,7 +6,6 @@
#ifndef mozilla_dom_SVGIRect_h
#define mozilla_dom_SVGIRect_h
#include "nsIDOMSVGRect.h"
#include "nsContentUtils.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/dom/SVGRectBinding.h"
@ -20,7 +19,7 @@ class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGIRect : public nsIDOMSVGRect,
class SVGIRect : public nsISupports,
public nsWrapperCache
{
public:
@ -46,80 +45,20 @@ public:
virtual float X() const = 0;
NS_IMETHOD GetX(float *aX) MOZ_OVERRIDE MOZ_FINAL
{
*aX = X();
return NS_OK;
}
virtual void SetX(float aX, ErrorResult& aRv) = 0;
NS_IMETHOD SetX(float aX) MOZ_OVERRIDE MOZ_FINAL
{
NS_ENSURE_FINITE(aX, NS_ERROR_ILLEGAL_VALUE);
ErrorResult rv;
SetX(aX, rv);
return rv.ErrorCode();
}
virtual float Y() const = 0;
NS_IMETHOD GetY(float *aY) MOZ_OVERRIDE MOZ_FINAL
{
*aY = Y();
return NS_OK;
}
virtual void SetY(float aY, ErrorResult& aRv) = 0;
NS_IMETHOD SetY(float aY) MOZ_OVERRIDE MOZ_FINAL
{
NS_ENSURE_FINITE(aY, NS_ERROR_ILLEGAL_VALUE);
ErrorResult rv;
SetY(aY, rv);
return rv.ErrorCode();
}
virtual float Width() const = 0;
NS_IMETHOD GetWidth(float *aWidth) MOZ_OVERRIDE MOZ_FINAL
{
*aWidth = Width();
return NS_OK;
}
virtual void SetWidth(float aWidth, ErrorResult& aRv) = 0;
NS_IMETHOD SetWidth(float aWidth) MOZ_OVERRIDE MOZ_FINAL
{
NS_ENSURE_FINITE(aWidth, NS_ERROR_ILLEGAL_VALUE);
ErrorResult rv;
SetWidth(aWidth, rv);
return rv.ErrorCode();
}
virtual float Height() const = 0;
NS_IMETHOD GetHeight(float *aHeight) MOZ_OVERRIDE MOZ_FINAL
{
*aHeight = Height();
return NS_OK;
}
virtual void SetHeight(float aHeight, ErrorResult& aRv) = 0;
NS_IMETHOD SetHeight(float aHeight) MOZ_OVERRIDE MOZ_FINAL
{
NS_ENSURE_FINITE(aHeight, NS_ERROR_ILLEGAL_VALUE);
ErrorResult rv;
SetHeight(aHeight, rv);
return rv.ErrorCode();
}
private:
nsCOMPtr<nsIContent> mParent;
};

View File

@ -28,8 +28,6 @@ NS_IMPL_ADDREF(SVGRect)
NS_IMPL_RELEASE(SVGRect)
NS_INTERFACE_MAP_BEGIN(SVGRect)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGRect)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGRect)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END

View File

@ -66,11 +66,6 @@ public:
mHeight = aHeight;
}
using mozilla::dom::SVGIRect::SetX;
using mozilla::dom::SVGIRect::SetY;
using mozilla::dom::SVGIRect::SetWidth;
using mozilla::dom::SVGIRect::SetHeight;
protected:
float mX, mY, mWidth, mHeight;
};

View File

@ -44,15 +44,11 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGViewBox::DOMAnimVal)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGViewBox::DOMAnimVal)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGViewBox::DOMBaseVal)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGRect)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGRect)
NS_INTERFACE_MAP_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGViewBox::DOMAnimVal)
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGRect)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGRect)
NS_INTERFACE_MAP_END
static nsSVGAttrTearoffTable<nsSVGViewBox, nsSVGViewBox::DOMBaseVal>

View File

@ -98,11 +98,6 @@ private:
public:
struct DOMBaseVal MOZ_FINAL : public mozilla::dom::SVGIRect
{
using mozilla::dom::SVGIRect::SetX;
using mozilla::dom::SVGIRect::SetY;
using mozilla::dom::SVGIRect::SetWidth;
using mozilla::dom::SVGIRect::SetHeight;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMBaseVal)
@ -144,11 +139,6 @@ public:
struct DOMAnimVal MOZ_FINAL : public mozilla::dom::SVGIRect
{
using mozilla::dom::SVGIRect::SetX;
using mozilla::dom::SVGIRect::SetY;
using mozilla::dom::SVGIRect::SetWidth;
using mozilla::dom::SVGIRect::SetHeight;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimVal)

View File

@ -218,7 +218,6 @@
#include "nsIDOMTimeEvent.h"
#include "nsIDOMSVGLength.h"
#include "nsIDOMSVGNumber.h"
#include "nsIDOMSVGRect.h"
// Storage includes
#include "DOMStorage.h"
@ -700,8 +699,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGNumber, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(SVGRect, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(MozCanvasPrintState, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
@ -1942,10 +1939,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGNumber)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(SVGRect, nsIDOMSVGRect)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRect)
DOM_CLASSINFO_MAP_END
DOM_CLASSINFO_MAP_BEGIN(MozCanvasPrintState, nsIDOMMozCanvasPrintState)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozCanvasPrintState)
DOM_CLASSINFO_MAP_END

View File

@ -108,7 +108,6 @@ DOMCI_CLASS(SVGAnimatedNumber)
DOMCI_CLASS(SVGAnimatedString)
DOMCI_CLASS(SVGLength)
DOMCI_CLASS(SVGNumber)
DOMCI_CLASS(SVGRect)
// Canvas
DOMCI_CLASS(MozCanvasPrintState)

View File

@ -15,7 +15,6 @@ XPIDL_SOURCES += [
'nsIDOMSVGElement.idl',
'nsIDOMSVGLength.idl',
'nsIDOMSVGNumber.idl',
'nsIDOMSVGRect.idl',
]
XPIDL_MODULE = 'dom_svg'

View File

@ -1,19 +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 "domstubs.idl"
[scriptable, uuid(5b912111-c10e-498f-a44c-c713c1843007)]
interface nsIDOMSVGRect : nsISupports
{
attribute float x;
// raises DOMException on setting
attribute float y;
// raises DOMException on setting
attribute float width;
// raises DOMException on setting
attribute float height;
// raises DOMException on setting
};