Bug 853386 - Remove nsIDOMSVGRect and classinfo for SVGRect. r=Ms2ger
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 09 May 2013 13:42:12 -0400
changeset 142360 b4c12bd0ca4e3e61eebef3aeb49ee01b311fefd6
parent 142359 78a43b5ffabd78dfb84bf38a0aa0d6949e846f4c
child 142361 fb3cb79e27d9ed538b1ee53218f4f836de30645a
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs853386
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 853386 - Remove nsIDOMSVGRect and classinfo for SVGRect. r=Ms2ger
content/svg/content/src/SVGIRect.h
content/svg/content/src/SVGRect.cpp
content/svg/content/src/SVGRect.h
content/svg/content/src/nsSVGViewBox.cpp
content/svg/content/src/nsSVGViewBox.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/svg/moz.build
dom/interfaces/svg/nsIDOMSVGRect.idl
--- a/content/svg/content/src/SVGIRect.h
+++ b/content/svg/content/src/SVGIRect.h
@@ -1,31 +1,30 @@
 /* -*- 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_SVGIRect_h
 #define mozilla_dom_SVGIRect_h
 
-#include "nsIDOMSVGRect.h"
 #include "nsContentUtils.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/dom/SVGRectBinding.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "nsWrapperCache.h"
 #include "nsIContent.h"
 
 class nsSVGElement;
 
 namespace mozilla {
 namespace dom {
 
-class SVGIRect : public nsIDOMSVGRect,
+class SVGIRect : public nsISupports,
                  public nsWrapperCache
 {
 public:
   SVGIRect(nsIContent* aParent)
     : mParent(aParent)
   {
     SetIsDOMBinding();
   }
@@ -41,90 +40,30 @@ public:
 
   nsIContent* GetParentObject() const
   {
     return mParent;
   }
 
   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;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif //mozilla_dom_SVGIRect_h
--- a/content/svg/content/src/SVGRect.cpp
+++ b/content/svg/content/src/SVGRect.cpp
@@ -23,18 +23,16 @@ SVGRect::SVGRect(nsIContent* aParent, fl
 
 //----------------------------------------------------------------------
 // nsISupports methods:
 
 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
 
 } // namespace dom
 } // namespace mozilla
 
 ////////////////////////////////////////////////////////////////////////
 // Exported creation functions:
--- a/content/svg/content/src/SVGRect.h
+++ b/content/svg/content/src/SVGRect.h
@@ -61,21 +61,16 @@ public:
     return mHeight;
   }
 
   virtual void SetHeight(float aHeight, ErrorResult& aRv) MOZ_FINAL
   {
     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;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 already_AddRefed<mozilla::dom::SVGRect>
--- a/content/svg/content/src/nsSVGViewBox.cpp
+++ b/content/svg/content/src/nsSVGViewBox.cpp
@@ -39,25 +39,21 @@ NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGVi
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGViewBox::DOMBaseVal)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGViewBox::DOMBaseVal)
 
 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>
   sBaseSVGViewBoxTearoffTable;
 static nsSVGAttrTearoffTable<nsSVGViewBox, nsSVGViewBox::DOMAnimVal>
   sAnimSVGViewBoxTearoffTable;
 nsSVGAttrTearoffTable<nsSVGViewBox, mozilla::dom::SVGAnimatedRect>
   nsSVGViewBox::sSVGAnimatedRectTearoffTable;
--- a/content/svg/content/src/nsSVGViewBox.h
+++ b/content/svg/content/src/nsSVGViewBox.h
@@ -93,21 +93,16 @@ private:
 
   nsSVGViewBoxRect mBaseVal;
   nsAutoPtr<nsSVGViewBoxRect> mAnimVal;
   bool mHasBaseVal;
 
 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)
 
     DOMBaseVal(nsSVGViewBox *aVal, nsSVGElement *aSVGElement)
       : mozilla::dom::SVGIRect(aSVGElement)
       , mVal(aVal)
       , mSVGElement(aSVGElement)
     {}
@@ -139,21 +134,16 @@ public:
     void SetX(float aX, mozilla::ErrorResult& aRv) MOZ_FINAL;
     void SetY(float aY, mozilla::ErrorResult& aRv) MOZ_FINAL;
     void SetWidth(float aWidth, mozilla::ErrorResult& aRv) MOZ_FINAL;
     void SetHeight(float aHeight, mozilla::ErrorResult& aRv) MOZ_FINAL;
   };
 
   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)
 
     DOMAnimVal(nsSVGViewBox *aVal, nsSVGElement *aSVGElement)
       : mozilla::dom::SVGIRect(aSVGElement)
       , mVal(aVal)
       , mSVGElement(aSVGElement)
     {}
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -213,17 +213,16 @@
 
 #include "nsIDOMSVGAnimatedEnum.h"
 #include "nsIDOMSVGAnimatedInteger.h"
 #include "nsIDOMSVGAnimatedNumber.h"
 #include "nsIDOMSVGAnimatedString.h"
 #include "nsIDOMTimeEvent.h"
 #include "nsIDOMSVGLength.h"
 #include "nsIDOMSVGNumber.h"
-#include "nsIDOMSVGRect.h"
 
 // Storage includes
 #include "DOMStorage.h"
 
 // Device Storage
 #include "nsIDOMDeviceStorage.h"
 
 // Drag and drop
@@ -695,18 +694,16 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedNumber, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedString, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH,
                            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)
 
   NS_DEFINE_CLASSINFO_DATA(WindowUtils, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(XSLTProcessor, nsDOMGenericSH,
@@ -1937,20 +1934,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(SVGLength, nsIDOMSVGLength)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLength)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGNumber, nsIDOMSVGNumber)
     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
 
   DOM_CLASSINFO_MAP_BEGIN(XSLTProcessor, nsIXSLTProcessor)
     DOM_CLASSINFO_MAP_ENTRY(nsIXSLTProcessor)
     DOM_CLASSINFO_MAP_ENTRY(nsIXSLTProcessorPrivate)
   DOM_CLASSINFO_MAP_END
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -103,17 +103,16 @@ DOMCI_CLASS(TimeEvent)
 
 // other SVG classes
 DOMCI_CLASS(SVGAnimatedEnumeration)
 DOMCI_CLASS(SVGAnimatedInteger)
 DOMCI_CLASS(SVGAnimatedNumber)
 DOMCI_CLASS(SVGAnimatedString)
 DOMCI_CLASS(SVGLength)
 DOMCI_CLASS(SVGNumber)
-DOMCI_CLASS(SVGRect)
 
 // Canvas
 DOMCI_CLASS(MozCanvasPrintState)
 
 // WindowUtils
 DOMCI_CLASS(WindowUtils)
 
 // XSLTProcessor
--- a/dom/interfaces/svg/moz.build
+++ b/dom/interfaces/svg/moz.build
@@ -10,17 +10,16 @@ XPIDL_SOURCES += [
     'nsIDOMSVGAnimatedInteger.idl',
     'nsIDOMSVGAnimatedLength.idl',
     'nsIDOMSVGAnimatedNumber.idl',
     'nsIDOMSVGAnimatedString.idl',
     'nsIDOMSVGDocument.idl',
     'nsIDOMSVGElement.idl',
     'nsIDOMSVGLength.idl',
     'nsIDOMSVGNumber.idl',
-    'nsIDOMSVGRect.idl',
 ]
 
 XPIDL_MODULE = 'dom_svg'
 
 XPIDL_FLAGS += [
     '-I$(topsrcdir)/dom/interfaces/base',
     '-I$(topsrcdir)/dom/interfaces/core',
     '-I$(topsrcdir)/dom/interfaces/events',
deleted file mode 100644
--- a/dom/interfaces/svg/nsIDOMSVGRect.idl
+++ /dev/null
@@ -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
-};