Bug 833446: Remove nsIDOMSVGSVGElement r=peterv
authorDavid Zbarsky <dzbarsky@gmail.com>
Fri, 08 Feb 2013 14:55:07 -0500
changeset 131241 1a7581b871cc9172f994901dc3d8cdb87ab64165
parent 131240 a74d4bc64a70ef54b154ac47954c2265ce8f1f5a
child 131242 5b925d66da97bd67bdd6920563883967524ad7c7
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs833446
milestone21.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 833446: Remove nsIDOMSVGSVGElement r=peterv
content/base/public/nsContentUtils.h
content/svg/content/src/SVGSVGElement.cpp
content/svg/content/src/SVGSVGElement.h
content/svg/content/src/SVGUseElement.cpp
content/svg/content/src/nsSVGElement.cpp
content/svg/content/src/nsSVGElement.h
content/svg/document/src/nsSVGDocument.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/svg/Makefile.in
dom/interfaces/svg/nsIDOMSVGDocument.idl
dom/interfaces/svg/nsIDOMSVGElement.idl
dom/interfaces/svg/nsIDOMSVGSVGElement.idl
dom/webidl/SVGSVGElement.webidl
image/src/SVGDocumentWrapper.cpp
--- a/content/base/public/nsContentUtils.h
+++ b/content/base/public/nsContentUtils.h
@@ -2323,21 +2323,16 @@ public:
     return (rv);                                                              \
   }
 
 #define NS_ENSURE_FINITE2(f1, f2, rv)                                         \
   if (!NS_finite((f1)+(f2))) {                                                \
     return (rv);                                                              \
   }
 
-#define NS_ENSURE_FINITE3(f1, f2, f3, rv)                                     \
-  if (!NS_finite((f1)+(f2)+(f3))) {                                           \
-    return (rv);                                                              \
-  }
-
 #define NS_ENSURE_FINITE4(f1, f2, f3, f4, rv)                                 \
   if (!NS_finite((f1)+(f2)+(f3)+(f4))) {                                      \
     return (rv);                                                              \
   }
 
 #define NS_ENSURE_FINITE5(f1, f2, f3, f4, f5, rv)                             \
   if (!NS_finite((f1)+(f2)+(f3)+(f4)+(f5))) {                                 \
     return (rv);                                                              \
--- a/content/svg/content/src/SVGSVGElement.cpp
+++ b/content/svg/content/src/SVGSVGElement.cpp
@@ -37,18 +37,16 @@
 #include "nsSMILTimeContainer.h"
 #include "nsSMILAnimationController.h"
 #include "nsSMILTypes.h"
 #include "nsIContentIterator.h"
 #include "SVGAngle.h"
 #include "mozilla/dom/SVGAnimatedLength.h"
 #include <algorithm>
 
-DOMCI_NODE_DATA(SVGSVGElement, mozilla::dom::SVGSVGElement)
-
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CHECK_PARSER(SVG)
 
 namespace mozilla {
 namespace dom {
 
 JSObject*
 SVGSVGElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
 {
@@ -72,29 +70,29 @@ nsISVGPoint*
 DOMSVGTranslatePoint::Clone()
 {
   return new DOMSVGTranslatePoint(this);
 }
 
 nsISupports*
 DOMSVGTranslatePoint::GetParentObject()
 {
-  return static_cast<nsIDOMSVGSVGElement*>(mElement);
+  return static_cast<nsIDOMSVGElement*>(mElement);
 }
 
 void
 DOMSVGTranslatePoint::SetX(float aValue, ErrorResult& rv)
 {
-  rv = mElement->SetCurrentTranslate(aValue, mPt.GetY());
+  mElement->SetCurrentTranslate(aValue, mPt.GetY());
 }
 
 void
 DOMSVGTranslatePoint::SetY(float aValue, ErrorResult& rv)
 {
-  rv = mElement->SetCurrentTranslate(mPt.GetX(), aValue);
+  mElement->SetCurrentTranslate(mPt.GetX(), aValue);
 }
 
 already_AddRefed<nsISVGPoint>
 DOMSVGTranslatePoint::MatrixTransform(SVGMatrix& matrix)
 {
   float a = matrix.A(), b = matrix.B(), c = matrix.C();
   float d = matrix.D(), e = matrix.E(), f = matrix.F();
   float x = mPt.GetX();
@@ -141,20 +139,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
     tmp->mTimedDocumentRoot->Traverse(&cb);
   }
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(SVGSVGElement,SVGSVGElementBase)
 NS_IMPL_RELEASE_INHERITED(SVGSVGElement,SVGSVGElementBase)
 
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(SVGSVGElement)
-  NS_NODE_INTERFACE_TABLE4(SVGSVGElement, nsIDOMNode, nsIDOMElement,
-                           nsIDOMSVGElement,
-                           nsIDOMSVGSVGElement)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGSVGElement)
+  NS_NODE_INTERFACE_TABLE3(SVGSVGElement, nsIDOMNode, nsIDOMElement,
+                           nsIDOMSVGElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGSVGElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGSVGElement::SVGSVGElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                                  FromParser aFromParser)
   : SVGSVGElementBase(aNodeInfo),
@@ -195,318 +191,167 @@ SVGSVGElement::Clone(nsINodeInfo *aNodeI
 
   return NS_FAILED(rv1) ? rv1 : rv2;
 }
 
 
 //----------------------------------------------------------------------
 // nsIDOMSVGSVGElement methods:
 
-/* readonly attribute nsIDOMSVGAnimatedLength x; */
-NS_IMETHODIMP
-SVGSVGElement::GetX(nsIDOMSVGAnimatedLength * *aX)
-{
-  *aX = X().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGSVGElement::X()
 {
   return mLengthAttributes[ATTR_X].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength y; */
-NS_IMETHODIMP
-SVGSVGElement::GetY(nsIDOMSVGAnimatedLength * *aY)
-{
-  *aY = Y().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGSVGElement::Y()
 {
   return mLengthAttributes[ATTR_Y].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength width; */
-NS_IMETHODIMP
-SVGSVGElement::GetWidth(nsIDOMSVGAnimatedLength * *aWidth)
-{
-  *aWidth = Width().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGSVGElement::Width()
 {
   return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength height; */
-NS_IMETHODIMP
-SVGSVGElement::GetHeight(nsIDOMSVGAnimatedLength * *aHeight)
-{
-  *aHeight = Height().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGSVGElement::Height()
 {
   return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute float pixelUnitToMillimeterX; */
-NS_IMETHODIMP
-SVGSVGElement::GetPixelUnitToMillimeterX(float *aPixelUnitToMillimeterX)
-{
-  *aPixelUnitToMillimeterX = PixelUnitToMillimeterX();
-  return NS_OK;
-}
-
 float
 SVGSVGElement::PixelUnitToMillimeterX()
 {
   return MM_PER_INCH_FLOAT / 96;
 }
 
-/* readonly attribute float pixelUnitToMillimeterY; */
-NS_IMETHODIMP
-SVGSVGElement::GetPixelUnitToMillimeterY(float *aPixelUnitToMillimeterY)
-{
-  return GetPixelUnitToMillimeterX(aPixelUnitToMillimeterY);
-}
-
 float
 SVGSVGElement::PixelUnitToMillimeterY()
 {
   return PixelUnitToMillimeterX();
 }
 
-/* readonly attribute float screenPixelToMillimeterX; */
-NS_IMETHODIMP
-SVGSVGElement::GetScreenPixelToMillimeterX(float *aScreenPixelToMillimeterX)
-{
-  *aScreenPixelToMillimeterX = ScreenPixelToMillimeterX();
-  return NS_OK;
-}
-
 float
 SVGSVGElement::ScreenPixelToMillimeterX()
 {
   return MM_PER_INCH_FLOAT / 96;
 }
 
-/* readonly attribute float screenPixelToMillimeterY; */
-NS_IMETHODIMP
-SVGSVGElement::GetScreenPixelToMillimeterY(float *aScreenPixelToMillimeterY)
-{
-  return GetScreenPixelToMillimeterX(aScreenPixelToMillimeterY);
-}
-
 float
 SVGSVGElement::ScreenPixelToMillimeterY()
 {
   return ScreenPixelToMillimeterX();
 }
 
-/* attribute boolean useCurrentView; */
-NS_IMETHODIMP
-SVGSVGElement::GetUseCurrentView(bool *aUseCurrentView)
-{
-  *aUseCurrentView = UseCurrentView();
-  return NS_OK;
-}
-
 bool
 SVGSVGElement::UseCurrentView()
 {
   return mUseCurrentView;
 }
 
-/* attribute float currentScale; */
-NS_IMETHODIMP
-SVGSVGElement::GetCurrentScale(float *aCurrentScale)
-{
-  *aCurrentScale = CurrentScale();
-  return NS_OK;
-}
-
 float
 SVGSVGElement::CurrentScale()
 {
   return mCurrentScale;
 }
 
 #define CURRENT_SCALE_MAX 16.0f
 #define CURRENT_SCALE_MIN 0.0625f
 
-NS_IMETHODIMP
+void
 SVGSVGElement::SetCurrentScale(float aCurrentScale)
 {
-  return SetCurrentScaleTranslate(aCurrentScale,
+  SetCurrentScaleTranslate(aCurrentScale,
     mCurrentTranslate.GetX(), mCurrentTranslate.GetY());
 }
 
-/* readonly attribute DOMSVGPoint currentTranslate; */
-NS_IMETHODIMP
-SVGSVGElement::GetCurrentTranslate(nsISupports * *aCurrentTranslate)
-{
-  *aCurrentTranslate = CurrentTranslate().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsISVGPoint>
 SVGSVGElement::CurrentTranslate()
 {
   nsCOMPtr<nsISVGPoint> point = new DOMSVGTranslatePoint(&mCurrentTranslate, this);
   return point.forget();
 }
 
-/* unsigned long suspendRedraw (in unsigned long max_wait_milliseconds); */
-NS_IMETHODIMP
-SVGSVGElement::SuspendRedraw(uint32_t max_wait_milliseconds, uint32_t *_retval)
-{
-  *_retval = SuspendRedraw(max_wait_milliseconds);
-  return NS_OK;
-}
-
 uint32_t
 SVGSVGElement::SuspendRedraw(uint32_t max_wait_milliseconds)
 {
   // suspendRedraw is a no-op in Mozilla, so it doesn't matter what
   // we return
   return 1;
 }
 
 /* void unsuspendRedraw (in unsigned long suspend_handle_id); */
-NS_IMETHODIMP
+void
 SVGSVGElement::UnsuspendRedraw(uint32_t suspend_handle_id)
 {
   // no-op
-  return NS_OK;
 }
 
 /* void unsuspendRedrawAll (); */
-NS_IMETHODIMP
+void
 SVGSVGElement::UnsuspendRedrawAll()
 {
   // no-op
-  return NS_OK;
-}
-
-/* void forceRedraw (); */
-NS_IMETHODIMP
-SVGSVGElement::ForceRedraw()
-{
-  ErrorResult rv;
-  ForceRedraw(rv);
-  return rv.ErrorCode();
 }
 
 void
 SVGSVGElement::ForceRedraw(ErrorResult& rv)
 {
   nsIDocument* doc = GetCurrentDoc();
   if (!doc) {
     rv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   doc->FlushPendingNotifications(Flush_Display);
 }
 
-/* void pauseAnimations (); */
-NS_IMETHODIMP
+void
 SVGSVGElement::PauseAnimations()
 {
-  ErrorResult rv;
-  PauseAnimations(rv);
-  return rv.ErrorCode();
-}
-
-void
-SVGSVGElement::PauseAnimations(ErrorResult& rv)
-{
   if (mTimedDocumentRoot) {
     mTimedDocumentRoot->Pause(nsSMILTimeContainer::PAUSE_SCRIPT);
   }
   // else we're not the outermost <svg> or not bound to a tree, so silently fail
 }
 
-/* void unpauseAnimations (); */
-NS_IMETHODIMP
+void
 SVGSVGElement::UnpauseAnimations()
 {
-  ErrorResult rv;
-  UnpauseAnimations(rv);
-  return rv.ErrorCode();
-}
-
-void
-SVGSVGElement::UnpauseAnimations(ErrorResult& rv)
-{
   if (mTimedDocumentRoot) {
     mTimedDocumentRoot->Resume(nsSMILTimeContainer::PAUSE_SCRIPT);
   }
   // else we're not the outermost <svg> or not bound to a tree, so silently fail
 }
 
-/* boolean animationsPaused (); */
-NS_IMETHODIMP
-SVGSVGElement::AnimationsPaused(bool *_retval)
-{
-  ErrorResult rv;
-  *_retval = AnimationsPaused(rv);
-  return rv.ErrorCode();
-}
-
 bool
-SVGSVGElement::AnimationsPaused(ErrorResult& rv)
+SVGSVGElement::AnimationsPaused()
 {
   nsSMILTimeContainer* root = GetTimedDocumentRoot();
   return root && root->IsPausedByType(nsSMILTimeContainer::PAUSE_SCRIPT);
 }
 
-/* float getCurrentTime (); */
-NS_IMETHODIMP
-SVGSVGElement::GetCurrentTime(float *_retval)
-{
-  ErrorResult rv;
-  *_retval = GetCurrentTime(rv);
-  return rv.ErrorCode();
-}
-
 float
-SVGSVGElement::GetCurrentTime(ErrorResult& rv)
+SVGSVGElement::GetCurrentTime()
 {
   nsSMILTimeContainer* root = GetTimedDocumentRoot();
   if (root) {
     double fCurrentTimeMs = double(root->GetCurrentTime());
     return (float)(fCurrentTimeMs / PR_MSEC_PER_SEC);
   } else {
     return 0.f;
   }
 }
 
-/* void setCurrentTime (in float seconds); */
-NS_IMETHODIMP
+void
 SVGSVGElement::SetCurrentTime(float seconds)
 {
-  NS_ENSURE_FINITE(seconds, NS_ERROR_ILLEGAL_VALUE);
-  ErrorResult rv;
-  SetCurrentTime(seconds, rv);
-  return rv.ErrorCode();
-}
-
-void
-SVGSVGElement::SetCurrentTime(float seconds, ErrorResult &rv)
-{
   if (mTimedDocumentRoot) {
     // Make sure the timegraph is up-to-date
     FlushAnimations();
     double fMilliseconds = double(seconds) * PR_MSEC_PER_SEC;
     // Round to nearest whole number before converting, to avoid precision
     // errors
     nsSMILTime lMilliseconds = int64_t(NS_round(fMilliseconds));
     mTimedDocumentRoot->SetCurrentTime(lMilliseconds);
@@ -516,156 +361,75 @@ SVGSVGElement::SetCurrentTime(float seco
     //  - re-enable event firing (it got disabled during seeking, and it
     //  doesn't get re-enabled until the first sample after the seek -- so
     //  let's make that happen now.)
     FlushAnimations();
   }
   // else we're not the outermost <svg> or not bound to a tree, so silently fail
 }
 
-/* nsIDOMSVGNumber createSVGNumber (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGNumber(nsIDOMSVGNumber **_retval)
-{
-  *_retval = CreateSVGNumber().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsIDOMSVGNumber>
 SVGSVGElement::CreateSVGNumber()
 {
   nsCOMPtr<nsIDOMSVGNumber> number = new DOMSVGNumber();
   return number.forget();
 }
 
-/* nsIDOMSVGLength createSVGLength (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGLength(nsIDOMSVGLength **_retval)
-{
-  *_retval = CreateSVGLength().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsIDOMSVGLength>
 SVGSVGElement::CreateSVGLength()
 {
   nsCOMPtr<nsIDOMSVGLength> length = new DOMSVGLength();
   return length.forget();
 }
 
-/* SVGAngle createSVGAngle (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGAngle(nsISupports **_retval)
-{
-  *_retval =  CreateSVGAngle().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAngle>
 SVGSVGElement::CreateSVGAngle()
 {
   nsSVGAngle* angle = new nsSVGAngle();
   angle->Init();
   nsRefPtr<SVGAngle> svgangle = new SVGAngle(angle, this, SVGAngle::CreatedValue);
   return svgangle.forget();
 }
 
-/* DOMSVGPoint createSVGPoint (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGPoint(nsISupports **_retval)
-{
-  *_retval = CreateSVGPoint().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsISVGPoint>
 SVGSVGElement::CreateSVGPoint()
 {
   nsCOMPtr<nsISVGPoint> point = new DOMSVGPoint(0, 0);
   return point.forget();
 }
 
-/* SVGMatrix createSVGMatrix (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGMatrix(nsISupports **_retval)
-{
-  *_retval = CreateSVGMatrix().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGMatrix>
 SVGSVGElement::CreateSVGMatrix()
 {
   nsRefPtr<SVGMatrix> matrix = new SVGMatrix();
   return matrix.forget();
 }
 
-/* nsIDOMSVGRect createSVGRect (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGRect(nsIDOMSVGRect **_retval)
-{
-  *_retval = CreateSVGRect().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsIDOMSVGRect>
 SVGSVGElement::CreateSVGRect()
 {
   nsCOMPtr<nsIDOMSVGRect> rect;
   NS_NewSVGRect(getter_AddRefs(rect));
   return rect.forget();
 }
 
-/* DOMSVGTransform createSVGTransform (); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGTransform(nsISupports **_retval)
-{
-  *_retval = CreateSVGTransform().get();
-  return NS_OK;
-}
-
 already_AddRefed<DOMSVGTransform>
 SVGSVGElement::CreateSVGTransform()
 {
   nsRefPtr<DOMSVGTransform> transform = new DOMSVGTransform();
   return transform.forget();
 }
 
-/* DOMSVGTransform createSVGTransformFromMatrix (in SVGMatrix matrix); */
-NS_IMETHODIMP
-SVGSVGElement::CreateSVGTransformFromMatrix(nsISupports *matrix,
-                                            nsISupports **_retval)
-{
-  nsCOMPtr<SVGMatrix> domItem = do_QueryInterface(matrix);
-  if (!domItem) {
-    return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
-  }
-
-  *_retval = CreateSVGTransformFromMatrix(*domItem).get();
-  return NS_OK;
-}
-
 already_AddRefed<DOMSVGTransform>
 SVGSVGElement::CreateSVGTransformFromMatrix(SVGMatrix& matrix)
 {
   nsRefPtr<DOMSVGTransform> transform = new DOMSVGTransform(matrix.Matrix());
   return transform.forget();
 }
 
-/* nsIDOMElement getElementById (in DOMString elementId); */
-NS_IMETHODIMP
-SVGSVGElement::GetElementById(const nsAString & elementId, nsIDOMElement **_retval)
-{
-  NS_ENSURE_ARG_POINTER(_retval);
-  ErrorResult rv;
-  nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(GetElementById(elementId, rv));
-  elem.forget(_retval);
-  return rv.ErrorCode();
-}
-
 Element*
 SVGSVGElement::GetElementById(const nsAString& elementId, ErrorResult& rv)
 {
   nsAutoString selector(NS_LITERAL_STRING("#"));
   nsStyleUtil::AppendEscapedCSSIdent(PromiseFlatString(elementId), selector);
   nsIContent* element = QuerySelector(selector, rv);
   if (!rv.Failed() && element) {
     return element->AsElement();
@@ -713,24 +477,22 @@ SVGSVGElement::SetZoomAndPan(uint16_t aZ
   }
 
   rv.Throw(NS_ERROR_RANGE_ERR);
 }
 
 //----------------------------------------------------------------------
 // helper methods for implementing SVGZoomEvent:
 
-NS_IMETHODIMP
+void
 SVGSVGElement::SetCurrentScaleTranslate(float s, float x, float y)
 {
-  NS_ENSURE_FINITE3(s, x, y, NS_ERROR_ILLEGAL_VALUE);
-
   if (s == mCurrentScale &&
       x == mCurrentTranslate.GetX() && y == mCurrentTranslate.GetY()) {
-    return NS_OK;
+    return;
   }
 
   // Prevent bizarre behaviour and maxing out of CPU and memory by clamping
   if (s < CURRENT_SCALE_MIN)
     s = CURRENT_SCALE_MIN;
   else if (s > CURRENT_SCALE_MAX)
     s = CURRENT_SCALE_MAX;
   
@@ -756,23 +518,22 @@ SVGSVGElement::SetCurrentScaleTranslate(
       bool scaling = (mPreviousScale != mCurrentScale);
       nsEventStatus status = nsEventStatus_eIgnore;
       nsGUIEvent event(true, scaling ? NS_SVG_ZOOM : NS_SVG_SCROLL, 0);
       event.eventStructType = scaling ? NS_SVGZOOM_EVENT : NS_SVG_EVENT;
       presShell->HandleDOMEventWithTarget(this, &event, &status);
       InvalidateTransformNotifyFrame();
     }
   }
-  return NS_OK;
 }
 
-NS_IMETHODIMP
+void
 SVGSVGElement::SetCurrentTranslate(float x, float y)
 {
-  return SetCurrentScaleTranslate(mCurrentScale, x, y);
+  SetCurrentScaleTranslate(mCurrentScale, x, y);
 }
 
 nsSMILTimeContainer*
 SVGSVGElement::GetTimedDocumentRoot()
 {
   if (mTimedDocumentRoot) {
     return mTimedDocumentRoot;
   }
--- a/content/svg/content/src/SVGSVGElement.h
+++ b/content/svg/content/src/SVGSVGElement.h
@@ -3,29 +3,29 @@
  * 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_SVGSVGElement_h
 #define mozilla_dom_SVGSVGElement_h
 
 #include "mozilla/dom/FromParser.h"
 #include "nsISVGPoint.h"
-#include "nsIDOMSVGSVGElement.h"
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "SVGGraphicsElement.h"
 #include "nsSVGViewBox.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "mozilla/Attributes.h"
 
 nsresult NS_NewSVGSVGElement(nsIContent **aResult,
                              already_AddRefed<nsINodeInfo> aNodeInfo,
                              mozilla::dom::FromParser aFromParser);
 
+class nsIDOMSVGNumber;
 class nsSMILTimeContainer;
 class nsSVGOuterSVGFrame;
 class nsSVGInnerSVGFrame;
 class nsSVGImageFrame;
 
 namespace mozilla {
 class DOMSVGAnimatedPreserveAspectRatio;
 class DOMSVGTransform;
@@ -74,17 +74,17 @@ public:
   }
   float width;
   float height;
 };
 
 typedef SVGGraphicsElement SVGSVGElementBase;
 
 class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase,
-                                public nsIDOMSVGSVGElement
+                                public nsIDOMSVGElement
 {
   friend class ::nsSVGOuterSVGFrame;
   friend class ::nsSVGInnerSVGFrame;
   friend class ::nsSVGImageFrame;
   friend class mozilla::SVGFragmentIdentifier;
 
   SVGSVGElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                 FromParser aFromParser);
@@ -93,36 +93,28 @@ class SVGSVGElement MOZ_FINAL : public S
   friend nsresult (::NS_NewSVGSVGElement(nsIContent **aResult,
                                          already_AddRefed<nsINodeInfo> aNodeInfo,
                                          mozilla::dom::FromParser aFromParser));
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGSVGElement, SVGSVGElementBase)
-  NS_DECL_NSIDOMSVGSVGELEMENT
 
   // xxx I wish we could use virtual inheritance
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
   NS_FORWARD_NSIDOMSVGELEMENT(SVGSVGElementBase::)
 
   /**
    * For use by zoom controls to allow currentScale, currentTranslate.x and
    * currentTranslate.y to be set by a single operation that dispatches a
    * single SVGZoom event (instead of one SVGZoom and two SVGScroll events).
    */
-  NS_IMETHOD SetCurrentScaleTranslate(float s, float x, float y);
-
-  /**
-   * For use by pan controls to allow currentTranslate.x and currentTranslate.y
-   * to be set by a single operation that dispatches a single SVGScroll event
-   * (instead of two).
-   */
-  NS_IMETHOD SetCurrentTranslate(float x, float y);
+  void SetCurrentScaleTranslate(float s, float x, float y);
 
   /**
    * Retrieve the value of currentScale and currentTranslate.
    */
   const SVGPoint& GetCurrentTranslate() { return mCurrentTranslate; }
   float GetCurrentScale() { return mCurrentScale; }
 
   /**
@@ -218,42 +210,41 @@ public:
     return svgFloatSize(mViewportWidth, mViewportHeight);
   }
 
   void SetViewportSize(const svgFloatSize& aSize) {
     mViewportWidth  = aSize.width;
     mViewportHeight = aSize.height;
   }
 
-  virtual nsXPCClassInfo* GetClassInfo();
-
   virtual nsIDOMNode* AsDOMNode() { return this; }
 
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
   float PixelUnitToMillimeterX();
   float PixelUnitToMillimeterY();
   float ScreenPixelToMillimeterX();
   float ScreenPixelToMillimeterY();
   bool UseCurrentView();
-  // XPIDL SetCurrentScale and SetCurrentTranslate are alright to use because
-  // they only throw on non-finite floats and we don't allow those.
   float CurrentScale();
+  void SetCurrentScale(float aCurrentScale);
   already_AddRefed<nsISVGPoint> CurrentTranslate();
+  void SetCurrentTranslate(float x, float y);
   uint32_t SuspendRedraw(uint32_t max_wait_milliseconds);
-  // XPIDL UnSuspendRedraw(All) can be used because it's a no-op.
+  void UnsuspendRedraw(uint32_t suspend_handle_id);
+  void UnsuspendRedrawAll();
   void ForceRedraw(ErrorResult& rv);
-  void PauseAnimations(ErrorResult& rv);
-  void UnpauseAnimations(ErrorResult& rv);
-  bool AnimationsPaused(ErrorResult& rv);
-  float GetCurrentTime(ErrorResult& rv);
-  void SetCurrentTime(float seconds, ErrorResult& rv);
+  void PauseAnimations();
+  void UnpauseAnimations();
+  bool AnimationsPaused();
+  float GetCurrentTime();
+  void SetCurrentTime(float seconds);
   already_AddRefed<nsIDOMSVGNumber> CreateSVGNumber();
   already_AddRefed<nsIDOMSVGLength> CreateSVGLength();
   already_AddRefed<SVGAngle> CreateSVGAngle();
   already_AddRefed<nsISVGPoint> CreateSVGPoint();
   already_AddRefed<SVGMatrix> CreateSVGMatrix();
   already_AddRefed<nsIDOMSVGRect> CreateSVGRect();
   already_AddRefed<DOMSVGTransform> CreateSVGTransform();
   already_AddRefed<DOMSVGTransform> CreateSVGTransformFromMatrix(SVGMatrix& matrix);
--- a/content/svg/content/src/SVGUseElement.cpp
+++ b/content/svg/content/src/SVGUseElement.cpp
@@ -332,20 +332,17 @@ SVGUseElement::CreateAnonymousContent()
   nsNodeUtils::Clone(targetContent, true, nodeInfoManager, unused,
                      getter_AddRefs(newnode));
 
   nsCOMPtr<nsIContent> newcontent = do_QueryInterface(newnode);
 
   if (!newcontent)
     return nullptr;
 
-  nsCOMPtr<nsIDOMSVGSymbolElement> symbol     = do_QueryInterface(newcontent);
-  nsCOMPtr<nsIDOMSVGSVGElement>    svg        = do_QueryInterface(newcontent);
-
-  if (symbol) {
+  if (newcontent->IsSVG(nsGkAtoms::symbol)) {
     nsIDocument *document = GetCurrentDoc();
     if (!document)
       return nullptr;
 
     nsNodeInfoManager *nodeInfoManager = document->NodeInfoManager();
     if (!nodeInfoManager)
       return nullptr;
 
@@ -381,17 +378,18 @@ SVGUseElement::CreateAnonymousContent()
       nsCOMPtr<nsIContent> child = newcontent->GetFirstChild();
       newcontent->RemoveChildAt(0, false);
       svgNode->InsertChildAt(child, i, true);
     }
 
     newcontent = svgNode;
   }
 
-  if (symbol || svg) {
+  if (newcontent->IsSVG() && (newcontent->Tag() == nsGkAtoms::svg ||
+                              newcontent->Tag() == nsGkAtoms::symbol)) {
     nsSVGElement *newElement = static_cast<nsSVGElement*>(newcontent.get());
 
     if (mLengthAttributes[ATTR_WIDTH].IsExplicitlySet())
       newElement->SetLength(nsGkAtoms::width, mLengthAttributes[ATTR_WIDTH]);
     if (mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet())
       newElement->SetLength(nsGkAtoms::height, mLengthAttributes[ATTR_HEIGHT]);
   }
 
@@ -410,50 +408,39 @@ void
 SVGUseElement::DestroyAnonymousContent()
 {
   nsContentUtils::DestroyAnonymousContent(&mClone);
 }
 
 bool
 SVGUseElement::OurWidthAndHeightAreUsed() const
 {
-  if (mClone) {
-    nsCOMPtr<nsIDOMSVGSVGElement>    svg    = do_QueryInterface(mClone);
-    nsCOMPtr<nsIDOMSVGSymbolElement> symbol = do_QueryInterface(mClone);
-    return svg || symbol;
-  }
-  return false;
+  return mClone && mClone->IsSVG() && (mClone->Tag() == nsGkAtoms::svg ||
+                                       mClone->Tag() == nsGkAtoms::symbol);
 }
 
 //----------------------------------------------------------------------
 // implementation helpers
 
 void
 SVGUseElement::SyncWidthOrHeight(nsIAtom* aName)
 {
   NS_ASSERTION(aName == nsGkAtoms::width || aName == nsGkAtoms::height,
                "The clue is in the function name");
   NS_ASSERTION(OurWidthAndHeightAreUsed(), "Don't call this");
 
-  if (!mClone) {
-    return;
-  }
-
-  nsCOMPtr<nsIDOMSVGSymbolElement> symbol = do_QueryInterface(mClone);
-  nsCOMPtr<nsIDOMSVGSVGElement>    svg    = do_QueryInterface(mClone);
-
-  if (symbol || svg) {
+  if (OurWidthAndHeightAreUsed()) {
     nsSVGElement *target = static_cast<nsSVGElement*>(mClone.get());
     uint32_t index = *sLengthInfo[ATTR_WIDTH].mName == aName ? ATTR_WIDTH : ATTR_HEIGHT;
 
     if (mLengthAttributes[index].IsExplicitlySet()) {
       target->SetLength(aName, mLengthAttributes[index]);
       return;
     }
-    if (svg) {
+    if (mClone->Tag() == nsGkAtoms::svg) {
       // Our width/height attribute is now no longer explicitly set, so we
       // need to revert the clone's width/height to the width/height of the
       // content that's being cloned.
       TriggerReclone();
       return;
     }
     // Our width/height attribute is now no longer explicitly set, so we
     // need to set the value to 100%
--- a/content/svg/content/src/nsSVGElement.cpp
+++ b/content/svg/content/src/nsSVGElement.cpp
@@ -1118,17 +1118,17 @@ NS_IMETHODIMP nsSVGElement::GetId(nsAStr
 
 NS_IMETHODIMP nsSVGElement::SetId(const nsAString & aId)
 {
   return SetAttr(kNameSpaceID_None, nsGkAtoms::id, aId, true);
 }
 
 /* readonly attribute nsIDOMSVGSVGElement ownerSVGElement; */
 NS_IMETHODIMP
-nsSVGElement::GetOwnerSVGElement(nsIDOMSVGSVGElement * *aOwnerSVGElement)
+nsSVGElement::GetOwnerSVGElement(nsIDOMSVGElement * *aOwnerSVGElement)
 {
   ErrorResult rv;
   NS_IF_ADDREF(*aOwnerSVGElement = GetOwnerSVGElement(rv));
   return rv.ErrorCode();
 }
 
 SVGSVGElement*
 nsSVGElement::GetOwnerSVGElement(ErrorResult& rv)
--- a/content/svg/content/src/nsSVGElement.h
+++ b/content/svg/content/src/nsSVGElement.h
@@ -18,17 +18,16 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "mozilla/dom/Element.h"
 #include "nsISupportsImpl.h"
 #include "nsStyledElement.h"
 #include "nsSVGClass.h"
 #include "nsIDOMSVGElement.h"
 
-class nsIDOMSVGSVGElement;
 class nsSVGAngle;
 class nsSVGBoolean;
 class nsSVGEnum;
 class nsSVGInteger;
 class nsSVGIntegerPair;
 class nsSVGLength2;
 class nsSVGNumber2;
 class nsSVGNumberPair;
@@ -115,17 +114,17 @@ public:
 
   // nsIDOMNode
   NS_IMETHOD IsSupported(const nsAString& aFeature, const nsAString& aVersion,
                          bool* aReturn);
   
   // nsIDOMSVGElement
   NS_IMETHOD GetId(nsAString & aId);
   NS_IMETHOD SetId(const nsAString & aId);
-  NS_IMETHOD GetOwnerSVGElement(nsIDOMSVGSVGElement** aOwnerSVGElement);
+  NS_IMETHOD GetOwnerSVGElement(nsIDOMSVGElement** aOwnerSVGElement);
   NS_IMETHOD GetViewportElement(nsIDOMSVGElement** aViewportElement);
   NS_IMETHOD GetClassName(nsIDOMSVGAnimatedString** aClassName);
   NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle);
 
   // Gets the element that establishes the rectangular viewport against which
   // we should resolve percentage lengths (our "coordinate context"). Returns
   // nullptr for outer <svg> or SVG without an <svg> parent (invalid SVG).
   mozilla::dom::SVGSVGElement* GetCtx() const;
--- a/content/svg/document/src/nsSVGDocument.cpp
+++ b/content/svg/document/src/nsSVGDocument.cpp
@@ -1,17 +1,17 @@
 /* -*- 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 "nsSVGDocument.h"
 #include "nsString.h"
 #include "nsLiteralString.h"
-#include "nsIDOMSVGSVGElement.h"
+#include "nsIDOMSVGElement.h"
 #include "mozilla/dom/Element.h"
 
 using namespace mozilla::dom;
 
 //----------------------------------------------------------------------
 // Implementation
 
 nsSVGDocument::nsSVGDocument()
@@ -54,17 +54,17 @@ nsSVGDocument::GetDomain(nsAString& aDom
     CopyUTF8toUTF16(domain, aDomain);
   }
 
   return NS_OK;
 }
 
 /* readonly attribute SVGSVGElement rootElement; */
 NS_IMETHODIMP
-nsSVGDocument::GetRootElement(nsIDOMSVGSVGElement** aRootElement)
+nsSVGDocument::GetRootElement(nsIDOMSVGElement** aRootElement)
 {
   *aRootElement = nullptr;
   Element* root = nsDocument::GetRootElement();
 
   return root ? CallQueryInterface(root, aRootElement) : NS_OK;
 }
 
 nsresult
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -324,17 +324,16 @@
 #include "nsIDOMSVGFilterElement.h"
 #include "nsIDOMSVGFilters.h"
 #include "nsIDOMSVGImageElement.h"
 #include "nsIDOMSVGLength.h"
 #include "nsIDOMSVGMarkerElement.h"
 #include "nsIDOMSVGMaskElement.h"
 #include "nsIDOMSVGNumber.h"
 #include "nsIDOMSVGRect.h"
-#include "nsIDOMSVGSVGElement.h"
 #include "nsIDOMSVGSwitchElement.h"
 #include "nsIDOMSVGSymbolElement.h"
 #include "nsIDOMSVGTextElement.h"
 #include "nsIDOMSVGTextPathElement.h"
 #include "nsIDOMSVGTitleElement.h"
 #include "nsIDOMSVGTSpanElement.h"
 #include "nsIDOMSVGUnitTypes.h"
 #include "nsIDOMSVGURIReference.h"
@@ -1088,18 +1087,16 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(SVGFilterElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGImageElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGMarkerElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGMaskElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(SVGSVGElement, nsElementSH,
-                           ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGSwitchElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGSymbolElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGTextElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGTextPathElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
@@ -3073,21 +3070,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGMaskElement, nsIDOMSVGMaskElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMaskElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUnitTypes)
     DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(SVGSVGElement, nsIDOMSVGSVGElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSVGElement)
-    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(SVGSwitchElement, nsIDOMSVGSwitchElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSwitchElement)
     DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGSymbolElement, nsIDOMSVGSymbolElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSymbolElement)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -217,17 +217,16 @@ DOMCI_CLASS(SVGFEPointLightElement)
 DOMCI_CLASS(SVGFESpecularLightingElement)
 DOMCI_CLASS(SVGFESpotLightElement)
 DOMCI_CLASS(SVGFETileElement)
 DOMCI_CLASS(SVGFETurbulenceElement)
 DOMCI_CLASS(SVGFilterElement)
 DOMCI_CLASS(SVGImageElement)
 DOMCI_CLASS(SVGMarkerElement)
 DOMCI_CLASS(SVGMaskElement)
-DOMCI_CLASS(SVGSVGElement)
 DOMCI_CLASS(SVGSwitchElement)
 DOMCI_CLASS(SVGSymbolElement)
 DOMCI_CLASS(SVGTextElement)
 DOMCI_CLASS(SVGTextPathElement)
 DOMCI_CLASS(SVGTitleElement)
 DOMCI_CLASS(SVGTSpanElement)
 DOMCI_CLASS(SVGUnknownElement)
 DOMCI_CLASS(SVGUseElement)
--- a/dom/interfaces/svg/Makefile.in
+++ b/dom/interfaces/svg/Makefile.in
@@ -31,17 +31,16 @@ XPIDLSRCS	= \
 		nsIDOMSVGFilterElement.idl \
 		nsIDOMSVGFilters.idl \
 		nsIDOMSVGImageElement.idl \
 		nsIDOMSVGLength.idl \
 		nsIDOMSVGMarkerElement.idl \
 		nsIDOMSVGMaskElement.idl \
 		nsIDOMSVGNumber.idl \
 		nsIDOMSVGRect.idl \
-		nsIDOMSVGSVGElement.idl \
 		nsIDOMSVGStringList.idl \
 		nsIDOMSVGSwitchElement.idl \
 		nsIDOMSVGSymbolElement.idl \
 		nsIDOMSVGTextContentElement.idl \
 		nsIDOMSVGTextElement.idl \
 		nsIDOMSVGTextPathElement.idl \
 		nsIDOMSVGTextPositionElem.idl \
 		nsIDOMSVGTitleElement.idl \
--- a/dom/interfaces/svg/nsIDOMSVGDocument.idl
+++ b/dom/interfaces/svg/nsIDOMSVGDocument.idl
@@ -1,15 +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/. */
 
 #include "nsIDOMDocument.idl"
 
-interface nsIDOMSVGSVGElement;
+interface nsIDOMSVGElement;
 
 [scriptable, uuid(8fe506e4-5563-4b16-9228-182071e3f8f8)]
 interface nsIDOMSVGDocument : nsIDOMDocument
 {
   readonly attribute DOMString domain;
-  readonly attribute nsIDOMSVGSVGElement rootElement;
+  readonly attribute nsIDOMSVGElement rootElement;
 };
--- a/dom/interfaces/svg/nsIDOMSVGElement.idl
+++ b/dom/interfaces/svg/nsIDOMSVGElement.idl
@@ -1,27 +1,26 @@
 /* -*- 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 "nsIDOMElement.idl"
 
-interface nsIDOMSVGSVGElement;
 interface nsIDOMSVGAnimatedString;
 interface nsIDOMCSSStyleDeclaration;
 interface nsIDOMCSSValue;
 
 
 [scriptable, uuid(7ccf8faf-29b4-4113-bb23-bc187bac27cf)]
 interface nsIDOMSVGElement : nsIDOMElement
 {
   attribute DOMString id;
             // raises DOMException on setting
-  readonly attribute nsIDOMSVGSVGElement ownerSVGElement;
+  readonly attribute nsIDOMSVGElement    ownerSVGElement;
   readonly attribute nsIDOMSVGElement    viewportElement;
 
   readonly attribute nsIDOMSVGAnimatedString   className;
   readonly attribute nsIDOMCSSStyleDeclaration style;
 
   // Not implemented
   // nsIDOMCSSValue getPresentationAttribute(in DOMString name);
 };
deleted file mode 100644
--- a/dom/interfaces/svg/nsIDOMSVGSVGElement.idl
+++ /dev/null
@@ -1,88 +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;
-interface nsIDOMSVGRect;
-interface nsIDOMSVGNumber;
-interface nsIDOMSVGLength;
-
-// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
-%{C++
-#ifdef GetCurrentTime
-#undef GetCurrentTime
-#endif
-%}
-
-[scriptable, uuid(4670a204-4ef1-455f-9595-9847b077c624)]
-interface nsIDOMSVGSVGElement
-  : 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,
-    nsIDOMSVGFitToViewBox,
-    nsIDOMSVGZoomAndPan,
-    events::nsIDOMEventTarget,
-*/
-{ 
-  readonly attribute nsIDOMSVGAnimatedLength x;
-  readonly attribute nsIDOMSVGAnimatedLength y;
-  readonly attribute nsIDOMSVGAnimatedLength width;
-  readonly attribute nsIDOMSVGAnimatedLength height;
-  // readonly attribute nsIDOMSVGRect     viewport;
-  readonly attribute float pixelUnitToMillimeterX;
-  readonly attribute float pixelUnitToMillimeterY;
-  readonly attribute float screenPixelToMillimeterX;
-  readonly attribute float screenPixelToMillimeterY;
-  readonly attribute boolean useCurrentView;
-  // readonly attribute nsIDOMSVGViewSpec currentView;
-  attribute float currentScale;
-      // raises DOMException on setting
-  //  SVGPoint
-  readonly attribute nsISupports currentTranslate;
-
-  unsigned long suspendRedraw(in unsigned long max_wait_milliseconds);
-  void          unsuspendRedraw(in unsigned long suspend_handle_id);
-      // raises( DOMException );
-  void          unsuspendRedrawAll();
-  void          forceRedraw();
-  void          pauseAnimations();
-  void          unpauseAnimations();
-  boolean       animationsPaused();
-  float         getCurrentTime();
-  void          setCurrentTime(in float seconds);
-  /*
-  nsIDOMNodeList getIntersectionList(in nsIDOMSVGRect rect,
-                                     in nsIDOMSVGElement referenceElement);
-  nsIDOMNodeList getEnclosureList(in nsIDOMSVGRect rect, in nsIDOMSVGElement referenceElement);
-  boolean       checkIntersection(in nsIDOMSVGElement element, in nsIDOMSVGRect rect);
-  boolean       checkEnclosure(in nsIDOMSVGElement element, in nsIDOMSVGRect rect);
-  void          deSelectAll();
-  */
-  nsIDOMSVGNumber       createSVGNumber();
-  nsIDOMSVGLength       createSVGLength();
-  // SVGAngle
-  nsISupports           createSVGAngle();
-  // SVGPoint
-  nsISupports           createSVGPoint();
-  // SVGMatrix
-  nsISupports           createSVGMatrix();
-  nsIDOMSVGRect         createSVGRect();
-  // SVGTransform
-  nsISupports           createSVGTransform();
-  // SVGTransform                                       SVGMatrix
-  nsISupports           createSVGTransformFromMatrix(in nsISupports matrix);
-  nsIDOMElement         getElementById(in DOMString elementId);
-};
--- a/dom/webidl/SVGSVGElement.webidl
+++ b/dom/webidl/SVGSVGElement.webidl
@@ -31,25 +31,20 @@ interface SVGSVGElement : SVGGraphicsEle
            attribute float currentScale;
   readonly attribute SVGPoint currentTranslate;
 
   unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
   void unsuspendRedraw(unsigned long suspendHandleID);
   void unsuspendRedrawAll();
   [Throws]
   void forceRedraw();
-  [Throws]
   void pauseAnimations();
-  [Throws]
   void unpauseAnimations();
-  [Throws]
   boolean animationsPaused();
-  [Throws]
   float getCurrentTime();
-  [Throws]
   void setCurrentTime(float seconds);
   // NodeList getIntersectionList(SVGRect rect, SVGElement referenceElement);
   // NodeList getEnclosureList(SVGRect rect, SVGElement referenceElement);
   // boolean checkIntersection(SVGElement element, SVGRect rect);
   // boolean checkEnclosure(SVGElement element, SVGRect rect);
   // void deselectAll();
   [Creator]
   SVGNumber createSVGNumber();
--- a/image/src/SVGDocumentWrapper.cpp
+++ b/image/src/SVGDocumentWrapper.cpp
@@ -25,16 +25,17 @@
 #include "nsComponentManagerUtils.h"
 #include "nsSMILAnimationController.h"
 #include "nsServiceManagerUtils.h"
 #include "nsSize.h"
 #include "gfxRect.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "nsSVGLength2.h"
 #include "nsSVGEffects.h"
+#include "mozilla/dom/SVGAnimatedLength.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 namespace image {
 
 NS_IMPL_ISUPPORTS4(SVGDocumentWrapper,
                    nsIStreamListener,
@@ -68,32 +69,30 @@ SVGDocumentWrapper::DestroyViewer()
 }
 
 bool
 SVGDocumentWrapper::GetWidthOrHeight(Dimension aDimension,
                                      int32_t& aResult)
 {
   SVGSVGElement* rootElem = GetRootSVGElem();
   NS_ABORT_IF_FALSE(rootElem, "root elem missing or of wrong type");
-  nsresult rv;
 
   // Get the width or height SVG object
-  nsRefPtr<nsIDOMSVGAnimatedLength> domAnimLength;
+  nsRefPtr<SVGAnimatedLength> domAnimLength;
   if (aDimension == eWidth) {
-    rv = rootElem->GetWidth(getter_AddRefs(domAnimLength));
+    domAnimLength = rootElem->Width();
   } else {
     NS_ABORT_IF_FALSE(aDimension == eHeight, "invalid dimension");
-    rv = rootElem->GetHeight(getter_AddRefs(domAnimLength));
+    domAnimLength = rootElem->Height();
   }
-  NS_ENSURE_SUCCESS(rv, false);
   NS_ENSURE_TRUE(domAnimLength, false);
 
   // Get the animated value from the object
   nsRefPtr<nsIDOMSVGLength> domLength;
-  rv = domAnimLength->GetAnimVal(getter_AddRefs(domLength));
+  nsresult rv = domAnimLength->GetAnimVal(getter_AddRefs(domLength));
   NS_ENSURE_SUCCESS(rv, false);
   NS_ENSURE_TRUE(domLength, false);
 
   // Check if it's a percent value (and fail if so)
   uint16_t unitType;
   rv = domLength->GetUnitType(&unitType);
   NS_ENSURE_SUCCESS(rv, false);
   if (unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
@@ -196,21 +195,17 @@ SVGDocumentWrapper::StopAnimation()
 
 void
 SVGDocumentWrapper::ResetAnimation()
 {
   SVGSVGElement* svgElem = GetRootSVGElem();
   if (!svgElem)
     return;
 
-#ifdef DEBUG
-  nsresult rv =
-#endif
-    svgElem->SetCurrentTime(0.0f);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "SetCurrentTime failed");
+  svgElem->SetCurrentTime(0.0f);
 }
 
 
 /** nsIStreamListener methods **/
 
 /* void onDataAvailable (in nsIRequest request, in nsISupports ctxt,
                          in nsIInputStream inStr, in unsigned long sourceOffset,
                          in unsigned long count); */