Bug 833446: Remove nsIDOMSVGMarkerElement r=peterv
authorDavid Zbarsky <dzbarsky@gmail.com>
Mon, 18 Feb 2013 17:48:54 -0500
changeset 122272 29181e9515ec6502c76e221b81a3bab370dab8e2
parent 122271 85addbf2e26408978968c79fb68bd5cb3a80e2e1
child 122273 e8f8a3f6f1f67c07b9f62dab068ebb97c5f508d0
child 122287 ea99e1b1d574bbd05b5428d5194ceaea506e2caa
push id24327
push usergszorc@mozilla.com
push dateTue, 19 Feb 2013 05:22:32 +0000
treeherdermozilla-central@e8f8a3f6f1f6 [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 nsIDOMSVGMarkerElement r=peterv
content/svg/content/src/SVGMarkerElement.cpp
content/svg/content/src/SVGMarkerElement.h
content/svg/content/src/SVGOrientSMILType.cpp
content/svg/content/src/nsSVGAngle.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/svg/Makefile.in
dom/interfaces/svg/nsIDOMSVGMarkerElement.idl
layout/svg/nsSVGMarkerFrame.cpp
--- a/content/svg/content/src/SVGMarkerElement.cpp
+++ b/content/svg/content/src/SVGMarkerElement.cpp
@@ -10,23 +10,20 @@
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "nsError.h"
 #include "mozilla/dom/SVGAngle.h"
 #include "mozilla/dom/SVGAnimatedAngle.h"
 #include "mozilla/dom/SVGAnimatedLength.h"
 #include "mozilla/dom/SVGMarkerElement.h"
 #include "mozilla/dom/SVGMarkerElementBinding.h"
 #include "gfxMatrix.h"
-#include "nsContentUtils.h" // NS_ENSURE_FINITE
 #include "SVGContentUtils.h"
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Marker)
 
-DOMCI_NODE_DATA(SVGMarkerElement, mozilla::dom::SVGMarkerElement)
-
 namespace mozilla {
 namespace dom {
 
 JSObject*
 SVGMarkerElement::WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap)
 {
   return SVGMarkerElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
 }
@@ -35,26 +32,26 @@ nsSVGElement::LengthInfo SVGMarkerElemen
 {
   { &nsGkAtoms::refX, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
   { &nsGkAtoms::refY, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
   { &nsGkAtoms::markerWidth, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
   { &nsGkAtoms::markerHeight, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
 };
 
 nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
-  {&nsGkAtoms::strokeWidth, nsIDOMSVGMarkerElement::SVG_MARKERUNITS_STROKEWIDTH},
-  {&nsGkAtoms::userSpaceOnUse, nsIDOMSVGMarkerElement::SVG_MARKERUNITS_USERSPACEONUSE},
+  {&nsGkAtoms::strokeWidth, SVG_MARKERUNITS_STROKEWIDTH},
+  {&nsGkAtoms::userSpaceOnUse, SVG_MARKERUNITS_USERSPACEONUSE},
   {nullptr, 0}
 };
 
 nsSVGElement::EnumInfo SVGMarkerElement::sEnumInfo[1] =
 {
   { &nsGkAtoms::markerUnits,
     sUnitsMap,
-    nsIDOMSVGMarkerElement::SVG_MARKERUNITS_STROKEWIDTH
+    SVG_MARKERUNITS_STROKEWIDTH
   }
 };
 
 nsSVGElement::AngleInfo SVGMarkerElement::sAngleInfo[1] =
 {
   { &nsGkAtoms::orient, 0, SVG_ANGLETYPE_UNSPECIFIED }
 };
 
@@ -67,39 +64,32 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGOri
 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGOrientType::DOMAnimatedEnum)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGOrientType::DOMAnimatedEnum)
   NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedEnumeration)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_ADDREF_INHERITED(SVGMarkerElement,SVGMarkerElementBase)
-NS_IMPL_RELEASE_INHERITED(SVGMarkerElement,SVGMarkerElementBase)
-
-NS_INTERFACE_TABLE_HEAD(SVGMarkerElement)
-  NS_NODE_INTERFACE_TABLE4(SVGMarkerElement, nsIDOMNode, nsIDOMElement,
-                           nsIDOMSVGElement,
-                           nsIDOMSVGMarkerElement)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGMarkerElement)
-NS_INTERFACE_MAP_END_INHERITING(SVGMarkerElementBase)
+NS_IMPL_ISUPPORTS_INHERITED3(SVGMarkerElement, SVGMarkerElementBase,
+                             nsIDOMNode, nsIDOMElement,
+                             nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 nsresult
 nsSVGOrientType::SetBaseValue(uint16_t aValue,
                               nsSVGElement *aSVGElement)
 {
-  if (aValue == nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_AUTO ||
-      aValue == nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE) {
+  if (aValue == SVG_MARKER_ORIENT_AUTO || aValue == SVG_MARKER_ORIENT_ANGLE) {
     SetBaseValue(aValue);
     aSVGElement->SetAttr(
       kNameSpaceID_None, nsGkAtoms::orient, nullptr,
-      (aValue ==nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_AUTO ?
+      (aValue == SVG_MARKER_ORIENT_AUTO ?
         NS_LITERAL_STRING("auto") : NS_LITERAL_STRING("0")),
       true);
     return NS_OK;
   }
   return NS_ERROR_DOM_SYNTAX_ERR;
 }
 
 already_AddRefed<nsIDOMSVGAnimatedEnumeration>
@@ -135,127 +125,63 @@ already_AddRefed<DOMSVGAnimatedPreserveA
 SVGMarkerElement::PreserveAspectRatio()
 {
   nsRefPtr<DOMSVGAnimatedPreserveAspectRatio> ratio;
   mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(getter_AddRefs(ratio), this);
   return ratio.forget();
 }
 
 //----------------------------------------------------------------------
-// nsIDOMSVGMarkerElement methods
-
-/* readonly attribute nsIDOMSVGAnimatedLength refX; */
-NS_IMETHODIMP SVGMarkerElement::GetRefX(nsIDOMSVGAnimatedLength * *aRefX)
-{
-  *aRefX = RefX().get();
-  return NS_OK;
-}
 
 already_AddRefed<SVGAnimatedLength>
 SVGMarkerElement::RefX()
 {
   return mLengthAttributes[REFX].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength refY; */
-NS_IMETHODIMP SVGMarkerElement::GetRefY(nsIDOMSVGAnimatedLength * *aRefY)
-{
-  *aRefY = RefY().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGMarkerElement::RefY()
 {
   return mLengthAttributes[REFY].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedEnumeration markerUnits; */
-NS_IMETHODIMP SVGMarkerElement::GetMarkerUnits(nsIDOMSVGAnimatedEnumeration * *aMarkerUnits)
-{
-  *aMarkerUnits = MarkerUnits().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsIDOMSVGAnimatedEnumeration>
 SVGMarkerElement::MarkerUnits()
 {
   return mEnumAttributes[MARKERUNITS].ToDOMAnimatedEnum(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength markerWidth; */
-NS_IMETHODIMP SVGMarkerElement::GetMarkerWidth(nsIDOMSVGAnimatedLength * *aMarkerWidth)
-{
-  *aMarkerWidth = MarkerWidth().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGMarkerElement::MarkerWidth()
 {
   return mLengthAttributes[MARKERWIDTH].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength markerHeight; */
-NS_IMETHODIMP SVGMarkerElement::GetMarkerHeight(nsIDOMSVGAnimatedLength * *aMarkerHeight)
-{
-  *aMarkerHeight = MarkerHeight().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGMarkerElement::MarkerHeight()
 {
   return mLengthAttributes[MARKERHEIGHT].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedEnumeration orientType; */
-NS_IMETHODIMP SVGMarkerElement::GetOrientType(nsIDOMSVGAnimatedEnumeration * *aOrientType)
-{
-  *aOrientType = OrientType().get();
-  return NS_OK;
-}
-
 already_AddRefed<nsIDOMSVGAnimatedEnumeration>
 SVGMarkerElement::OrientType()
 {
   return mOrientType.ToDOMAnimatedEnum(this);
 }
 
-/* readonly attribute SVGAnimatedAngle orientAngle; */
-NS_IMETHODIMP SVGMarkerElement::GetOrientAngle(nsISupports * *aOrientAngle)
-{
-  *aOrientAngle = OrientAngle().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedAngle>
 SVGMarkerElement::OrientAngle()
 {
   return mAngleAttributes[ORIENT].ToDOMAnimatedAngle(this);
 }
 
-/* void setOrientToAuto (); */
-NS_IMETHODIMP SVGMarkerElement::SetOrientToAuto()
+void SVGMarkerElement::SetOrientToAuto()
 {
   SetAttr(kNameSpaceID_None, nsGkAtoms::orient, nullptr,
           NS_LITERAL_STRING("auto"), true);
-  return NS_OK;
-}
-
-/* void setOrientToAngle (in SVGAngle angle); */
-NS_IMETHODIMP SVGMarkerElement::SetOrientToAngle(nsISupports *aAngle)
-{
-  nsCOMPtr<dom::SVGAngle> angle = do_QueryInterface(aAngle);
-  if (!angle)
-    return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR;
-
-  ErrorResult rv;
-  SetOrientToAngle(*angle, rv);
-  return rv.ErrorCode();
 }
 
 void
 SVGMarkerElement::SetOrientToAngle(SVGAngle& angle, ErrorResult& rv)
 {
   float f = angle.Value();
   if (!NS_finite(f)) {
     rv.Throw(NS_ERROR_DOM_SVG_WRONG_TYPE_ERR);
--- a/content/svg/content/src/SVGMarkerElement.h
+++ b/content/svg/content/src/SVGMarkerElement.h
@@ -2,39 +2,48 @@
 /* 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_SVGMarkerElement_h
 #define mozilla_dom_SVGMarkerElement_h
 
 #include "gfxMatrix.h"
-#include "nsIDOMSVGMarkerElement.h"
 #include "nsSVGAngle.h"
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "nsSVGElement.h"
 #include "mozilla/Attributes.h"
 
 class nsSVGMarkerFrame;
 
 nsresult NS_NewSVGMarkerElement(nsIContent **aResult,
                                 already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
+// Marker Unit Types
+static const unsigned short SVG_MARKERUNITS_UNKNOWN         = 0;
+static const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
+static const unsigned short SVG_MARKERUNITS_STROKEWIDTH    = 2;
+
+// Marker Orientation Types
+static const unsigned short SVG_MARKER_ORIENT_UNKNOWN      = 0;
+static const unsigned short SVG_MARKER_ORIENT_AUTO         = 1;
+static const unsigned short SVG_MARKER_ORIENT_ANGLE        = 2;
+
 class nsSVGOrientType
 {
 public:
   nsSVGOrientType()
-   : mAnimVal(nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE),
-     mBaseVal(nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE) {}
+   : mAnimVal(SVG_MARKER_ORIENT_ANGLE),
+     mBaseVal(SVG_MARKER_ORIENT_ANGLE) {}
 
   nsresult SetBaseValue(uint16_t aValue,
                         nsSVGElement *aSVGElement);
 
   // XXX FIXME like https://bugzilla.mozilla.org/show_bug.cgi?id=545550 but
   // without adding an mIsAnimated member...?
   void SetBaseValue(uint16_t aValue)
     { mAnimVal = mBaseVal = uint8_t(aValue); }
@@ -73,31 +82,30 @@ private:
     NS_IMETHOD GetAnimVal(uint16_t* aResult)
       { *aResult = mVal->GetAnimValue(); return NS_OK; }
   };
 };
 
 typedef nsSVGElement SVGMarkerElementBase;
 
 class SVGMarkerElement : public SVGMarkerElementBase,
-                         public nsIDOMSVGMarkerElement
+                         public nsIDOMSVGElement
 {
   friend class ::nsSVGMarkerFrame;
 
 protected:
   friend nsresult (::NS_NewSVGMarkerElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGMarkerElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope, bool *triedToWrap) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSIDOMSVGMARKERELEMENT
 
   // xxx I wish we could use virtual inheritance
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
   NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
@@ -113,31 +121,29 @@ public:
                                float aX, float aY, float aAutoAngle);
   nsSVGViewBoxRect GetViewBoxRect();
   gfxMatrix GetViewBoxTransform();
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   nsSVGOrientType* GetOrientType() { return &mOrientType; }
 
-  virtual nsXPCClassInfo* GetClassInfo();
-
   virtual nsIDOMNode* AsDOMNode() { return this; }
 
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
   already_AddRefed<SVGAnimatedLength> RefX();
   already_AddRefed<SVGAnimatedLength> RefY();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> MarkerUnits();
   already_AddRefed<SVGAnimatedLength> MarkerWidth();
   already_AddRefed<SVGAnimatedLength> MarkerHeight();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> OrientType();
   already_AddRefed<SVGAnimatedAngle> OrientAngle();
-  // We can use the XPIDL SetOrientToAuto
+  void SetOrientToAuto();
   void SetOrientToAngle(SVGAngle& angle, ErrorResult& rv);
 
 protected:
 
   virtual bool ParseAttribute(int32_t aNameSpaceID, nsIAtom* aName,
                                 const nsAString& aValue,
                                 nsAttrValue& aResult);
 
--- a/content/svg/content/src/SVGOrientSMILType.cpp
+++ b/content/svg/content/src/SVGOrientSMILType.cpp
@@ -2,32 +2,32 @@
 /* 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 "SVGOrientSMILType.h"
 #include "nsSMILValue.h"
 #include "nsSVGViewBox.h"
 #include "nsSVGAngle.h"
-#include "nsIDOMSVGMarkerElement.h"
 #include "nsDebug.h"
+#include "mozilla/dom/SVGMarkerElement.h"
 #include <math.h>
 
 namespace mozilla {
 
 /*static*/ SVGOrientSMILType SVGOrientSMILType::sSingleton;
 
 void
 SVGOrientSMILType::Init(nsSMILValue& aValue) const
 {
   NS_ABORT_IF_FALSE(aValue.IsNull(), "Unexpected value type");
 
   aValue.mU.mOrient.mAngle = 0.0f;
   aValue.mU.mOrient.mUnit = SVG_ANGLETYPE_UNSPECIFIED;
-  aValue.mU.mOrient.mOrientType = nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE;
+  aValue.mU.mOrient.mOrientType = dom::SVG_MARKER_ORIENT_ANGLE;
   aValue.mType = this;
 }
 
 void
 SVGOrientSMILType::Destroy(nsSMILValue& aValue) const
 {
   NS_PRECONDITION(aValue.mType == this, "Unexpected SMIL value.");
   aValue.mU.mPtr = nullptr;
@@ -62,18 +62,18 @@ SVGOrientSMILType::IsEqual(const nsSMILV
 nsresult
 SVGOrientSMILType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
                        uint32_t aCount) const
 {
   NS_PRECONDITION(aValueToAdd.mType == aDest.mType,
                   "Trying to add invalid types");
   NS_PRECONDITION(aValueToAdd.mType == this, "Unexpected source type");
 
-  if (aDest.mU.mOrient.mOrientType != nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE ||
-      aValueToAdd.mU.mOrient.mOrientType != nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE) {
+  if (aDest.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE ||
+      aValueToAdd.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE) {
     // TODO: it would be nice to be able to add to auto angles
     return NS_ERROR_FAILURE;
   }
 
   // We may be dealing with two different angle units, so we normalize to
   // degrees for the add:
   float currentAngle = aDest.mU.mOrient.mAngle *
                        nsSVGAngle::GetDegreesPerUnit(aDest.mU.mOrient.mUnit);
@@ -93,18 +93,18 @@ SVGOrientSMILType::Add(nsSMILValue& aDes
 nsresult
 SVGOrientSMILType::ComputeDistance(const nsSMILValue& aFrom,
                                    const nsSMILValue& aTo,
                                    double& aDistance) const
 {
   NS_PRECONDITION(aFrom.mType == aTo.mType,"Trying to compare different types");
   NS_PRECONDITION(aFrom.mType == this, "Unexpected source type");
 
-  if (aFrom.mU.mOrient.mOrientType != nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE ||
-      aTo.mU.mOrient.mOrientType != nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE) {
+  if (aFrom.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE ||
+      aTo.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE) {
     // TODO: it would be nice to be able to compute distance with auto angles
     return NS_ERROR_FAILURE;
   }
 
   // Normalize both to degrees in case they're different angle units:
   double from = aFrom.mU.mOrient.mAngle *
                   nsSVGAngle::GetDegreesPerUnit(aFrom.mU.mOrient.mUnit);
   double to   = aTo.mU.mOrient.mAngle *
@@ -122,18 +122,18 @@ SVGOrientSMILType::Interpolate(const nsS
                                nsSMILValue& aResult) const
 {
   NS_PRECONDITION(aStartVal.mType == aEndVal.mType,
                   "Trying to interpolate different types");
   NS_PRECONDITION(aStartVal.mType == this,
                   "Unexpected types for interpolation.");
   NS_PRECONDITION(aResult.mType   == this, "Unexpected result type.");
 
-  if (aStartVal.mU.mOrient.mOrientType != nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE ||
-      aEndVal.mU.mOrient.mOrientType != nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE) {
+  if (aStartVal.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE ||
+      aEndVal.mU.mOrient.mOrientType != dom::SVG_MARKER_ORIENT_ANGLE) {
     // TODO: it would be nice to be able to handle auto angles too.
     return NS_ERROR_FAILURE;
   }
 
   float start  = aStartVal.mU.mOrient.mAngle *
                    nsSVGAngle::GetDegreesPerUnit(aStartVal.mU.mOrient.mUnit);
   float end    = aEndVal.mU.mOrient.mAngle *
                    nsSVGAngle::GetDegreesPerUnit(aEndVal.mU.mOrient.mUnit);
--- a/content/svg/content/src/nsSVGAngle.cpp
+++ b/content/svg/content/src/nsSVGAngle.cpp
@@ -374,27 +374,27 @@ nsSVGAngle::ToSMILAttr(nsSVGElement *aSV
 nsresult
 nsSVGAngle::SMILOrient::ValueFromString(const nsAString& aStr,
                                         const nsISMILAnimationElement* /*aSrcElement*/,
                                         nsSMILValue& aValue,
                                         bool& aPreventCachingOfSandwich) const
 {
   nsSMILValue val(&SVGOrientSMILType::sSingleton);
   if (aStr.EqualsLiteral("auto")) {
-    val.mU.mOrient.mOrientType = nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_AUTO;
+    val.mU.mOrient.mOrientType = SVG_MARKER_ORIENT_AUTO;
   } else {
     float value;
     uint16_t unitType;
     nsresult rv = GetValueFromString(aStr, &value, &unitType);
     if (NS_FAILED(rv)) {
       return rv;
     }
     val.mU.mOrient.mAngle = value;
     val.mU.mOrient.mUnit = unitType;
-    val.mU.mOrient.mOrientType = nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE;
+    val.mU.mOrient.mOrientType = SVG_MARKER_ORIENT_ANGLE;
   }
   aValue.Swap(val);
   aPreventCachingOfSandwich = false;
 
   return NS_OK;
 }
 
 nsSMILValue
@@ -422,16 +422,16 @@ nsSVGAngle::SMILOrient::ClearAnimValue()
 nsresult
 nsSVGAngle::SMILOrient::SetAnimValue(const nsSMILValue& aValue)
 {
   NS_ASSERTION(aValue.mType == &SVGOrientSMILType::sSingleton,
                "Unexpected type to assign animated value");
 
   if (aValue.mType == &SVGOrientSMILType::sSingleton) {
     mOrientType->SetAnimValue(aValue.mU.mOrient.mOrientType);
-    if (aValue.mU.mOrient.mOrientType == nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_AUTO) {
+    if (aValue.mU.mOrient.mOrientType == SVG_MARKER_ORIENT_AUTO) {
       mAngle->SetAnimValue(0.0f, SVG_ANGLETYPE_UNSPECIFIED, mSVGElement);
     } else {
       mAngle->SetAnimValue(aValue.mU.mOrient.mAngle, aValue.mU.mOrient.mUnit, mSVGElement);
     }
   }
   return NS_OK;
 }
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -316,17 +316,16 @@
 #include "nsIDOMSVGAnimatedRect.h"
 #include "nsIDOMSVGAnimatedString.h"
 #include "nsIDOMTimeEvent.h"
 #include "nsIDOMSVGDocument.h"
 #include "nsIDOMSVGElement.h"
 #include "nsIDOMSVGEvent.h"
 #include "nsIDOMSVGFilters.h"
 #include "nsIDOMSVGLength.h"
-#include "nsIDOMSVGMarkerElement.h"
 #include "nsIDOMSVGNumber.h"
 #include "nsIDOMSVGRect.h"
 #include "nsIDOMSVGURIReference.h"
 #include "nsIDOMSVGZoomEvent.h"
 
 #include "nsIImageDocument.h"
 
 // Storage includes
@@ -1061,18 +1060,16 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(SVGFESpecularLightingElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGFESpotLightElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGFETileElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGFETurbulenceElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(SVGMarkerElement, nsElementSH,
-                           ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA_WITH_NAME(SVGUnknownElement, SVGElement, nsElementSH,
                                      ELEMENT_SCRIPTABLE_FLAGS)
 
   // other SVG classes
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedEnumeration, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGAnimatedInteger, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
@@ -2984,21 +2981,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGFETurbulenceElement, nsIDOMSVGFETurbulenceElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFETurbulenceElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFilterPrimitiveStandardAttributes)
     DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(SVGMarkerElement, nsIDOMSVGMarkerElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMarkerElement)
-    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(SVGUnknownElement, nsIDOMSVGElement)
     DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   // other SVG classes
   DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedEnumeration, nsIDOMSVGAnimatedEnumeration)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
   DOM_CLASSINFO_MAP_END
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -213,17 +213,16 @@ DOMCI_CLASS(SVGFEMergeElement)
 DOMCI_CLASS(SVGFEMergeNodeElement)
 DOMCI_CLASS(SVGFEMorphologyElement)
 DOMCI_CLASS(SVGFEOffsetElement)
 DOMCI_CLASS(SVGFEPointLightElement)
 DOMCI_CLASS(SVGFESpecularLightingElement)
 DOMCI_CLASS(SVGFESpotLightElement)
 DOMCI_CLASS(SVGFETileElement)
 DOMCI_CLASS(SVGFETurbulenceElement)
-DOMCI_CLASS(SVGMarkerElement)
 DOMCI_CLASS(SVGUnknownElement)
 
 // other SVG classes
 DOMCI_CLASS(SVGAnimatedEnumeration)
 DOMCI_CLASS(SVGAnimatedInteger)
 DOMCI_CLASS(SVGAnimatedLength)
 DOMCI_CLASS(SVGAnimatedNumber)
 DOMCI_CLASS(SVGAnimatedRect)
--- a/dom/interfaces/svg/Makefile.in
+++ b/dom/interfaces/svg/Makefile.in
@@ -23,17 +23,16 @@ XPIDLSRCS	= \
 		nsIDOMSVGAnimatedNumber.idl \
 		nsIDOMSVGAnimatedRect.idl \
 		nsIDOMSVGAnimatedString.idl \
 		nsIDOMSVGDocument.idl \
 		nsIDOMSVGElement.idl \
 		nsIDOMSVGEvent.idl \
 		nsIDOMSVGFilters.idl \
 		nsIDOMSVGLength.idl \
-		nsIDOMSVGMarkerElement.idl \
 		nsIDOMSVGNumber.idl \
 		nsIDOMSVGRect.idl \
 		nsIDOMSVGStringList.idl \
 		nsIDOMSVGURIReference.idl \
 		nsIDOMSVGUnitTypes.idl \
 		nsIDOMSVGZoomEvent.idl \
 		$(NULL)
 
deleted file mode 100644
--- a/dom/interfaces/svg/nsIDOMSVGMarkerElement.idl
+++ /dev/null
@@ -1,56 +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 "nsIDOMSVGElement.idl"
-
-interface nsIDOMSVGAnimatedLength;
-interface nsIDOMSVGAnimatedEnumeration;
-interface nsIDOMSVGAnimatedRect;
-
-/**
- * The nsIDOMSVGMarker interface is the interface to an SVG marker element.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/SVG11/painting.html#InterfaceSVGMarkerElement
- *
- */
-
-[scriptable, uuid(0258F664-8251-4075-A0F5-F3D2170A913A)]
-interface nsIDOMSVGMarkerElement
-  : 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.)
-
-    nsIDOMSVGLangSpace,
-    nsIDOMSVGExternalResourcesRequired,
-    nsIDOMSVGStylable,
-    nsIDOMSVGFitToViewBox
-*/
-{
-  // Marker Unit Types
-  const unsigned short SVG_MARKERUNITS_UNKNOWN         = 0;
-  const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
-  const unsigned short SVG_MARKERUNITS_STROKEWIDTH    = 2;
-  // Marker Orientation Types
-  const unsigned short SVG_MARKER_ORIENT_UNKNOWN      = 0;
-  const unsigned short SVG_MARKER_ORIENT_AUTO         = 1;
-  const unsigned short SVG_MARKER_ORIENT_ANGLE        = 2;
-
-  readonly attribute nsIDOMSVGAnimatedLength      refX;
-  readonly attribute nsIDOMSVGAnimatedLength      refY;
-  readonly attribute nsIDOMSVGAnimatedEnumeration markerUnits;
-  readonly attribute nsIDOMSVGAnimatedLength      markerWidth;
-  readonly attribute nsIDOMSVGAnimatedLength      markerHeight;
-  readonly attribute nsIDOMSVGAnimatedEnumeration orientType;
-  readonly attribute nsISupports                  orientAngle;
-
-  void setOrientToAuto ( );
-  void setOrientToAngle ( in nsISupports angle );
-};
--- a/layout/svg/nsSVGMarkerFrame.cpp
+++ b/layout/svg/nsSVGMarkerFrame.cpp
@@ -49,18 +49,17 @@ nsSVGMarkerFrame::AttributeChanged(int32
 }
 
 #ifdef DEBUG
 NS_IMETHODIMP
 nsSVGMarkerFrame::Init(nsIContent* aContent,
                        nsIFrame* aParent,
                        nsIFrame* aPrevInFlow)
 {
-  nsCOMPtr<nsIDOMSVGMarkerElement> marker = do_QueryInterface(aContent);
-  NS_ASSERTION(marker, "Content is not an SVG marker");
+  NS_ASSERTION(aContent->IsSVG(nsGkAtoms::marker), "Content is not an SVG marker");
 
   return nsSVGMarkerFrameBase::Init(aContent, aParent, aPrevInFlow);
 }
 #endif /* DEBUG */
 
 nsIAtom *
 nsSVGMarkerFrame::GetType() const
 {