Bug 1239100 - Implement SVGGeometryElement interface. r=cam r=peterv
☠☠ backed out by dd45619670c7 ☠ ☠
authorRobert Longson <longsonr@gmail.com>
Sun, 18 Dec 2016 09:54:02 +0000
changeset 450795 0b44e8715bf5e9a799df69847ea9b57637cd7131
parent 450794 ad85a32325fb0867bd384965285bc71d92c38984
child 450796 dd45619670c7fbf5c5b2ce09e33cc4f28a65db5c
push id38944
push userbmo:leftysolara@gmail.com
push dateSun, 18 Dec 2016 16:01:15 +0000
reviewerscam, peterv
bugs1239100
milestone53.0a1
Bug 1239100 - Implement SVGGeometryElement interface. r=cam r=peterv
accessible/base/nsAccessibilityService.cpp
dom/base/nsGkAtomList.h
dom/svg/SVGCircleElement.cpp
dom/svg/SVGCircleElement.h
dom/svg/SVGEllipseElement.cpp
dom/svg/SVGEllipseElement.h
dom/svg/SVGGeometryElement.cpp
dom/svg/SVGGeometryElement.h
dom/svg/SVGImageElement.cpp
dom/svg/SVGImageElement.h
dom/svg/SVGLineElement.cpp
dom/svg/SVGLineElement.h
dom/svg/SVGPathData.cpp
dom/svg/SVGPathElement.cpp
dom/svg/SVGPathElement.h
dom/svg/SVGPolyElement.cpp
dom/svg/SVGPolyElement.h
dom/svg/SVGPolygonElement.cpp
dom/svg/SVGPolygonElement.h
dom/svg/SVGPolylineElement.cpp
dom/svg/SVGPolylineElement.h
dom/svg/SVGRectElement.cpp
dom/svg/SVGRectElement.h
dom/svg/moz.build
dom/svg/nsSVGElement.cpp
dom/svg/nsSVGPathGeometryElement.cpp
dom/svg/nsSVGPathGeometryElement.h
dom/svg/nsSVGPolyElement.cpp
dom/svg/nsSVGPolyElement.h
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/SVGPathElement.webidl
dom/webidl/moz.build
layout/base/nsCSSFrameConstructor.cpp
layout/generic/nsFrameIdList.h
layout/painting/nsDisplayItemTypesList.h
layout/style/nsStyleStruct.cpp
layout/svg/SVGGeometryFrame.cpp
layout/svg/SVGGeometryFrame.h
layout/svg/moz.build
layout/svg/nsSVGClipPathFrame.cpp
layout/svg/nsSVGEffects.cpp
layout/svg/nsSVGImageFrame.cpp
layout/svg/nsSVGMarkerFrame.cpp
layout/svg/nsSVGMarkerFrame.h
layout/svg/nsSVGPathGeometryFrame.cpp
layout/svg/nsSVGPathGeometryFrame.h
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGPatternFrame.h
layout/svg/nsSVGUtils.cpp
layout/svg/nsSVGUtils.h
testing/web-platform/meta/svg/historical.html.ini
testing/web-platform/meta/svg/interfaces.html.ini
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -56,17 +56,17 @@
 #ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #endif
 
 #include "nsImageFrame.h"
 #include "nsIObserverService.h"
 #include "nsLayoutUtils.h"
 #include "nsPluginFrame.h"
-#include "nsSVGPathGeometryFrame.h"
+#include "SVGGeometryFrame.h"
 #include "nsTreeBodyFrame.h"
 #include "nsTreeColumns.h"
 #include "nsTreeUtils.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsXBLBinding.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/dom/DOMStringList.h"
 #include "mozilla/Preferences.h"
@@ -1168,18 +1168,18 @@ nsAccessibilityService::CreateAccessible
           frameType == nsGkAtoms::scrollFrame) {
         newAcc = new XULTabpanelAccessible(content, document);
       }
     }
   }
 
   if (!newAcc) {
     if (content->IsSVGElement()) {
-      nsSVGPathGeometryFrame* pathGeometryFrame = do_QueryFrame(frame);
-      if (pathGeometryFrame) {
+      SVGGeometryFrame* geometryFrame = do_QueryFrame(frame);
+      if (geometryFrame) {
         // A graphic elements: rect, circle, ellipse, line, path, polygon,
         // polyline and image. A 'use' and 'text' graphic elements require
         // special support.
         newAcc = new EnumRoleAccessible<roles::GRAPHIC>(content, document);
       } else if (content->IsSVGElement(nsGkAtoms::svg)) {
         newAcc = new EnumRoleAccessible<roles::DIAGRAM>(content, document);
       }
 
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -2046,27 +2046,27 @@ GK_ATOM(svgClipPathFrame, "SVGClipPathFr
 GK_ATOM(svgDefsFrame, "SVGDefsFrame")
 GK_ATOM(svgFEContainerFrame, "SVGFEContainerFrame")
 GK_ATOM(svgFEImageFrame, "SVGFEImageFrame")
 GK_ATOM(svgFELeafFrame, "SVGFELeafFrame")
 GK_ATOM(svgFEUnstyledLeafFrame, "SVGFEUnstyledLeafFrame")
 GK_ATOM(svgFilterFrame, "SVGFilterFrame")
 GK_ATOM(svgForeignObjectFrame, "SVGForeignObjectFrame")
 GK_ATOM(svgGenericContainerFrame, "SVGGenericContainerFrame")
+GK_ATOM(svgGeometryFrame, "SVGGeometryFrame")
 GK_ATOM(svgGFrame, "SVGGFrame")
 GK_ATOM(svgGradientFrame, "SVGGradientFrame")
 GK_ATOM(svgImageFrame, "SVGImageFrame")
 GK_ATOM(svgInnerSVGFrame, "SVGInnerSVGFrame")
 GK_ATOM(svgLinearGradientFrame, "SVGLinearGradientFrame")
 GK_ATOM(svgMarkerFrame, "SVGMarkerFrame")
 GK_ATOM(svgMarkerAnonChildFrame, "SVGMarkerAnonChildFrame")
 GK_ATOM(svgMaskFrame, "SVGMaskFrame")
 GK_ATOM(svgOuterSVGFrame, "SVGOuterSVGFrame")
 GK_ATOM(svgOuterSVGAnonChildFrame, "SVGOuterSVGAnonChildFrame")
-GK_ATOM(svgPathGeometryFrame, "SVGPathGeometryFrame")
 GK_ATOM(svgPatternFrame, "SVGPatternFrame")
 GK_ATOM(svgRadialGradientFrame, "SVGRadialGradientFrame")
 GK_ATOM(svgStopFrame, "SVGStopFrame")
 GK_ATOM(svgSwitchFrame, "SVGSwitchFrame")
 GK_ATOM(svgTextFrame, "SVGTextFrame")
 GK_ATOM(svgUseFrame, "SVGUseFrame")
 GK_ATOM(svgViewFrame, "SVGViewFrame")
 GK_ATOM(HTMLVideoFrame, "VideoFrame")
--- a/dom/svg/SVGCircleElement.cpp
+++ b/dom/svg/SVGCircleElement.cpp
@@ -75,17 +75,17 @@ SVGCircleElement::HasValidDimensions() c
 nsSVGElement::LengthAttributesInfo
 SVGCircleElement::GetLengthInfo()
 {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 bool
 SVGCircleElement::GetGeometryBounds(Rect* aBounds,
                                     const StrokeOptions& aStrokeOptions,
                                     const Matrix& aToBoundsSpace,
                                     const Matrix* aToNonScalingStrokeSpace)
 {
   float x, y, r;
--- a/dom/svg/SVGCircleElement.h
+++ b/dom/svg/SVGCircleElement.h
@@ -2,40 +2,40 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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_SVGCircleElement_h
 #define mozilla_dom_SVGCircleElement_h
 
-#include "nsSVGPathGeometryElement.h"
+#include "SVGGeometryElement.h"
 #include "nsSVGLength2.h"
 
 nsresult NS_NewSVGCircleElement(nsIContent **aResult,
                                 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGPathGeometryElement SVGCircleElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGGeometryElement SVGCircleElementBase;
+
 class SVGCircleElement final : public SVGCircleElementBase
 {
 protected:
   explicit SVGCircleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
   friend nsresult (::NS_NewSVGCircleElement(nsIContent **aResult,
                                             already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
 
 public:
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
                                  const Matrix& aToBoundsSpace,
                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
 
   // WebIDL
--- a/dom/svg/SVGEllipseElement.cpp
+++ b/dom/svg/SVGEllipseElement.cpp
@@ -86,17 +86,17 @@ SVGEllipseElement::HasValidDimensions() 
 nsSVGElement::LengthAttributesInfo
 SVGEllipseElement::GetLengthInfo()
 {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 bool
 SVGEllipseElement::GetGeometryBounds(Rect* aBounds,
                                      const StrokeOptions& aStrokeOptions,
                                      const Matrix& aToBoundsSpace,
                                      const Matrix* aToNonScalingStrokeSpace)
 {
   float x, y, rx, ry;
--- a/dom/svg/SVGEllipseElement.h
+++ b/dom/svg/SVGEllipseElement.h
@@ -2,40 +2,40 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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_SVGEllipseElement_h
 #define mozilla_dom_SVGEllipseElement_h
 
-#include "nsSVGPathGeometryElement.h"
+#include "SVGGeometryElement.h"
 #include "nsSVGLength2.h"
 
 nsresult NS_NewSVGEllipseElement(nsIContent **aResult,
                                  already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-typedef nsSVGPathGeometryElement SVGEllipseElementBase;
+typedef SVGGeometryElement SVGEllipseElementBase;
 
 class SVGEllipseElement final : public SVGEllipseElementBase
 {
 protected:
   explicit SVGEllipseElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
   friend nsresult (::NS_NewSVGEllipseElement(nsIContent **aResult,
                                              already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
 
 public:
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
                                  const Matrix& aToBoundsSpace,
                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
 
   // WebIDL
rename from dom/svg/nsSVGPathGeometryElement.cpp
rename to dom/svg/SVGGeometryElement.cpp
--- a/dom/svg/nsSVGPathGeometryElement.cpp
+++ b/dom/svg/SVGGeometryElement.cpp
@@ -1,88 +1,102 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "nsSVGPathGeometryElement.h"
+#include "SVGGeometryElement.h"
 
+#include "DOMSVGPoint.h"
 #include "gfxPlatform.h"
 #include "mozilla/gfx/2D.h"
 #include "nsComputedDOMStyle.h"
 #include "nsSVGUtils.h"
 #include "nsSVGLength2.h"
 #include "SVGContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
+nsSVGElement::NumberInfo SVGGeometryElement::sNumberInfo =
+{ &nsGkAtoms::pathLength, 0, false };
+
 //----------------------------------------------------------------------
 // Implementation
 
-nsSVGPathGeometryElement::nsSVGPathGeometryElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
-  : nsSVGPathGeometryElementBase(aNodeInfo)
+SVGGeometryElement::SVGGeometryElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+  : SVGGeometryElementBase(aNodeInfo)
 {
 }
 
+nsSVGElement::NumberAttributesInfo
+SVGGeometryElement::GetNumberInfo()
+{
+  return NumberAttributesInfo(&mPathLength, &sNumberInfo, 1);
+}
+
 nsresult
-nsSVGPathGeometryElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
-                                       const nsAttrValue* aValue, bool aNotify)
+SVGGeometryElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
+                                 const nsAttrValue* aValue, bool aNotify)
 {
   if (mCachedPath &&
       aNamespaceID == kNameSpaceID_None &&
       AttributeDefinesGeometry(aName)) {
     mCachedPath = nullptr;
   }
-  return nsSVGPathGeometryElementBase::AfterSetAttr(aNamespaceID, aName,
-                                                    aValue, aNotify);
+  return SVGGeometryElementBase::AfterSetAttr(aNamespaceID, aName,
+                                              aValue, aNotify);
 }
 
 bool
-nsSVGPathGeometryElement::AttributeDefinesGeometry(const nsIAtom *aName)
+SVGGeometryElement::AttributeDefinesGeometry(const nsIAtom *aName)
 {
+  if (aName == nsGkAtoms::pathLength) {
+    return true;
+  }
+
   // Check for nsSVGLength2 attribute
   LengthAttributesInfo info = GetLengthInfo();
   for (uint32_t i = 0; i < info.mLengthCount; i++) {
     if (aName == *info.mLengthInfo[i].mName) {
       return true;
     }
   }
 
   return false;
 }
 
 bool
-nsSVGPathGeometryElement::GeometryDependsOnCoordCtx()
+SVGGeometryElement::GeometryDependsOnCoordCtx()
 {
   // Check the nsSVGLength2 attribute
-  LengthAttributesInfo info = const_cast<nsSVGPathGeometryElement*>(this)->GetLengthInfo();
+  LengthAttributesInfo info = const_cast<SVGGeometryElement*>(this)->GetLengthInfo();
   for (uint32_t i = 0; i < info.mLengthCount; i++) {
     if (info.mLengths[i].GetSpecifiedUnitType() == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
       return true;
     }   
   }
   return false;
 }
 
 bool
-nsSVGPathGeometryElement::IsMarkable()
+SVGGeometryElement::IsMarkable()
 {
   return false;
 }
 
 void
-nsSVGPathGeometryElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
+SVGGeometryElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
 {
 }
 
 already_AddRefed<Path>
-nsSVGPathGeometryElement::GetOrBuildPath(const DrawTarget& aDrawTarget,
-                                         FillRule aFillRule)
+SVGGeometryElement::GetOrBuildPath(const DrawTarget& aDrawTarget,
+                                   FillRule aFillRule)
 {
   // We only cache the path if it matches the backend used for screen painting:
   bool cacheable  = aDrawTarget.GetBackendType() ==
                     gfxPlatform::GetPlatform()->GetDefaultContentBackend();
 
   // Checking for and returning mCachedPath before checking the pref means
   // that the pref is only live on page reload (or app restart for SVG in
   // chrome). The benefit is that we avoid causing a CPU memory cache miss by
@@ -97,23 +111,23 @@ nsSVGPathGeometryElement::GetOrBuildPath
   RefPtr<Path> path = BuildPath(builder);
   if (cacheable && NS_SVGPathCachingEnabled()) {
     mCachedPath = path;
   }
   return path.forget();
 }
 
 already_AddRefed<Path>
-nsSVGPathGeometryElement::GetOrBuildPathForMeasuring()
+SVGGeometryElement::GetOrBuildPathForMeasuring()
 {
   return nullptr;
 }
 
 FillRule
-nsSVGPathGeometryElement::GetFillRule()
+SVGGeometryElement::GetFillRule()
 {
   FillRule fillRule = FillRule::FILL_WINDING; // Equivalent to StyleFillRule::Nonzero
 
   RefPtr<nsStyleContext> styleContext =
     nsComputedDOMStyle::GetStyleContextForElementNoFlush(this, nullptr,
                                                          nullptr);
   
   if (styleContext) {
@@ -125,8 +139,47 @@ nsSVGPathGeometryElement::GetFillRule()
     }
   } else {
     // ReportToConsole
     NS_WARNING("Couldn't get style context for content in GetFillRule");
   }
 
   return fillRule;
 }
+
+float
+SVGGeometryElement::GetTotalLength()
+{
+  RefPtr<Path> flat = GetOrBuildPathForMeasuring();
+  return flat ? flat->ComputeLength() : 0.f;
+}
+
+already_AddRefed<nsISVGPoint>
+SVGGeometryElement::GetPointAtLength(float distance, ErrorResult& rv)
+{
+  RefPtr<Path> path = GetOrBuildPathForMeasuring();
+  if (!path) {
+    rv.Throw(NS_ERROR_FAILURE);
+    return nullptr;
+  }
+
+  float totalLength = path->ComputeLength();
+  if (mPathLength.IsExplicitlySet()) {
+    float pathLength = mPathLength.GetAnimValue();
+    if (pathLength <= 0) {
+      rv.Throw(NS_ERROR_FAILURE);
+      return nullptr;
+    }
+    distance *= totalLength / pathLength;
+  }
+  distance = std::max(0.f,         distance);
+  distance = std::min(totalLength, distance);
+
+  nsCOMPtr<nsISVGPoint> point =
+    new DOMSVGPoint(path->ComputePointAtLength(distance));
+  return point.forget();
+}
+
+already_AddRefed<SVGAnimatedNumber>
+SVGGeometryElement::PathLength()
+{
+  return mPathLength.ToDOMAnimatedNumber(this);
+}
rename from dom/svg/nsSVGPathGeometryElement.h
rename to dom/svg/SVGGeometryElement.h
--- a/dom/svg/nsSVGPathGeometryElement.h
+++ b/dom/svg/SVGGeometryElement.h
@@ -1,53 +1,60 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 __NS_SVGPATHGEOMETRYELEMENT_H__
-#define __NS_SVGPATHGEOMETRYELEMENT_H__
+#ifndef mozilla_dom_SVGGeometryElement_h
+#define mozilla_dom_SVGGeometryElement_h
 
 #include "mozilla/gfx/2D.h"
 #include "SVGGraphicsElement.h"
+#include "nsISVGPoint.h"
+#include "nsSVGNumber2.h"
 
 struct nsSVGMark {
   enum Type {
     eStart,
     eMid,
     eEnd,
 
     eTypeCount
   };
 
   float x, y, angle;
   Type type;
   nsSVGMark(float aX, float aY, float aAngle, Type aType) :
     x(aX), y(aY), angle(aAngle), type(aType) {}
 };
 
-typedef mozilla::dom::SVGGraphicsElement nsSVGPathGeometryElementBase;
+namespace mozilla {
+namespace dom {
 
-class nsSVGPathGeometryElement : public nsSVGPathGeometryElementBase
+class SVGAnimatedNumber;
+
+typedef mozilla::dom::SVGGraphicsElement SVGGeometryElementBase;
+
+class SVGGeometryElement : public SVGGeometryElementBase
 {
 protected:
   typedef mozilla::gfx::CapStyle CapStyle;
   typedef mozilla::gfx::DrawTarget DrawTarget;
   typedef mozilla::gfx::FillRule FillRule;
   typedef mozilla::gfx::Float Float;
   typedef mozilla::gfx::Matrix Matrix;
   typedef mozilla::gfx::Path Path;
   typedef mozilla::gfx::Point Point;
   typedef mozilla::gfx::PathBuilder PathBuilder;
   typedef mozilla::gfx::Rect Rect;
   typedef mozilla::gfx::StrokeOptions StrokeOptions;
 
 public:
-  explicit nsSVGPathGeometryElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
+  explicit SVGGeometryElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
                                 const nsAttrValue* aValue, bool aNotify) override;
 
   /**
    * Causes this element to discard any Path object that GetOrBuildPath may
    * have cached.
    */
@@ -154,17 +161,17 @@ public:
   }
 
   /**
    * Returns a Path that can be used to paint, hit-test or calculate bounds for
    * this element. May return nullptr if there is no [valid] path. The path
    * that is created may be cached and returned on subsequent calls.
    */
   virtual already_AddRefed<Path> GetOrBuildPath(const DrawTarget& aDrawTarget,
-                                                     FillRule fillRule);
+                                                FillRule fillRule);
 
   /**
    * The same as GetOrBuildPath, but bypasses the cache (neither returns any
    * previously cached Path, nor caches the Path that in does return).
    * this element. May return nullptr if there is no [valid] path.
    */
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) = 0;
 
@@ -186,13 +193,27 @@ public:
   virtual already_AddRefed<Path> GetOrBuildPathForMeasuring();
 
   /**
    * Returns the current computed value of the CSS property 'fill-rule' for
    * this element.
    */
   FillRule GetFillRule();
 
+  // WebIDL
+  already_AddRefed<SVGAnimatedNumber> PathLength();
+  float GetTotalLength();
+  already_AddRefed<nsISVGPoint>
+    GetPointAtLength(float distance, ErrorResult& rv);
+
 protected:
+  // nsSVGElement method
+  virtual NumberAttributesInfo GetNumberInfo() override;
+
+  nsSVGNumber2 mPathLength;
+  static NumberInfo sNumberInfo;
   mutable RefPtr<Path> mCachedPath;
 };
 
-#endif
+} // namespace dom
+} // namespace mozilla
+
+#endif // mozilla_dom_SVGGeometryElement_h
--- a/dom/svg/SVGImageElement.cpp
+++ b/dom/svg/SVGImageElement.cpp
@@ -230,17 +230,17 @@ SVGImageElement::IsAttributeMapped(const
     sViewportsMap,
   };
 
   return FindAttributeDependence(name, map) ||
     SVGImageElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 /* For the purposes of the update/invalidation logic pretend to
    be a rectangle. */
 bool
 SVGImageElement::GetGeometryBounds(Rect* aBounds,
                                    const StrokeOptions& aStrokeOptions,
                                    const Matrix& aToBoundsSpace,
                                    const Matrix* aToNonScalingStrokeSpace)
--- a/dom/svg/SVGImageElement.h
+++ b/dom/svg/SVGImageElement.h
@@ -4,31 +4,31 @@
  * 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_SVGImageElement_h
 #define mozilla_dom_SVGImageElement_h
 
 #include "nsImageLoadingContent.h"
 #include "nsSVGLength2.h"
-#include "nsSVGPathGeometryElement.h"
 #include "nsSVGString.h"
+#include "SVGGeometryElement.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 
 nsresult NS_NewSVGImageElement(nsIContent **aResult,
                                already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGPathGeometryElement SVGImageElementBase;
-
 class nsSVGImageFrame;
 
 namespace mozilla {
 namespace dom {
 class DOMSVGAnimatedPreserveAspectRatio;
 
+typedef SVGGeometryElement SVGImageElementBase;
+
 class SVGImageElement : public SVGImageElementBase,
                         public nsImageLoadingContent
 {
   friend class ::nsSVGImageFrame;
 
 protected:
   explicit SVGImageElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual ~SVGImageElement();
@@ -51,17 +51,17 @@ public:
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers) override;
   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
 
   virtual EventStates IntrinsicState() const override;
 
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
                                  const Matrix& aToBoundsSpace,
                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
 
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
--- a/dom/svg/SVGLineElement.cpp
+++ b/dom/svg/SVGLineElement.cpp
@@ -105,17 +105,17 @@ SVGLineElement::IsAttributeMapped(const 
 nsSVGElement::LengthAttributesInfo
 SVGLineElement::GetLengthInfo()
 {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 void
 SVGLineElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks) {
   float x1, y1, x2, y2;
 
   GetAnimatedLengthValues(&x1, &y1, &x2, &y2, nullptr);
 
   float angle = atan2(y2 - y1, x2 - x1);
--- a/dom/svg/SVGLineElement.h
+++ b/dom/svg/SVGLineElement.h
@@ -2,26 +2,26 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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_SVGLineElement_h
 #define mozilla_dom_SVGLineElement_h
 
-#include "nsSVGPathGeometryElement.h"
+#include "SVGGeometryElement.h"
 #include "nsSVGLength2.h"
 
 nsresult NS_NewSVGLineElement(nsIContent **aResult,
                               already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-typedef nsSVGPathGeometryElement SVGLineElementBase;
+typedef SVGGeometryElement SVGLineElementBase;
 
 class SVGLineElement final : public SVGLineElementBase
 {
 protected:
   explicit SVGLineElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
   friend nsresult (::NS_NewSVGLineElement(nsIContent **aResult,
                                           already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
@@ -29,17 +29,17 @@ protected:
   // a tiny amount to a barely-nonzero-length line that all of our draw targets
   // will render
   void MaybeAdjustForZeroLength(float aX1, float aY1, float& aX2, float aY2);
 
 public:
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool IsMarkable() override { return true; }
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
   virtual void GetAsSimplePath(SimplePath* aSimplePath) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
                                  const Matrix& aToBoundsSpace,
                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
 
--- a/dom/svg/SVGPathData.cpp
+++ b/dom/svg/SVGPathData.cpp
@@ -10,20 +10,20 @@
 #include "gfxPlatform.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Types.h"
 #include "mozilla/gfx/Point.h"
 #include "mozilla/RefPtr.h"
 #include "nsError.h"
 #include "nsString.h"
 #include "nsSVGPathDataParser.h"
-#include "nsSVGPathGeometryElement.h" // for nsSVGMark
 #include <stdarg.h>
 #include "nsStyleConsts.h"
 #include "SVGContentUtils.h"
+#include "SVGGeometryElement.h" // for nsSVGMark
 #include "SVGPathSegUtils.h"
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
 static bool IsMoveto(uint16_t aSegType)
 {
--- a/dom/svg/SVGPathElement.cpp
+++ b/dom/svg/SVGPathElement.cpp
@@ -1,21 +1,19 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "mozilla/dom/SVGPathElement.h"
 
 #include <algorithm>
 
 #include "DOMSVGPathSeg.h"
 #include "DOMSVGPathSegList.h"
-#include "DOMSVGPoint.h"
 #include "gfx2DGlue.h"
 #include "gfxPlatform.h"
 #include "mozilla/dom/SVGPathElementBinding.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 #include "nsCOMPtr.h"
 #include "nsComputedDOMStyle.h"
 #include "nsGkAtoms.h"
@@ -31,19 +29,16 @@ namespace mozilla {
 namespace dom {
 
 JSObject*
 SVGPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return SVGPathElementBinding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGPathElement::sNumberInfo = 
-{ &nsGkAtoms::pathLength, 0, false };
-
 //----------------------------------------------------------------------
 // Implementation
 
 SVGPathElement::SVGPathElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : SVGPathElementBase(aNodeInfo)
 {
 }
 
@@ -57,55 +52,16 @@ SVGPathElement::SizeOfExcludingThis(mozi
          mD.SizeOfExcludingThis(aMallocSizeOf);
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPathElement)
 
-already_AddRefed<SVGAnimatedNumber>
-SVGPathElement::PathLength()
-{
-  return mPathLength.ToDOMAnimatedNumber(this);
-}
-
-float
-SVGPathElement::GetTotalLength()
-{
-  RefPtr<Path> flat = GetOrBuildPathForMeasuring();
-  return flat ? flat->ComputeLength() : 0.f;
-}
-
-already_AddRefed<nsISVGPoint>
-SVGPathElement::GetPointAtLength(float distance, ErrorResult& rv)
-{
-  RefPtr<Path> path = GetOrBuildPathForMeasuring();
-  if (!path) {
-    rv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-
-  float totalLength = path->ComputeLength();
-  if (mPathLength.IsExplicitlySet()) {
-    float pathLength = mPathLength.GetAnimValue();
-    if (pathLength <= 0) {
-      rv.Throw(NS_ERROR_FAILURE);
-      return nullptr;
-    }
-    distance *= totalLength / pathLength;
-  }
-  distance = std::max(0.f,         distance);
-  distance = std::min(totalLength, distance);
-
-  nsCOMPtr<nsISVGPoint> point =
-    new DOMSVGPoint(path->ComputePointAtLength(distance));
-  return point.forget();
-}
-
 uint32_t
 SVGPathElement::GetPathSegAtLength(float distance)
 {
   return mD.GetAnimValue().GetPathSegAtLength(distance);
 }
 
 already_AddRefed<DOMSVGPathSegClosePath>
 SVGPathElement::CreateSVGPathSegClosePath()
@@ -280,22 +236,16 @@ SVGPathElement::AnimatedPathSegList()
 // nsSVGElement methods
 
 /* virtual */ bool
 SVGPathElement::HasValidDimensions() const
 {
   return !mD.GetAnimValue().IsEmpty();
 }
 
-nsSVGElement::NumberAttributesInfo
-SVGPathElement::GetNumberInfo()
-{
-  return NumberAttributesInfo(&mPathLength, &sNumberInfo, 1);
-}
-
 //----------------------------------------------------------------------
 // nsIContent methods
 
 NS_IMETHODIMP_(bool)
 SVGPathElement::IsAttributeMapped(const nsIAtom* name) const
 {
   static const MappedAttributeEntry* const map[] = {
     sMarkersMap
@@ -307,17 +257,17 @@ SVGPathElement::IsAttributeMapped(const 
 
 already_AddRefed<Path>
 SVGPathElement::GetOrBuildPathForMeasuring()
 {
   return mD.GetAnimValue().BuildPathForMeasuring();
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 bool
 SVGPathElement::AttributeDefinesGeometry(const nsIAtom *aName)
 {
   return aName == nsGkAtoms::d ||
          aName == nsGkAtoms::pathLength;
 }
 
--- a/dom/svg/SVGPathElement.h
+++ b/dom/svg/SVGPathElement.h
@@ -4,32 +4,31 @@
  * 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_SVGPathElement_h
 #define mozilla_dom_SVGPathElement_h
 
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
-#include "nsSVGNumber2.h"
-#include "nsSVGPathGeometryElement.h"
 #include "SVGAnimatedPathSegList.h"
+#include "SVGGeometryElement.h"
 #include "DOMSVGPathSeg.h"
 
 nsresult NS_NewSVGPathElement(nsIContent **aResult,
                               already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGPathGeometryElement SVGPathElementBase;
-
 namespace mozilla {
 
 class nsISVGPoint;
 
 namespace dom {
 
+typedef SVGGeometryElement SVGPathElementBase;
+
 class SVGPathElement final : public SVGPathElementBase
 {
   typedef mozilla::gfx::Path Path;
 
 protected:
   friend nsresult (::NS_NewSVGPathElement(nsIContent **aResult,
                                           already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
@@ -40,17 +39,17 @@ public:
   NS_DECL_SIZEOF_EXCLUDING_THIS
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
 
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool AttributeDefinesGeometry(const nsIAtom *aName) override;
   virtual bool IsMarkable() override;
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
 
   /**
    * This returns a path without the extra little line segments that
    * ApproximateZeroLengthSubpathSquareCaps can insert if we have square-caps.
@@ -77,19 +76,16 @@ public:
   /**
    * Gets the ratio of the actual path length to the content author's estimated
    * length (as provided by the <path> element's 'pathLength' attribute). This
    * is used to scale stroke dashing, and to scale offsets along a textPath.
    */
   float GetPathLengthScale(PathLengthScaleForType aFor);
 
   // WebIDL
-  already_AddRefed<SVGAnimatedNumber> PathLength();
-  float GetTotalLength();
-  already_AddRefed<nsISVGPoint> GetPointAtLength(float distance, ErrorResult& rv);
   uint32_t GetPathSegAtLength(float distance);
   already_AddRefed<DOMSVGPathSegClosePath> CreateSVGPathSegClosePath();
   already_AddRefed<DOMSVGPathSegMovetoAbs> CreateSVGPathSegMovetoAbs(float x, float y);
   already_AddRefed<DOMSVGPathSegMovetoRel> CreateSVGPathSegMovetoRel(float x, float y);
   already_AddRefed<DOMSVGPathSegLinetoAbs> CreateSVGPathSegLinetoAbs(float x, float y);
   already_AddRefed<DOMSVGPathSegLinetoRel> CreateSVGPathSegLinetoRel(float x, float y);
   already_AddRefed<DOMSVGPathSegCurvetoCubicAbs>
     CreateSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
@@ -115,20 +111,15 @@ public:
     CreateSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
   already_AddRefed<DOMSVGPathSegCurvetoQuadraticSmoothRel>
     CreateSVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
   already_AddRefed<DOMSVGPathSegList> PathSegList();
   already_AddRefed<DOMSVGPathSegList> AnimatedPathSegList();
 
 protected:
 
-  // nsSVGElement method
-  virtual NumberAttributesInfo GetNumberInfo() override;
-
   SVGAnimatedPathSegList mD;
-  nsSVGNumber2 mPathLength;
-  static NumberInfo sNumberInfo;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGPathElement_h
rename from dom/svg/nsSVGPolyElement.cpp
rename to dom/svg/SVGPolyElement.cpp
--- a/dom/svg/nsSVGPolyElement.cpp
+++ b/dom/svg/SVGPolyElement.cpp
@@ -1,97 +1,97 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "nsSVGPolyElement.h"
+#include "SVGPolyElement.h"
 #include "DOMSVGPointList.h"
 #include "mozilla/gfx/2D.h"
 #include "SVGContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
-NS_IMPL_ADDREF_INHERITED(nsSVGPolyElement,nsSVGPolyElementBase)
-NS_IMPL_RELEASE_INHERITED(nsSVGPolyElement,nsSVGPolyElementBase)
+NS_IMPL_ADDREF_INHERITED(SVGPolyElement,SVGPolyElementBase)
+NS_IMPL_RELEASE_INHERITED(SVGPolyElement,SVGPolyElementBase)
 
-NS_INTERFACE_MAP_BEGIN(nsSVGPolyElement)
-NS_INTERFACE_MAP_END_INHERITING(nsSVGPolyElementBase)
+NS_INTERFACE_MAP_BEGIN(SVGPolyElement)
+NS_INTERFACE_MAP_END_INHERITING(SVGPolyElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
-nsSVGPolyElement::nsSVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
-  : nsSVGPolyElementBase(aNodeInfo)
+SVGPolyElement::SVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
+  : SVGPolyElementBase(aNodeInfo)
 {
 }
 
-nsSVGPolyElement::~nsSVGPolyElement()
+SVGPolyElement::~SVGPolyElement()
 {
 }
 
 already_AddRefed<DOMSVGPointList>
-nsSVGPolyElement::Points()
+SVGPolyElement::Points()
 {
   void *key = mPoints.GetBaseValKey();
   RefPtr<DOMSVGPointList> points = DOMSVGPointList::GetDOMWrapper(key, this, false);
   return points.forget();
 }
 
 already_AddRefed<DOMSVGPointList>
-nsSVGPolyElement::AnimatedPoints()
+SVGPolyElement::AnimatedPoints()
 {
   void *key = mPoints.GetAnimValKey();
   RefPtr<DOMSVGPointList> points = DOMSVGPointList::GetDOMWrapper(key, this, true);
   return points.forget();
 }
 
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
 NS_IMETHODIMP_(bool)
-nsSVGPolyElement::IsAttributeMapped(const nsIAtom* name) const
+SVGPolyElement::IsAttributeMapped(const nsIAtom* name) const
 {
   static const MappedAttributeEntry* const map[] = {
     sMarkersMap
   };
   
   return FindAttributeDependence(name, map) ||
-    nsSVGPolyElementBase::IsAttributeMapped(name);
+    SVGPolyElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
 /* virtual */ bool
-nsSVGPolyElement::HasValidDimensions() const
+SVGPolyElement::HasValidDimensions() const
 {
   return !mPoints.GetAnimValue().IsEmpty();
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 bool
-nsSVGPolyElement::AttributeDefinesGeometry(const nsIAtom *aName)
+SVGPolyElement::AttributeDefinesGeometry(const nsIAtom *aName)
 {
   if (aName == nsGkAtoms::points)
     return true;
 
   return false;
 }
 
 void
-nsSVGPolyElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
+SVGPolyElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
 {
   const SVGPointList &points = mPoints.GetAnimValue();
 
   if (!points.Length())
     return;
 
   float px = points[0].mX, py = points[0].mY, prevAngle = 0.0;
 
@@ -117,20 +117,20 @@ nsSVGPolyElement::GetMarkPoints(nsTArray
     py = y;
   }
 
   aMarks->LastElement().angle = prevAngle;
   aMarks->LastElement().type = nsSVGMark::eEnd;
 }
 
 bool
-nsSVGPolyElement::GetGeometryBounds(Rect* aBounds,
-                                    const StrokeOptions& aStrokeOptions,
-                                    const Matrix& aToBoundsSpace,
-                                    const Matrix* aToNonScalingStrokeSpace)
+SVGPolyElement::GetGeometryBounds(Rect* aBounds,
+                                  const StrokeOptions& aStrokeOptions,
+                                  const Matrix& aToBoundsSpace,
+                                  const Matrix* aToNonScalingStrokeSpace)
 {
   const SVGPointList &points = mPoints.GetAnimValue();
 
   if (!points.Length()) {
     // Rendering of the element is disabled
     aBounds->SetEmpty();
     return true;
   }
rename from dom/svg/nsSVGPolyElement.h
rename to dom/svg/SVGPolyElement.h
--- a/dom/svg/nsSVGPolyElement.h
+++ b/dom/svg/SVGPolyElement.h
@@ -3,31 +3,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/. */
 
 #ifndef NS_SVGPOLYELEMENT_H_
 #define NS_SVGPOLYELEMENT_H_
 
 #include "mozilla/Attributes.h"
-#include "nsSVGPathGeometryElement.h"
 #include "SVGAnimatedPointList.h"
-
-typedef nsSVGPathGeometryElement nsSVGPolyElementBase;
+#include "SVGGeometryElement.h"
 
 namespace mozilla {
 class DOMSVGPointList;
-} // namespace mozilla
+
+namespace dom {
 
-class nsSVGPolyElement : public nsSVGPolyElementBase
+typedef SVGGeometryElement SVGPolyElementBase;
+
+class SVGPolyElement : public SVGPolyElementBase
 {
 protected:
-  explicit nsSVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
+  explicit SVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
-  virtual ~nsSVGPolyElement();
+  virtual ~SVGPolyElement();
 
 public:
   //interfaces
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
@@ -37,25 +38,28 @@ public:
   }
   virtual nsIAtom* GetPointListAttrName() const override {
     return nsGkAtoms::points;
   }
 
   // nsSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool AttributeDefinesGeometry(const nsIAtom *aName) override;
   virtual bool IsMarkable() override { return true; }
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
                                  const Matrix& aToBoundsSpace,
                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
 
   // WebIDL
   already_AddRefed<mozilla::DOMSVGPointList> Points();
   already_AddRefed<mozilla::DOMSVGPointList> AnimatedPoints();
 
 protected:
   SVGAnimatedPointList mPoints;
 };
 
+} // namespace dom
+} // namespace mozilla
+
 #endif //NS_SVGPOLYELEMENT_H_
--- a/dom/svg/SVGPolygonElement.cpp
+++ b/dom/svg/SVGPolygonElement.cpp
@@ -32,36 +32,36 @@ SVGPolygonElement::SVGPolygonElement(alr
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPolygonElement)
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 void
 SVGPolygonElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
 {
-  nsSVGPolyElement::GetMarkPoints(aMarks);
+  SVGPolyElement::GetMarkPoints(aMarks);
 
   if (aMarks->IsEmpty() || aMarks->LastElement().type != nsSVGMark::eEnd) {
     return;
   }
 
   nsSVGMark *endMark = &aMarks->LastElement();
   nsSVGMark *startMark = &aMarks->ElementAt(0);
   float angle = atan2(startMark->y - endMark->y, startMark->x - endMark->x);
 
   endMark->type = nsSVGMark::eMid;
   endMark->angle = SVGContentUtils::AngleBisect(angle, endMark->angle);
   startMark->angle = SVGContentUtils::AngleBisect(angle, startMark->angle);
   // for a polygon (as opposed to a polyline) there's an implicit extra point
-  // co-located with the start point that nsSVGPolyElement::GetMarkPoints
+  // co-located with the start point that SVGPolyElement::GetMarkPoints
   // doesn't return
   aMarks->AppendElement(nsSVGMark(startMark->x, startMark->y, startMark->angle,
                                   nsSVGMark::eEnd));
 }
 
 already_AddRefed<Path>
 SVGPolygonElement::BuildPath(PathBuilder* aBuilder)
 {
--- a/dom/svg/SVGPolygonElement.h
+++ b/dom/svg/SVGPolygonElement.h
@@ -3,36 +3,36 @@
 /* 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_SVGPolygonElement_h
 #define mozilla_dom_SVGPolygonElement_h
 
 #include "mozilla/Attributes.h"
-#include "nsSVGPolyElement.h"
+#include "SVGPolyElement.h"
 
 nsresult NS_NewSVGPolygonElement(nsIContent **aResult,
                                  already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGPolyElement SVGPolygonElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGPolyElement SVGPolygonElementBase;
+
 class SVGPolygonElement final : public SVGPolygonElementBase
 {
 protected:
   explicit SVGPolygonElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
   friend nsresult (::NS_NewSVGPolygonElement(nsIContent **aResult,
                                              already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
 
 public:
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/svg/SVGPolylineElement.cpp
+++ b/dom/svg/SVGPolylineElement.cpp
@@ -31,17 +31,17 @@ SVGPolylineElement::SVGPolylineElement(a
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPolylineElement)
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 already_AddRefed<Path>
 SVGPolylineElement::BuildPath(PathBuilder* aBuilder)
 {
   const SVGPointList &points = mPoints.GetAnimValue();
 
   if (points.IsEmpty()) {
     return nullptr;
--- a/dom/svg/SVGPolylineElement.h
+++ b/dom/svg/SVGPolylineElement.h
@@ -2,35 +2,35 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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_SVGPolylineElement_h
 #define mozilla_dom_SVGPolylineElement_h
 
-#include "nsSVGPolyElement.h"
+#include "SVGPolyElement.h"
 
 nsresult NS_NewSVGPolylineElement(nsIContent **aResult,
                                   already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGPolyElement SVGPolylineElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGPolyElement SVGPolylineElementBase;
+
 class SVGPolylineElement final : public SVGPolylineElementBase
 {
 protected:
   explicit SVGPolylineElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
   friend nsresult (::NS_NewSVGPolylineElement(nsIContent **aResult,
                                               already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder) override;
 
 public:
   // nsIContent interface
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
 };
 
 } // namespace dom
--- a/dom/svg/SVGRectElement.cpp
+++ b/dom/svg/SVGRectElement.cpp
@@ -104,17 +104,17 @@ SVGRectElement::HasValidDimensions() con
 nsSVGElement::LengthAttributesInfo
 SVGRectElement::GetLengthInfo()
 {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryElement methods
+// SVGGeometryElement methods
 
 bool
 SVGRectElement::GetGeometryBounds(Rect* aBounds,
                                   const StrokeOptions& aStrokeOptions,
                                   const Matrix& aToBoundsSpace,
                                   const Matrix* aToNonScalingStrokeSpace)
 {
   Rect rect;
--- a/dom/svg/SVGRectElement.h
+++ b/dom/svg/SVGRectElement.h
@@ -2,40 +2,40 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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_SVGRectElement_h
 #define mozilla_dom_SVGRectElement_h
 
-#include "nsSVGPathGeometryElement.h"
 #include "nsSVGLength2.h"
+#include "SVGGeometryElement.h"
 
 nsresult NS_NewSVGRectElement(nsIContent **aResult,
                               already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGPathGeometryElement SVGRectElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGGeometryElement SVGRectElementBase;
+
 class SVGRectElement final : public SVGRectElementBase
 {
 protected:
   explicit SVGRectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
   friend nsresult (::NS_NewSVGRectElement(nsIContent **aResult,
                                           already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
 
 public:
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
-  // nsSVGPathGeometryElement methods:
+  // SVGGeometryElement methods:
   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
                                  const Matrix& aToBoundsSpace,
                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
   virtual void GetAsSimplePath(SimplePath* aSimplePath) override;
   virtual already_AddRefed<Path> BuildPath(PathBuilder* aBuilder = nullptr) override;
 
   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
 
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -59,16 +59,17 @@ EXPORTS.mozilla.dom += [
     'SVGFEPointLightElement.h',
     'SVGFESpecularLightingElement.h',
     'SVGFESpotLightElement.h',
     'SVGFETileElement.h',
     'SVGFETurbulenceElement.h',
     'SVGFilterElement.h',
     'SVGForeignObjectElement.h',
     'SVGGElement.h',
+    'SVGGeometryElement.h',
     'SVGGradientElement.h',
     'SVGGraphicsElement.h',
     'SVGImageElement.h',
     'SVGIRect.h',
     'SVGLineElement.h',
     'SVGMarkerElement.h',
     'SVGMaskElement.h',
     'SVGMatrix.h',
@@ -125,18 +126,16 @@ UNIFIED_SOURCES += [
     'nsSVGFeatures.cpp',
     'nsSVGFilters.cpp',
     'nsSVGInteger.cpp',
     'nsSVGIntegerPair.cpp',
     'nsSVGLength2.cpp',
     'nsSVGNumber2.cpp',
     'nsSVGNumberPair.cpp',
     'nsSVGPathDataParser.cpp',
-    'nsSVGPathGeometryElement.cpp',
-    'nsSVGPolyElement.cpp',
     'nsSVGString.cpp',
     'nsSVGTransform.cpp',
     'nsSVGViewBox.cpp',
     'SVGAElement.cpp',
     'SVGAngle.cpp',
     'SVGAnimatedAngle.cpp',
     'SVGAnimatedBoolean.cpp',
     'SVGAnimatedEnumeration.cpp',
@@ -184,16 +183,17 @@ UNIFIED_SOURCES += [
     'SVGFESpecularLightingElement.cpp',
     'SVGFESpotLightElement.cpp',
     'SVGFETileElement.cpp',
     'SVGFETurbulenceElement.cpp',
     'SVGFilterElement.cpp',
     'SVGForeignObjectElement.cpp',
     'SVGFragmentIdentifier.cpp',
     'SVGGElement.cpp',
+    'SVGGeometryElement.cpp',
     'SVGGradientElement.cpp',
     'SVGGraphicsElement.cpp',
     'SVGImageElement.cpp',
     'SVGIntegerPairSMILType.cpp',
     'SVGLength.cpp',
     'SVGLengthList.cpp',
     'SVGLengthListSMILType.cpp',
     'SVGLineElement.cpp',
@@ -212,16 +212,17 @@ UNIFIED_SOURCES += [
     'SVGOrientSMILType.cpp',
     'SVGPathData.cpp',
     'SVGPathElement.cpp',
     'SVGPathSegListSMILType.cpp',
     'SVGPathSegUtils.cpp',
     'SVGPatternElement.cpp',
     'SVGPointList.cpp',
     'SVGPointListSMILType.cpp',
+    'SVGPolyElement.cpp',
     'SVGPolygonElement.cpp',
     'SVGPolylineElement.cpp',
     'SVGPreserveAspectRatio.cpp',
     'SVGRect.cpp',
     'SVGRectElement.cpp',
     'SVGScriptElement.cpp',
     'SVGSetElement.cpp',
     'SVGStopElement.cpp',
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -11,17 +11,16 @@
 #include "nsSVGElement.h"
 
 #include "mozilla/dom/SVGSVGElement.h"
 #include "mozilla/dom/SVGTests.h"
 #include "nsContentUtils.h"
 #include "nsICSSDeclaration.h"
 #include "nsIDocument.h"
 #include "nsIDOMMutationEvent.h"
-#include "nsSVGPathGeometryElement.h"
 #include "mozilla/InternalMutationEvent.h"
 #include "nsError.h"
 #include "nsIPresShell.h"
 #include "nsGkAtoms.h"
 #include "mozilla/css/StyleRule.h"
 #include "nsRuleWalker.h"
 #include "mozilla/css/Declaration.h"
 #include "nsCSSProps.h"
@@ -40,16 +39,17 @@
 #include "nsSVGViewBox.h"
 #include "nsSVGString.h"
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedLengthList.h"
 #include "SVGAnimatedPointList.h"
 #include "SVGAnimatedPathSegList.h"
 #include "SVGContentUtils.h"
+#include "SVGGeometryElement.h"
 #include "nsIFrame.h"
 #include "nsQueryObject.h"
 #include <stdarg.h>
 #include "nsSMILMappedAttribute.h"
 #include "SVGMotionSMILAttr.h"
 #include "nsAttrValueOrString.h"
 #include "nsSMILAnimationController.h"
 #include "mozilla/dom/SVGElementBinding.h"
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -1003,16 +1003,18 @@ var interfaceNamesInGlobalScope =
     "SVGFETurbulenceElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGFilterElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGForeignObjectElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGGElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
+    "SVGGeometryElement",
+// IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGGradientElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGGraphicsElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGImageElement",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "SVGLength",
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webidl/SVGPathElement.webidl
+++ b/dom/webidl/SVGPathElement.webidl
@@ -4,24 +4,18 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
-interface SVGPathElement : SVGGraphicsElement {
+interface SVGPathElement : SVGGeometryElement {
 
-  [Constant]
-  readonly attribute SVGAnimatedNumber pathLength;
-
-  float getTotalLength();
-  [NewObject, Throws]
-  SVGPoint getPointAtLength(float distance);
   unsigned long getPathSegAtLength(float distance);
   [NewObject]
   SVGPathSegClosePath createSVGPathSegClosePath();
   [NewObject]
   SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(float x, float y);
   [NewObject]
   SVGPathSegMovetoRel createSVGPathSegMovetoRel(float x, float y);
   [NewObject]
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -465,16 +465,17 @@ WEBIDL_FILES = [
     'SVGFESpotLightElement.webidl',
     'SVGFETileElement.webidl',
     'SVGFETurbulenceElement.webidl',
     'SVGFilterElement.webidl',
     'SVGFilterPrimitiveStandardAttributes.webidl',
     'SVGFitToViewBox.webidl',
     'SVGForeignObjectElement.webidl',
     'SVGGElement.webidl',
+    'SVGGeometryElement.webidl',
     'SVGGradientElement.webidl',
     'SVGGraphicsElement.webidl',
     'SVGImageElement.webidl',
     'SVGLength.webidl',
     'SVGLengthList.webidl',
     'SVGLinearGradientElement.webidl',
     'SVGLineElement.webidl',
     'SVGMarkerElement.webidl',
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -131,17 +131,17 @@ NS_NewHTMLVideoFrame (nsIPresShell* aPre
 
 nsContainerFrame*
 NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsContainerFrame*
 NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
-NS_NewSVGPathGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+NS_NewSVGGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGGenericContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsContainerFrame*
 NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
@@ -5488,23 +5488,23 @@ nsCSSFrameConstructor::FindSVGData(Eleme
              aTag == nsGkAtoms::textPath) {
     return &sSuppressData;
   }
 
   static const FrameConstructionDataByTag sSVGData[] = {
     SIMPLE_SVG_CREATE(svg, NS_NewSVGInnerSVGFrame),
     SIMPLE_SVG_CREATE(g, NS_NewSVGGFrame),
     SIMPLE_SVG_CREATE(svgSwitch, NS_NewSVGSwitchFrame),
-    SIMPLE_SVG_CREATE(polygon, NS_NewSVGPathGeometryFrame),
-    SIMPLE_SVG_CREATE(polyline, NS_NewSVGPathGeometryFrame),
-    SIMPLE_SVG_CREATE(circle, NS_NewSVGPathGeometryFrame),
-    SIMPLE_SVG_CREATE(ellipse, NS_NewSVGPathGeometryFrame),
-    SIMPLE_SVG_CREATE(line, NS_NewSVGPathGeometryFrame),
-    SIMPLE_SVG_CREATE(rect, NS_NewSVGPathGeometryFrame),
-    SIMPLE_SVG_CREATE(path, NS_NewSVGPathGeometryFrame),
+    SIMPLE_SVG_CREATE(polygon, NS_NewSVGGeometryFrame),
+    SIMPLE_SVG_CREATE(polyline, NS_NewSVGGeometryFrame),
+    SIMPLE_SVG_CREATE(circle, NS_NewSVGGeometryFrame),
+    SIMPLE_SVG_CREATE(ellipse, NS_NewSVGGeometryFrame),
+    SIMPLE_SVG_CREATE(line, NS_NewSVGGeometryFrame),
+    SIMPLE_SVG_CREATE(rect, NS_NewSVGGeometryFrame),
+    SIMPLE_SVG_CREATE(path, NS_NewSVGGeometryFrame),
     SIMPLE_SVG_CREATE(defs, NS_NewSVGContainerFrame),
     SIMPLE_SVG_CREATE(generic_, NS_NewSVGGenericContainerFrame),
     { &nsGkAtoms::foreignObject,
       FCDATA_WITH_WRAPPING_BLOCK(FCDATA_DISALLOW_OUT_OF_FLOW,
                                  NS_NewSVGForeignObjectFrame,
                                  nsCSSAnonBoxes::mozSVGForeignContent) },
     SIMPLE_SVG_CREATE(a, NS_NewSVGAFrame),
     SIMPLE_SVG_CREATE(linearGradient, NS_NewSVGLinearGradientFrame),
--- a/layout/generic/nsFrameIdList.h
+++ b/layout/generic/nsFrameIdList.h
@@ -148,17 +148,17 @@ FRAME_ID(nsSVGImageFrame)
 FRAME_ID(nsSVGInnerSVGFrame)
 FRAME_ID(nsSVGLinearGradientFrame)
 FRAME_ID(nsSVGMarkerFrame)
 FRAME_ID(nsSVGMarkerAnonChildFrame)
 FRAME_ID(nsSVGMaskFrame)
 FRAME_ID(nsSVGOuterSVGFrame)
 FRAME_ID(nsSVGOuterSVGAnonChildFrame)
 FRAME_ID(nsSVGPaintServerFrame)
-FRAME_ID(nsSVGPathGeometryFrame)
+FRAME_ID(SVGGeometryFrame)
 FRAME_ID(nsSVGPatternFrame)
 FRAME_ID(nsSVGRadialGradientFrame)
 FRAME_ID(nsSVGStopFrame)
 FRAME_ID(nsSVGSwitchFrame)
 FRAME_ID(SVGTextFrame)
 FRAME_ID(nsSVGUseFrame)
 FRAME_ID(SVGViewFrame)
 FRAME_ID(nsTableCellFrame)
--- a/layout/painting/nsDisplayItemTypesList.h
+++ b/layout/painting/nsDisplayItemTypesList.h
@@ -47,17 +47,17 @@ DECLARE_DISPLAY_ITEM_TYPE(RESOLUTION)
 DECLARE_DISPLAY_ITEM_TYPE(SCROLL_INFO_LAYER)
 DECLARE_DISPLAY_ITEM_TYPE(SELECTION_OVERLAY)
 DECLARE_DISPLAY_ITEM_TYPE(SOLID_COLOR)
 DECLARE_DISPLAY_ITEM_TYPE(SOLID_COLOR_REGION)
 DECLARE_DISPLAY_ITEM_TYPE(SUBDOCUMENT)
 DECLARE_DISPLAY_ITEM_TYPE(MASK)
 DECLARE_DISPLAY_ITEM_TYPE(FILTER)
 DECLARE_DISPLAY_ITEM_TYPE(SVG_OUTER_SVG)
-DECLARE_DISPLAY_ITEM_TYPE(SVG_PATH_GEOMETRY)
+DECLARE_DISPLAY_ITEM_TYPE(SVG_GEOMETRY)
 DECLARE_DISPLAY_ITEM_TYPE(SVG_TEXT)
 DECLARE_DISPLAY_ITEM_TYPE(TABLE_CELL_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(TABLE_CELL_SELECTION)
 DECLARE_DISPLAY_ITEM_TYPE(TABLE_ROW_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(TABLE_ROW_GROUP_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(TABLE_BORDER_BACKGROUND)
 DECLARE_DISPLAY_ITEM_TYPE(TEXT)
 DECLARE_DISPLAY_ITEM_TYPE(TEXT_OVERFLOW)
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -913,17 +913,17 @@ PaintURIChanged(const nsStyleSVGPaint& a
 nsChangeHint
 nsStyleSVG::CalcDifference(const nsStyleSVG& aNewData) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
   if (!DefinitelyEqualURIs(mMarkerEnd, aNewData.mMarkerEnd) ||
       !DefinitelyEqualURIs(mMarkerMid, aNewData.mMarkerMid) ||
       !DefinitelyEqualURIs(mMarkerStart, aNewData.mMarkerStart)) {
-    // Markers currently contribute to nsSVGPathGeometryFrame::mRect,
+    // Markers currently contribute to SVGGeometryFrame::mRect,
     // so we need a reflow as well as a repaint. No intrinsic sizes need
     // to change, so nsChangeHint_NeedReflow is sufficient.
     return nsChangeHint_UpdateEffects |
            nsChangeHint_NeedReflow |
            nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
            nsChangeHint_RepaintFrame;
   }
 
@@ -934,30 +934,30 @@ nsStyleSVG::CalcDifference(const nsStyle
     hint |= nsChangeHint_RepaintFrame;
     if (HasStroke() != aNewData.HasStroke() ||
         (!HasStroke() && HasFill() != aNewData.HasFill())) {
       // Frame bounds and overflow rects depend on whether we "have" fill or
       // stroke. Whether we have stroke or not just changed, or else we have no
       // stroke (in which case whether we have fill or not is significant to frame
       // bounds) and whether we have fill or not just changed. In either case we
       // need to reflow so the frame rect is updated.
-      // XXXperf this is a waste on non nsSVGPathGeometryFrames.
+      // XXXperf this is a waste on non SVGGeometryFrames.
       hint |= nsChangeHint_NeedReflow |
               nsChangeHint_NeedDirtyReflow; // XXX remove me: bug 876085
     }
     if (PaintURIChanged(mFill, aNewData.mFill) ||
         PaintURIChanged(mStroke, aNewData.mStroke)) {
       hint |= nsChangeHint_UpdateEffects;
     }
   }
 
-  // Stroke currently contributes to nsSVGPathGeometryFrame::mRect, so
+  // Stroke currently contributes to SVGGeometryFrame::mRect, so
   // we need a reflow here. No intrinsic sizes need to change, so
   // nsChangeHint_NeedReflow is sufficient.
-  // Note that stroke-dashoffset does not affect nsSVGPathGeometryFrame::mRect.
+  // Note that stroke-dashoffset does not affect SVGGeometryFrame::mRect.
   // text-anchor changes also require a reflow since it changes frames' rects.
   if (mStrokeWidth           != aNewData.mStrokeWidth           ||
       mStrokeMiterlimit      != aNewData.mStrokeMiterlimit      ||
       mStrokeLinecap         != aNewData.mStrokeLinecap         ||
       mStrokeLinejoin        != aNewData.mStrokeLinejoin        ||
       mTextAnchor            != aNewData.mTextAnchor) {
     return hint |
            nsChangeHint_NeedReflow |
@@ -1181,19 +1181,19 @@ nsStyleSVGReset::CalcDifference(const ns
     // which is done during overflow computation.
     hint |= nsChangeHint_UpdateOverflow;
   }
 
   if (mDominantBaseline != aNewData.mDominantBaseline) {
     // XXXjwatt: why NS_STYLE_HINT_REFLOW? Isn't that excessive?
     hint |= NS_STYLE_HINT_REFLOW;
   } else if (mVectorEffect  != aNewData.mVectorEffect) {
-    // Stroke currently affects nsSVGPathGeometryFrame::mRect, and
+    // Stroke currently affects SVGGeometryFrame::mRect, and
     // vector-effect affect stroke. As a result we need to reflow if
-    // vector-effect changes in order to have nsSVGPathGeometryFrame::
+    // vector-effect changes in order to have SVGGeometryFrame::
     // ReflowSVG called to update its mRect. No intrinsic sizes need
     // to change so nsChangeHint_NeedReflow is sufficient.
     hint |= nsChangeHint_NeedReflow |
             nsChangeHint_NeedDirtyReflow | // XXX remove me: bug 876085
             nsChangeHint_RepaintFrame;
   } else if (mStopColor     != aNewData.mStopColor     ||
              mFloodColor    != aNewData.mFloodColor    ||
              mLightingColor != aNewData.mLightingColor ||
@@ -4016,18 +4016,18 @@ nsStyleUserInterface::CalcDifference(con
 
   // We could do better. But it wouldn't be worth it, URL-specified cursors are
   // rare.
   if (mCursorImages != aNewData.mCursorImages) {
     hint |= nsChangeHint_UpdateCursor;
   }
 
   if (mPointerEvents != aNewData.mPointerEvents) {
-    // nsSVGPathGeometryFrame's mRect depends on stroke _and_ on the value
-    // of pointer-events. See nsSVGPathGeometryFrame::ReflowSVG's use of
+    // SVGGeometryFrame's mRect depends on stroke _and_ on the value
+    // of pointer-events. See SVGGeometryFrame::ReflowSVG's use of
     // GetHitTestFlags. (Only a reflow, no visual change.)
     hint |= nsChangeHint_NeedReflow |
             nsChangeHint_NeedDirtyReflow; // XXX remove me: bug 876085
   }
 
   if (mUserModify != aNewData.mUserModify) {
     hint |= NS_STYLE_HINT_VISUAL;
   }
rename from layout/svg/nsSVGPathGeometryFrame.cpp
rename to layout/svg/SVGGeometryFrame.cpp
--- a/layout/svg/nsSVGPathGeometryFrame.cpp
+++ b/layout/svg/SVGGeometryFrame.cpp
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
 // Main header first:
-#include "nsSVGPathGeometryFrame.h"
+#include "SVGGeometryFrame.h"
 
 // Keep others in (case-insensitive) order:
 #include "gfx2DGlue.h"
 #include "gfxContext.h"
 #include "gfxPlatform.h"
 #include "gfxUtils.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Helpers.h"
@@ -17,66 +17,66 @@
 #include "mozilla/SVGContextPaint.h"
 #include "nsDisplayList.h"
 #include "nsGkAtoms.h"
 #include "nsLayoutUtils.h"
 #include "nsRenderingContext.h"
 #include "nsSVGEffects.h"
 #include "nsSVGIntegrationUtils.h"
 #include "nsSVGMarkerFrame.h"
-#include "nsSVGPathGeometryElement.h"
+#include "SVGGeometryElement.h"
 #include "nsSVGUtils.h"
 #include "mozilla/ArrayUtils.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGContentUtils.h"
 #include "SVGGraphicsElement.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace mozilla::image;
 
 //----------------------------------------------------------------------
 // Implementation
 
 nsIFrame*
-NS_NewSVGPathGeometryFrame(nsIPresShell* aPresShell,
-                           nsStyleContext* aContext)
+NS_NewSVGGeometryFrame(nsIPresShell* aPresShell,
+                       nsStyleContext* aContext)
 {
-  return new (aPresShell) nsSVGPathGeometryFrame(aContext);
+  return new (aPresShell) SVGGeometryFrame(aContext);
 }
 
-NS_IMPL_FRAMEARENA_HELPERS(nsSVGPathGeometryFrame)
+NS_IMPL_FRAMEARENA_HELPERS(SVGGeometryFrame)
 
 //----------------------------------------------------------------------
 // nsQueryFrame methods
 
-NS_QUERYFRAME_HEAD(nsSVGPathGeometryFrame)
+NS_QUERYFRAME_HEAD(SVGGeometryFrame)
   NS_QUERYFRAME_ENTRY(nsISVGChildFrame)
-  NS_QUERYFRAME_ENTRY(nsSVGPathGeometryFrame)
+  NS_QUERYFRAME_ENTRY(SVGGeometryFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsFrame)
 
 //----------------------------------------------------------------------
 // Display list item:
 
-class nsDisplaySVGPathGeometry : public nsDisplayItem {
+class nsDisplaySVGGeometry : public nsDisplayItem {
 public:
-  nsDisplaySVGPathGeometry(nsDisplayListBuilder* aBuilder,
-                           nsSVGPathGeometryFrame* aFrame)
+  nsDisplaySVGGeometry(nsDisplayListBuilder* aBuilder,
+                       SVGGeometryFrame* aFrame)
     : nsDisplayItem(aBuilder, aFrame)
   {
-    MOZ_COUNT_CTOR(nsDisplaySVGPathGeometry);
+    MOZ_COUNT_CTOR(nsDisplaySVGGeometry);
     MOZ_ASSERT(aFrame, "Must have a frame!");
   }
 #ifdef NS_BUILD_REFCNT_LOGGING
-  virtual ~nsDisplaySVGPathGeometry() {
-    MOZ_COUNT_DTOR(nsDisplaySVGPathGeometry);
+  virtual ~nsDisplaySVGGeometry() {
+    MOZ_COUNT_DTOR(nsDisplaySVGGeometry);
   }
 #endif
 
-  NS_DISPLAY_DECL_NAME("nsDisplaySVGPathGeometry", TYPE_SVG_PATH_GEOMETRY)
+  NS_DISPLAY_DECL_NAME("nsDisplaySVGGeometry", TYPE_SVG_GEOMETRY)
 
   virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                        HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) override;
   virtual void Paint(nsDisplayListBuilder* aBuilder,
                      nsRenderingContext* aCtx) override;
 
   nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override
   {
@@ -84,122 +84,124 @@ public:
   }
 
   void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                  const nsDisplayItemGeometry* aGeometry,
                                  nsRegion *aInvalidRegion) override;
 };
 
 void
-nsDisplaySVGPathGeometry::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
-                                  HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
+nsDisplaySVGGeometry::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
+                              HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
 {
-  nsSVGPathGeometryFrame *frame = static_cast<nsSVGPathGeometryFrame*>(mFrame);
+  SVGGeometryFrame *frame = static_cast<SVGGeometryFrame*>(mFrame);
   nsPoint pointRelativeToReferenceFrame = aRect.Center();
   // ToReferenceFrame() includes frame->GetPosition(), our user space position.
   nsPoint userSpacePtInAppUnits = pointRelativeToReferenceFrame -
                                    (ToReferenceFrame() - frame->GetPosition());
   gfxPoint userSpacePt =
     gfxPoint(userSpacePtInAppUnits.x, userSpacePtInAppUnits.y) /
       frame->PresContext()->AppUnitsPerCSSPixel();
   if (frame->GetFrameForPoint(userSpacePt)) {
     aOutFrames->AppendElement(frame);
   }
 }
 
 void
-nsDisplaySVGPathGeometry::Paint(nsDisplayListBuilder* aBuilder,
-                                nsRenderingContext* aCtx)
+nsDisplaySVGGeometry::Paint(nsDisplayListBuilder* aBuilder,
+                            nsRenderingContext* aCtx)
 {
   uint32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
 
   // ToReferenceFrame includes our mRect offset, but painting takes
   // account of that too. To avoid double counting, we subtract that
   // here.
   nsPoint offset = ToReferenceFrame() - mFrame->GetPosition();
 
   gfxPoint devPixelOffset =
     nsLayoutUtils::PointToGfxPoint(offset, appUnitsPerDevPixel);
 
   gfxMatrix tm = nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(mFrame) *
                    gfxMatrix::Translation(devPixelOffset);
   DrawResult result =
-    static_cast<nsSVGPathGeometryFrame*>(mFrame)->PaintSVG(*aCtx->ThebesContext(), tm);
+    static_cast<SVGGeometryFrame*>(mFrame)->PaintSVG(*aCtx->ThebesContext(), tm);
 
   nsDisplayItemGenericImageGeometry::UpdateDrawResult(this, result);
 }
 
 void
-nsDisplaySVGPathGeometry::ComputeInvalidationRegion(
+nsDisplaySVGGeometry::ComputeInvalidationRegion(
   nsDisplayListBuilder* aBuilder,
   const nsDisplayItemGeometry* aGeometry,
   nsRegion* aInvalidRegion)
 {
   auto geometry =
     static_cast<const nsDisplayItemGenericImageGeometry*>(aGeometry);
 
   if (aBuilder->ShouldSyncDecodeImages() &&
       geometry->ShouldInvalidateToSyncDecodeImages()) {
     bool snap;
     aInvalidRegion->Or(*aInvalidRegion, GetBounds(aBuilder, &snap));
   }
 
   nsDisplayItem::ComputeInvalidationRegion(aBuilder, aGeometry, aInvalidRegion);
 }
 
+namespace mozilla {
+
 //----------------------------------------------------------------------
 // nsIFrame methods
 
 void
-nsSVGPathGeometryFrame::Init(nsIContent*       aContent,
-                             nsContainerFrame* aParent,
-                             nsIFrame*         aPrevInFlow)
+SVGGeometryFrame::Init(nsIContent*       aContent,
+                       nsContainerFrame* aParent,
+                       nsIFrame*         aPrevInFlow)
 {
   AddStateBits(aParent->GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD);
   nsFrame::Init(aContent, aParent, aPrevInFlow);
 }
 
 nsresult
-nsSVGPathGeometryFrame::AttributeChanged(int32_t         aNameSpaceID,
-                                         nsIAtom*        aAttribute,
-                                         int32_t         aModType)
+SVGGeometryFrame::AttributeChanged(int32_t         aNameSpaceID,
+                                   nsIAtom*        aAttribute,
+                                   int32_t         aModType)
 {
   // We don't invalidate for transform changes (the layers code does that).
   // Also note that SVGTransformableElement::GetAttributeChangeHint will
   // return nsChangeHint_UpdateOverflow for "transform" attribute changes
   // and cause DoApplyRenderingChangeToTree to make the SchedulePaint call.
 
   if (aNameSpaceID == kNameSpaceID_None &&
-      (static_cast<nsSVGPathGeometryElement*>
+      (static_cast<SVGGeometryElement*>
                   (mContent)->AttributeDefinesGeometry(aAttribute))) {
     nsLayoutUtils::PostRestyleEvent(
       mContent->AsElement(), nsRestyleHint(0),
       nsChangeHint_InvalidateRenderingObservers);
     nsSVGUtils::ScheduleReflowSVG(this);
   }
   return NS_OK;
 }
 
 /* virtual */ void
-nsSVGPathGeometryFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
+SVGGeometryFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
 {
   nsFrame::DidSetStyleContext(aOldStyleContext);
 
   if (aOldStyleContext) {
     auto oldStyleEffects = aOldStyleContext->PeekStyleEffects();
     if (oldStyleEffects &&
         StyleEffects()->mOpacity != oldStyleEffects->mOpacity &&
         nsSVGUtils::CanOptimizeOpacity(this)) {
       // nsIFrame::BuildDisplayListForStackingContext() is not going to create an
       // nsDisplayOpacity display list item, so DLBI won't invalidate for us.
       InvalidateFrame();
     }
 
-    nsSVGPathGeometryElement* element =
-      static_cast<nsSVGPathGeometryElement*>(mContent);
+    SVGGeometryElement* element =
+      static_cast<SVGGeometryElement*>(mContent);
 
     auto oldStyleSVG = aOldStyleContext->PeekStyleSVG();
     if (oldStyleSVG && !SVGContentUtils::ShapeTypeHasNoCorners(mContent)) {
       if (StyleSVG()->mStrokeLinecap != oldStyleSVG->mStrokeLinecap &&
           element->IsSVGElement(nsGkAtoms::path)) {
         // If the stroke-linecap changes to or from "butt" then our element
         // needs to update its cached Moz2D Path, since SVGPathData::BuildPath
         // decides whether or not to insert little lines into the path for zero
@@ -217,24 +219,24 @@ nsSVGPathGeometryFrame::DidSetStyleConte
           element->ClearAnyCachedPath();
         }
       }
     }
   }
 }
 
 nsIAtom *
-nsSVGPathGeometryFrame::GetType() const
+SVGGeometryFrame::GetType() const
 {
-  return nsGkAtoms::svgPathGeometryFrame;
+  return nsGkAtoms::svgGeometryFrame;
 }
 
 bool
-nsSVGPathGeometryFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform,
-                                         gfx::Matrix *aFromParentTransform) const
+SVGGeometryFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform,
+                                   gfx::Matrix *aFromParentTransform) const
 {
   bool foundTransform = false;
 
   // Check if our parent has children-only transforms:
   nsIFrame *parent = GetParent();
   if (parent &&
       parent->IsFrameOfType(nsIFrame::eSVG | nsIFrame::eSVGContainer)) {
     foundTransform = static_cast<nsSVGContainerFrame*>(parent)->
@@ -253,36 +255,36 @@ nsSVGPathGeometryFrame::IsSVGTransformed
                            eUserSpaceToParent));
     }
     foundTransform = true;
   }
   return foundTransform;
 }
 
 void
-nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
-                                         const nsRect&           aDirtyRect,
-                                         const nsDisplayListSet& aLists)
+SVGGeometryFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
+                                   const nsRect&           aDirtyRect,
+                                   const nsDisplayListSet& aLists)
 {
   if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions() ||
       (!IsVisibleForPainting(aBuilder) && aBuilder->IsForPainting())) {
     return;
   }
   DisplayOutline(aBuilder, aLists);
   aLists.Content()->AppendNewToTop(
-    new (aBuilder) nsDisplaySVGPathGeometry(aBuilder, this));
+    new (aBuilder) nsDisplaySVGGeometry(aBuilder, this));
 }
 
 //----------------------------------------------------------------------
 // nsISVGChildFrame methods
 
 DrawResult
-nsSVGPathGeometryFrame::PaintSVG(gfxContext& aContext,
-                                 const gfxMatrix& aTransform,
-                                 const nsIntRect* aDirtyRect)
+SVGGeometryFrame::PaintSVG(gfxContext& aContext,
+                           const gfxMatrix& aTransform,
+                           const nsIntRect* aDirtyRect)
 {
   if (!StyleVisibility()->IsVisible())
     return DrawResult::SUCCESS;
 
   // Matrix to the geometry's user space:
   gfxMatrix newMatrix =
     aContext.CurrentMatrix().PreMultiply(aTransform).NudgeToIntegers();
   if (newMatrix.IsSingular()) {
@@ -311,17 +313,17 @@ nsSVGPathGeometryFrame::PaintSVG(gfxCont
       paintOrder >>= NS_STYLE_PAINT_ORDER_BITWIDTH;
     }
   }
 
   return DrawResult::SUCCESS;
 }
 
 nsIFrame*
-nsSVGPathGeometryFrame::GetFrameForPoint(const gfxPoint& aPoint)
+SVGGeometryFrame::GetFrameForPoint(const gfxPoint& aPoint)
 {
   FillRule fillRule;
   uint16_t hitTestFlags;
   if (GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) {
     hitTestFlags = SVG_HIT_TEST_FILL;
     fillRule = nsSVGUtils::ToFillRule(StyleSVG()->mClipRule);
   } else {
     hitTestFlags = GetHitTestFlags();
@@ -335,18 +337,18 @@ nsSVGPathGeometryFrame::GetFrameForPoint
         return nullptr;
       }
     }
     fillRule = nsSVGUtils::ToFillRule(StyleSVG()->mFillRule);
   }
 
   bool isHit = false;
 
-  nsSVGPathGeometryElement* content =
-    static_cast<nsSVGPathGeometryElement*>(mContent);
+  SVGGeometryElement* content =
+    static_cast<SVGGeometryElement*>(mContent);
 
   // Using ScreenReferenceDrawTarget() opens us to Moz2D backend specific hit-
   // testing bugs. Maybe we should use a BackendType::CAIRO DT for hit-testing
   // so that we get more consistent/backwards compatible results?
   RefPtr<DrawTarget> drawTarget =
     gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
   RefPtr<Path> path = content->GetOrBuildPath(*drawTarget, fillRule);
   if (!path) {
@@ -376,17 +378,17 @@ nsSVGPathGeometryFrame::GetFrameForPoint
 
   if (isHit && nsSVGUtils::HitTestClip(this, aPoint))
     return this;
 
   return nullptr;
 }
 
 nsRect
-nsSVGPathGeometryFrame::GetCoveredRegion()
+SVGGeometryFrame::GetCoveredRegion()
 {
   gfxMatrix canvasTM = GetCanvasTM();
   if (canvasTM.PreservesAxisAlignedRectangles()) {
     return nsSVGUtils::TransformFrameRectToOuterSVG(
              mRect, canvasTM, PresContext());
   }
 
   // To get tight bounds we need to compute directly in outer SVG coordinates
@@ -398,17 +400,17 @@ nsSVGPathGeometryFrame::GetCoveredRegion
   nsRect region = nsLayoutUtils::RoundGfxRectToAppRect(
                     extent, PresContext()->AppUnitsPerCSSPixel());
 
   return nsSVGUtils::TransformFrameRectToOuterSVG(
                        region, gfxMatrix(), PresContext());
 }
 
 void
-nsSVGPathGeometryFrame::ReflowSVG()
+SVGGeometryFrame::ReflowSVG()
 {
   NS_ASSERTION(nsSVGUtils::OuterSVGIsCallingReflowSVG(this),
                "This call is probably a wasteful mistake");
 
   MOZ_ASSERT(!(GetStateBits() & NS_FRAME_IS_NONDISPLAY),
              "ReflowSVG mechanism not designed for this");
 
   if (!nsSVGUtils::NeedsReflowSVG(this)) {
@@ -452,17 +454,17 @@ nsSVGPathGeometryFrame::ReflowSVG()
   // Invalidate, but only if this is not our first reflow (since if it is our
   // first reflow then we haven't had our first paint yet).
   if (!(GetParent()->GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
     InvalidateFrame();
   }
 }
 
 void
-nsSVGPathGeometryFrame::NotifySVGChanged(uint32_t aFlags)
+SVGGeometryFrame::NotifySVGChanged(uint32_t aFlags)
 {
   MOZ_ASSERT(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
              "Invalidation logic may need adjusting");
 
   // Changes to our ancestors may affect how we render when we are rendered as
   // part of our ancestor (specifically, if our coordinate context changes size
   // and we have percentage lengths defining our geometry, then we need to be
   // reflowed). However, ancestor changes cannot affect how we render when we
@@ -476,43 +478,43 @@ nsSVGPathGeometryFrame::NotifySVGChanged
   // when it's not visible. See the complexities of GetBBoxContribution.
 
   if (aFlags & COORD_CONTEXT_CHANGED) {
     // Stroke currently contributes to our mRect, which is why we have to take
     // account of stroke-width here. Note that we do not need to take account
     // of stroke-dashoffset since, although that can have a percentage value
     // that is resolved against our coordinate context, it does not affect our
     // mRect.
-    if (static_cast<nsSVGPathGeometryElement*>(mContent)->GeometryDependsOnCoordCtx() ||
+    if (static_cast<SVGGeometryElement*>(mContent)->GeometryDependsOnCoordCtx() ||
         StyleSVG()->mStrokeWidth.HasPercent()) {
-      static_cast<nsSVGPathGeometryElement*>(mContent)->ClearAnyCachedPath();
+      static_cast<SVGGeometryElement*>(mContent)->ClearAnyCachedPath();
       nsSVGUtils::ScheduleReflowSVG(this);
     }
   }
 
   if ((aFlags & TRANSFORM_CHANGED) && StyleSVGReset()->HasNonScalingStroke()) {
     // Stroke currently contributes to our mRect, and our stroke depends on
     // the transform to our outer-<svg> if |vector-effect:non-scaling-stroke|.
     nsSVGUtils::ScheduleReflowSVG(this);
   } 
 }
 
 SVGBBox
-nsSVGPathGeometryFrame::GetBBoxContribution(const Matrix &aToBBoxUserspace,
-                                            uint32_t aFlags)
+SVGGeometryFrame::GetBBoxContribution(const Matrix &aToBBoxUserspace,
+                                      uint32_t aFlags)
 {
   SVGBBox bbox;
 
   if (aToBBoxUserspace.IsSingular()) {
     // XXX ReportToConsole
     return bbox;
   }
 
-  nsSVGPathGeometryElement* element =
-    static_cast<nsSVGPathGeometryElement*>(mContent);
+  SVGGeometryElement* element =
+    static_cast<SVGGeometryElement*>(mContent);
 
   bool getFill = (aFlags & nsSVGUtils::eBBoxIncludeFillGeometry) ||
                  ((aFlags & nsSVGUtils::eBBoxIncludeFill) &&
                   StyleSVG()->mFill.Type() != eStyleSVGPaintType_None);
 
   bool getStroke = (aFlags & nsSVGUtils::eBBoxIncludeStrokeGeometry) ||
                    ((aFlags & nsSVGUtils::eBBoxIncludeStroke) &&
                     nsSVGUtils::HasStroke(this));
@@ -618,17 +620,17 @@ nsSVGPathGeometryFrame::GetBBoxContribut
       // only do some GetStrokeOptions() implementations sometimes
       // significantly overestimate the stroke bounds, but if an argument is
       // passed for the aTransform parameter then they just return bounds-of-
       // transformed-bounds.  These two things combined can lead the bounds to
       // be unacceptably oversized, leading to massive over-invalidation.
       //
       // Second, the way we account for non-scaling-stroke by transforming the
       // path using the transform to the outer-<svg> element is not compatible
-      // with the way that nsSVGPathGeometryFrame::Reflow() inserts a scale
+      // with the way that SVGGeometryFrame::Reflow() inserts a scale
       // into aToBBoxUserspace and then scales the bounds that we return.
       SVGContentUtils::AutoStrokeOptions strokeOptions;
       SVGContentUtils::GetStrokeOptions(&strokeOptions, element,
                                         StyleContext(), nullptr,
                                         SVGContentUtils::eIgnoreStrokeDashing);
       Rect strokeBBoxExtents;
       gfxMatrix userToOuterSVG;
       if (nsSVGUtils::GetNonScalingStrokeTransform(this, &userToOuterSVG)) {
@@ -655,24 +657,24 @@ nsSVGPathGeometryFrame::GetBBoxContribut
       MOZ_ASSERT(ToRect(strokeBBoxExtents).IsFinite(), "bbox is about to go bad");
       bbox.UnionEdges(strokeBBoxExtents);
 #endif
     }
   }
 
   // Account for markers:
   if ((aFlags & nsSVGUtils::eBBoxIncludeMarkers) != 0 &&
-      static_cast<nsSVGPathGeometryElement*>(mContent)->IsMarkable()) {
+      static_cast<SVGGeometryElement*>(mContent)->IsMarkable()) {
 
     float strokeWidth = nsSVGUtils::GetStrokeWidth(this);
     MarkerProperties properties = GetMarkerProperties(this);
 
     if (properties.MarkersExist()) {
       nsTArray<nsSVGMark> marks;
-      static_cast<nsSVGPathGeometryElement*>(mContent)->GetMarkPoints(&marks);
+      static_cast<SVGGeometryElement*>(mContent)->GetMarkPoints(&marks);
       uint32_t num = marks.Length();
 
       // These are in the same order as the nsSVGMark::Type constants.
       nsSVGMarkerFrame* markerFrames[] = {
         properties.GetMarkerStartFrame(),
         properties.GetMarkerMidFrame(),
         properties.GetMarkerEndFrame(),
       };
@@ -692,31 +694,31 @@ nsSVGPathGeometryFrame::GetBBoxContribut
       }
     }
   }
 
   return bbox;
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryFrame methods:
+// SVGGeometryFrame methods:
 
 gfxMatrix
-nsSVGPathGeometryFrame::GetCanvasTM()
+SVGGeometryFrame::GetCanvasTM()
 {
   NS_ASSERTION(GetParent(), "null parent");
 
   nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
   dom::SVGGraphicsElement *content = static_cast<dom::SVGGraphicsElement*>(mContent);
 
   return content->PrependLocalTransformsTo(parent->GetCanvasTM());
 }
 
-nsSVGPathGeometryFrame::MarkerProperties
-nsSVGPathGeometryFrame::GetMarkerProperties(nsSVGPathGeometryFrame *aFrame)
+SVGGeometryFrame::MarkerProperties
+SVGGeometryFrame::GetMarkerProperties(SVGGeometryFrame *aFrame)
 {
   NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame should be first continuation");
 
   MarkerProperties result;
   nsCOMPtr<nsIURI> markerURL =
     nsSVGEffects::GetMarkerURI(aFrame, &nsStyleSVG::mMarkerStart);
   result.mMarkerStart =
     nsSVGEffects::GetMarkerProperty(markerURL, aFrame,
@@ -730,57 +732,57 @@ nsSVGPathGeometryFrame::GetMarkerPropert
   markerURL = nsSVGEffects::GetMarkerURI(aFrame, &nsStyleSVG::mMarkerEnd);
   result.mMarkerEnd =
     nsSVGEffects::GetMarkerProperty(markerURL, aFrame,
                                     nsSVGEffects::MarkerEndProperty());
   return result;
 }
 
 nsSVGMarkerFrame *
-nsSVGPathGeometryFrame::MarkerProperties::GetMarkerStartFrame()
+SVGGeometryFrame::MarkerProperties::GetMarkerStartFrame()
 {
   if (!mMarkerStart)
     return nullptr;
   return static_cast<nsSVGMarkerFrame *>
     (mMarkerStart->GetReferencedFrame(nsGkAtoms::svgMarkerFrame, nullptr));
 }
 
 nsSVGMarkerFrame *
-nsSVGPathGeometryFrame::MarkerProperties::GetMarkerMidFrame()
+SVGGeometryFrame::MarkerProperties::GetMarkerMidFrame()
 {
   if (!mMarkerMid)
     return nullptr;
   return static_cast<nsSVGMarkerFrame *>
     (mMarkerMid->GetReferencedFrame(nsGkAtoms::svgMarkerFrame, nullptr));
 }
 
 nsSVGMarkerFrame *
-nsSVGPathGeometryFrame::MarkerProperties::GetMarkerEndFrame()
+SVGGeometryFrame::MarkerProperties::GetMarkerEndFrame()
 {
   if (!mMarkerEnd)
     return nullptr;
   return static_cast<nsSVGMarkerFrame *>
     (mMarkerEnd->GetReferencedFrame(nsGkAtoms::svgMarkerFrame, nullptr));
 }
 
 void
-nsSVGPathGeometryFrame::Render(gfxContext* aContext,
-                               uint32_t aRenderComponents,
-                               const gfxMatrix& aNewTransform)
+SVGGeometryFrame::Render(gfxContext* aContext,
+                         uint32_t aRenderComponents,
+                         const gfxMatrix& aNewTransform)
 {
   MOZ_ASSERT(!aNewTransform.IsSingular());
 
   DrawTarget* drawTarget = aContext->GetDrawTarget();
 
   FillRule fillRule =
     nsSVGUtils::ToFillRule((GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) ?
                              StyleSVG()->mClipRule : StyleSVG()->mFillRule);
 
-  nsSVGPathGeometryElement* element =
-    static_cast<nsSVGPathGeometryElement*>(mContent);
+  SVGGeometryElement* element =
+    static_cast<SVGGeometryElement*>(mContent);
 
   AntialiasMode aaMode =
     (StyleSVG()->mShapeRendering == NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED ||
      StyleSVG()->mShapeRendering == NS_STYLE_SHAPE_RENDERING_CRISPEDGES) ?
     AntialiasMode::NONE : AntialiasMode::SUBPIXEL;
 
   // We wait as late as possible before setting the transform so that we don't
   // set it unnecessarily if we return early (it's an expensive operation for
@@ -795,17 +797,17 @@ nsSVGPathGeometryFrame::Render(gfxContex
     if (path) {
       ColorPattern white(ToDeviceColor(Color(1.0f, 1.0f, 1.0f, 1.0f)));
       drawTarget->Fill(path, white,
                        DrawOptions(1.0f, CompositionOp::OP_OVER, aaMode));
     }
     return;
   }
 
-  nsSVGPathGeometryElement::SimplePath simplePath;
+  SVGGeometryElement::SimplePath simplePath;
   RefPtr<Path> path;
 
   element->GetAsSimplePath(&simplePath);
   if (!simplePath.IsPath()) {
     path = element->GetOrBuildPath(*drawTarget, fillRule);
     if (!path) {
       return;
     }
@@ -871,29 +873,29 @@ nsSVGPathGeometryFrame::Render(gfxContex
       } else {
         drawTarget->Stroke(path, strokePattern, strokeOptions, drawOptions);
       }
     }
   }
 }
 
 void
-nsSVGPathGeometryFrame::PaintMarkers(gfxContext& aContext,
-                                     const gfxMatrix& aTransform)
+SVGGeometryFrame::PaintMarkers(gfxContext& aContext,
+                               const gfxMatrix& aTransform)
 {
   SVGContextPaint* contextPaint = SVGContextPaint::GetContextPaint(mContent);
 
-  if (static_cast<nsSVGPathGeometryElement*>(mContent)->IsMarkable()) {
+  if (static_cast<SVGGeometryElement*>(mContent)->IsMarkable()) {
     MarkerProperties properties = GetMarkerProperties(this);
 
     if (properties.MarkersExist()) {
       float strokeWidth = nsSVGUtils::GetStrokeWidth(this, contextPaint);
 
       nsTArray<nsSVGMark> marks;
-      static_cast<nsSVGPathGeometryElement*>
+      static_cast<SVGGeometryElement*>
                  (mContent)->GetMarkPoints(&marks);
 
       uint32_t num = marks.Length();
       if (num) {
         // These are in the same order as the nsSVGMark::Type constants.
         nsSVGMarkerFrame* markerFrames[] = {
           properties.GetMarkerStartFrame(),
           properties.GetMarkerMidFrame(),
@@ -910,12 +912,13 @@ nsSVGPathGeometryFrame::PaintMarkers(gfx
           }
         }
       }
     }
   }
 }
 
 uint16_t
-nsSVGPathGeometryFrame::GetHitTestFlags()
+SVGGeometryFrame::GetHitTestFlags()
 {
   return nsSVGUtils::GetGeometryHitTestFlags(this);
 }
+} // namespace mozilla
rename from layout/svg/nsSVGPathGeometryFrame.h
rename to layout/svg/SVGGeometryFrame.h
--- a/layout/svg/nsSVGPathGeometryFrame.h
+++ b/layout/svg/SVGGeometryFrame.h
@@ -1,61 +1,67 @@
 /* -*- 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 __NS_SVGPATHGEOMETRYFRAME_H__
-#define __NS_SVGPATHGEOMETRYFRAME_H__
+#ifndef __SVGGEOMETRYFRAME_H__
+#define __SVGGEOMETRYFRAME_H__
 
 #include "mozilla/Attributes.h"
 #include "gfxMatrix.h"
 #include "gfxRect.h"
 #include "nsFrame.h"
 #include "nsISVGChildFrame.h"
 #include "nsLiteralString.h"
 #include "nsQueryFrame.h"
 #include "nsSVGUtils.h"
 
 namespace mozilla {
+class SVGGeometryFrame;
 namespace gfx {
 class DrawTarget;
 } // namespace gfx
 } // namespace mozilla
 
 class gfxContext;
-class nsDisplaySVGPathGeometry;
+class nsDisplaySVGGeometry;
 class nsIAtom;
 class nsIFrame;
 class nsIPresShell;
 class nsStyleContext;
 class nsSVGMarkerFrame;
 class nsSVGMarkerProperty;
 
 struct nsRect;
 
-class nsSVGPathGeometryFrame : public nsFrame
-                             , public nsISVGChildFrame
+nsIFrame*
+NS_NewSVGGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+
+namespace mozilla {
+
+class SVGGeometryFrame : public nsFrame
+                       , public nsISVGChildFrame
 {
   typedef mozilla::gfx::DrawTarget DrawTarget;
 
   friend nsIFrame*
-  NS_NewSVGPathGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+  ::NS_NewSVGGeometryFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
-  friend class nsDisplaySVGPathGeometry;
+  friend class ::nsDisplaySVGGeometry;
 
 protected:
-  explicit nsSVGPathGeometryFrame(nsStyleContext* aContext)
+  explicit SVGGeometryFrame(nsStyleContext* aContext)
     : nsFrame(aContext)
   {
      AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_MAY_BE_TRANSFORMED);
   }
 
 public:
-  NS_DECL_QUERYFRAME_TARGET(nsSVGPathGeometryFrame)
+  NS_DECL_QUERYFRAME_TARGET(SVGGeometryFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame interface:
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) override;
 
@@ -68,35 +74,35 @@ public:
                                      nsIAtom*        aAttribute,
                                      int32_t         aModType) override;
 
   virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
 
   /**
    * Get the "type" of the frame
    *
-   * @see nsGkAtoms::svgPathGeometryFrame
+   * @see nsGkAtoms::svgGeometryFrame
    */
   virtual nsIAtom* GetType() const override;
 
   virtual bool IsSVGTransformed(Matrix *aOwnTransforms = nullptr,
                                 Matrix *aFromParentTransforms = nullptr) const override;
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const override
   {
-    return MakeFrameName(NS_LITERAL_STRING("SVGPathGeometry"), aResult);
+    return MakeFrameName(NS_LITERAL_STRING("SVGGeometry"), aResult);
   }
 #endif
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) override;
 
-  // nsSVGPathGeometryFrame methods
+  // SVGGeometryFrame methods
   gfxMatrix GetCanvasTM();
 protected:
   // nsISVGChildFrame interface:
   virtual DrawResult PaintSVG(gfxContext& aContext,
                               const gfxMatrix& aTransform,
                               const nsIntRect* aDirtyRect = nullptr) override;
   virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
   virtual nsRect GetCoveredRegion() override;
@@ -136,12 +142,13 @@ private:
     nsSVGMarkerFrame *GetMarkerStartFrame();
     nsSVGMarkerFrame *GetMarkerMidFrame();
     nsSVGMarkerFrame *GetMarkerEndFrame();
   };
 
   /**
    * @param aFrame should be the first continuation
    */
-  static MarkerProperties GetMarkerProperties(nsSVGPathGeometryFrame *aFrame);
+  static MarkerProperties GetMarkerProperties(SVGGeometryFrame *aFrame);
 };
+} // namespace mozilla
 
-#endif // __NS_SVGPATHGEOMETRYFRAME_H__
+#endif // __SVGGEOMETRYFRAME_H__
--- a/layout/svg/moz.build
+++ b/layout/svg/moz.build
@@ -36,27 +36,27 @@ UNIFIED_SOURCES += [
     'nsSVGGFrame.cpp',
     'nsSVGGradientFrame.cpp',
     'nsSVGImageFrame.cpp',
     'nsSVGInnerSVGFrame.cpp',
     'nsSVGIntegrationUtils.cpp',
     'nsSVGMarkerFrame.cpp',
     'nsSVGMaskFrame.cpp',
     'nsSVGOuterSVGFrame.cpp',
-    'nsSVGPathGeometryFrame.cpp',
     'nsSVGPatternFrame.cpp',
     'nsSVGStopFrame.cpp',
     'nsSVGSwitchFrame.cpp',
     'nsSVGUseFrame.cpp',
     'nsSVGUtils.cpp',
     'SVGContextPaint.cpp',
     'SVGFEContainerFrame.cpp',
     'SVGFEImageFrame.cpp',
     'SVGFELeafFrame.cpp',
     'SVGFEUnstyledLeafFrame.cpp',
+    'SVGGeometryFrame.cpp',
     'SVGTextFrame.cpp',
     'SVGViewFrame.cpp',
 ]
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     SOURCES += ['nsSVGMaskFrameNEON.cpp']
     SOURCES['nsSVGMaskFrameNEON.cpp'].flags += CONFIG['NEON_FLAGS']
 
--- a/layout/svg/nsSVGClipPathFrame.cpp
+++ b/layout/svg/nsSVGClipPathFrame.cpp
@@ -7,18 +7,18 @@
 #include "nsSVGClipPathFrame.h"
 
 // Keep others in (case-insensitive) order:
 #include "DrawResult.h"
 #include "gfxContext.h"
 #include "mozilla/dom/SVGClipPathElement.h"
 #include "nsGkAtoms.h"
 #include "nsSVGEffects.h"
-#include "nsSVGPathGeometryElement.h"
-#include "nsSVGPathGeometryFrame.h"
+#include "SVGGeometryElement.h"
+#include "SVGGeometryFrame.h"
 #include "nsSVGUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace mozilla::image;
 
 // Arbitrary number
@@ -51,20 +51,20 @@ nsSVGClipPathFrame::ApplyClipPath(gfxCon
   gfxContextMatrixAutoSaveRestore autoRestore(&aContext);
 
   RefPtr<Path> clipPath;
 
   nsISVGChildFrame* singleClipPathChild = nullptr;
   IsTrivial(&singleClipPathChild);
 
   if (singleClipPathChild) {
-    nsSVGPathGeometryFrame* pathFrame = do_QueryFrame(singleClipPathChild);
+    SVGGeometryFrame* pathFrame = do_QueryFrame(singleClipPathChild);
     if (pathFrame) {
-      nsSVGPathGeometryElement* pathElement =
-        static_cast<nsSVGPathGeometryElement*>(pathFrame->GetContent());
+      SVGGeometryElement* pathElement =
+        static_cast<SVGGeometryElement*>(pathFrame->GetContent());
       gfxMatrix toChildsUserSpace = pathElement->
         PrependLocalTransformsTo(GetClipPathTransform(aClippedFrame) * aMatrix,
                                  eUserSpaceToParent);
       gfxMatrix newMatrix =
         aContext.CurrentMatrix().PreMultiply(toChildsUserSpace).NudgeToIntegers();
       if (!newMatrix.IsSingular()) {
         aContext.SetMatrix(newMatrix);
         FillRule clipRule =
@@ -246,17 +246,17 @@ nsSVGClipPathFrame::PaintFrameIntoMask(n
   nsIContent* childContent = child->GetContent();
   if (childContent->IsSVGElement()) {
     toChildsUserSpace =
       static_cast<const nsSVGElement*>(childContent)->
         PrependLocalTransformsTo(mMatrixForChildren, eUserSpaceToParent);
   }
 
   // Our children have NS_STATE_SVG_CLIPPATH_CHILD set on them, and
-  // nsSVGPathGeometryFrame::Render checks for that state bit and paints
+  // SVGGeometryFrame::Render checks for that state bit and paints
   // only the geometry (opaque black) if set.
   result &= frame->PaintSVG(aTarget, toChildsUserSpace);
 
   if (maskUsage.shouldGenerateClipMaskLayer) {
     aTarget.PopGroupAndBlend();
   } else if (maskUsage.shouldApplyClipPath) {
     aTarget.PopClip();
   }
@@ -421,25 +421,25 @@ nsSVGClipPathFrame::IsValid()
 
     nsIAtom* kidType = kid->GetType();
 
     if (kidType == nsGkAtoms::svgUseFrame) {
       for (nsIFrame* grandKid : kid->PrincipalChildList()) {
 
         nsIAtom* grandKidType = grandKid->GetType();
 
-        if (grandKidType != nsGkAtoms::svgPathGeometryFrame &&
+        if (grandKidType != nsGkAtoms::svgGeometryFrame &&
             grandKidType != nsGkAtoms::svgTextFrame) {
           return false;
         }
       }
       continue;
     }
 
-    if (kidType != nsGkAtoms::svgPathGeometryFrame &&
+    if (kidType != nsGkAtoms::svgGeometryFrame &&
         kidType != nsGkAtoms::svgTextFrame) {
       return false;
     }
   }
 
   return true;
 }
 
--- a/layout/svg/nsSVGEffects.cpp
+++ b/layout/svg/nsSVGEffects.cpp
@@ -8,21 +8,21 @@
 
 // Keep others in (case-insensitive) order:
 #include "mozilla/RestyleManagerHandle.h"
 #include "mozilla/RestyleManagerHandleInlines.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsISupportsImpl.h"
 #include "nsSVGClipPathFrame.h"
 #include "nsSVGPaintServerFrame.h"
-#include "nsSVGPathGeometryElement.h"
 #include "nsSVGFilterFrame.h"
 #include "nsSVGMaskFrame.h"
 #include "nsIReflowCallback.h"
 #include "nsCycleCollectionParticipant.h"
+#include "SVGGeometryElement.h"
 #include "SVGUseElement.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 void
 nsSVGRenderingObserver::StartListening()
 {
@@ -521,18 +521,18 @@ GetEffectProperty(nsIURI* aURI, nsIFrame
   props.Set(aProperty, prop);
   return prop;
 }
 
 nsSVGMarkerProperty*
 nsSVGEffects::GetMarkerProperty(nsIURI* aURI, nsIFrame* aFrame,
   const mozilla::FramePropertyDescriptor<nsSVGMarkerProperty>* aProperty)
 {
-  MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame &&
-             static_cast<nsSVGPathGeometryElement*>(aFrame->GetContent())->IsMarkable(),
+  MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::svgGeometryFrame &&
+             static_cast<SVGGeometryElement*>(aFrame->GetContent())->IsMarkable(),
              "Bad frame");
   return GetEffectProperty(aURI, aFrame, aProperty);
 }
 
 nsSVGTextPathProperty*
 nsSVGEffects::GetTextPathProperty(nsIURI* aURI, nsIFrame* aFrame,
   const mozilla::FramePropertyDescriptor<nsSVGTextPathProperty>* aProperty)
 {
@@ -738,18 +738,18 @@ nsSVGEffects::UpdateEffects(nsIFrame* aF
   props.Delete(FillProperty());
   props.Delete(StrokeProperty());
   props.Delete(BackgroundImageProperty());
 
   // Ensure that the filter is repainted correctly
   // We can't do that in DoUpdate as the referenced frame may not be valid
   GetOrCreateFilterProperty(aFrame);
 
-  if (aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame &&
-      static_cast<nsSVGPathGeometryElement*>(aFrame->GetContent())->IsMarkable()) {
+  if (aFrame->GetType() == nsGkAtoms::svgGeometryFrame &&
+      static_cast<SVGGeometryElement*>(aFrame->GetContent())->IsMarkable()) {
     // Set marker properties here to avoid reference loops
     nsCOMPtr<nsIURI> markerURL =
       GetMarkerURI(aFrame, &nsStyleSVG::mMarkerStart);
     GetMarkerProperty(markerURL, aFrame, MarkerBeginProperty());
     markerURL = GetMarkerURI(aFrame, &nsStyleSVG::mMarkerMid);
     GetMarkerProperty(markerURL, aFrame, MarkerMiddleProperty());
     markerURL = GetMarkerURI(aFrame, &nsStyleSVG::mMarkerEnd);
     GetMarkerProperty(markerURL, aFrame, MarkerEndProperty());
--- a/layout/svg/nsSVGImageFrame.cpp
+++ b/layout/svg/nsSVGImageFrame.cpp
@@ -8,20 +8,20 @@
 #include "gfxPlatform.h"
 #include "mozilla/gfx/2D.h"
 #include "imgIContainer.h"
 #include "nsContainerFrame.h"
 #include "nsIImageLoadingContent.h"
 #include "nsLayoutUtils.h"
 #include "imgINotificationObserver.h"
 #include "nsSVGEffects.h"
-#include "nsSVGPathGeometryFrame.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "nsSVGUtils.h"
 #include "SVGContentUtils.h"
+#include "SVGGeometryFrame.h"
 #include "SVGImageContext.h"
 #include "mozilla/dom/SVGImageElement.h"
 #include "nsContentUtils.h"
 #include "nsIReflowCallback.h"
 #include "mozilla/Unused.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
@@ -41,25 +41,25 @@ public:
   void SetFrame(nsSVGImageFrame *frame) { mFrame = frame; }
 
 private:
   ~nsSVGImageListener() {}
 
   nsSVGImageFrame *mFrame;
 };
 
-class nsSVGImageFrame : public nsSVGPathGeometryFrame
+class nsSVGImageFrame : public SVGGeometryFrame
                       , public nsIReflowCallback
 {
   friend nsIFrame*
   NS_NewSVGImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 protected:
   explicit nsSVGImageFrame(nsStyleContext* aContext)
-    : nsSVGPathGeometryFrame(aContext)
+    : SVGGeometryFrame(aContext)
     , mReflowCallbackPosted(false)
   {
     EnableVisibilityTracking();
   }
 
   virtual ~nsSVGImageFrame();
 
 public:
@@ -67,17 +67,17 @@ public:
 
   // nsISVGChildFrame interface:
   virtual DrawResult PaintSVG(gfxContext& aContext,
                               const gfxMatrix& aTransform,
                               const nsIntRect* aDirtyRect = nullptr) override;
   virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
   virtual void ReflowSVG() override;
 
-  // nsSVGPathGeometryFrame methods:
+  // SVGGeometryFrame methods:
   virtual uint16_t GetHitTestFlags() override;
 
   // nsIFrame interface:
   virtual nsresult  AttributeChanged(int32_t         aNameSpaceID,
                                      nsIAtom*        aAttribute,
                                      int32_t         aModType) override;
 
   void OnVisibilityChange(Visibility aNewVisibility,
@@ -149,17 +149,17 @@ nsSVGImageFrame::~nsSVGImageFrame()
 void
 nsSVGImageFrame::Init(nsIContent*       aContent,
                       nsContainerFrame* aParent,
                       nsIFrame*         aPrevInFlow)
 {
   NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::image),
                "Content is not an SVG image!");
 
-  nsSVGPathGeometryFrame::Init(aContent, aParent, aPrevInFlow);
+  SVGGeometryFrame::Init(aContent, aParent, aPrevInFlow);
 
   if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) {
     // Non-display frames are likely to be patterns, masks or the like.
     // Treat them as always visible.
     IncApproximateVisibleCount();
   }
 
   mListener = new nsSVGImageListener(this);
@@ -235,33 +235,33 @@ nsSVGImageFrame::AttributeChanged(int32_
       element->mStringAttributes[SVGImageElement::XLINK_HREF].IsExplicitlySet();
     if (hrefIsSet) {
       element->LoadSVGImage(true, true);
     } else {
       element->CancelImageRequests(true);
     }
   }
 
-  return nsSVGPathGeometryFrame::AttributeChanged(aNameSpaceID,
-                                                  aAttribute, aModType);
+  return SVGGeometryFrame::AttributeChanged(aNameSpaceID,
+                                            aAttribute, aModType);
 }
 
 void
 nsSVGImageFrame::OnVisibilityChange(Visibility aNewVisibility,
                                     Maybe<OnNonvisible> aNonvisibleAction)
 {
   nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
   if (!imageLoader) {
-    nsSVGPathGeometryFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
+    SVGGeometryFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
     return;
   }
 
   imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction);
 
-  nsSVGPathGeometryFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
+  SVGGeometryFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
 }
 
 gfx::Matrix
 nsSVGImageFrame::GetRasterImageTransform(int32_t aNativeWidth,
                                          int32_t aNativeHeight)
 {
   float x, y, width, height;
   SVGImageElement *element = static_cast<SVGImageElement*>(mContent);
@@ -494,17 +494,17 @@ nsSVGImageFrame::GetFrameForPoint(const 
 
 nsIAtom *
 nsSVGImageFrame::GetType() const
 {
   return nsGkAtoms::svgImageFrame;
 }
 
 //----------------------------------------------------------------------
-// nsSVGPathGeometryFrame methods:
+// SVGGeometryFrame methods:
 
 // Lie about our fill/stroke so that covered region and hit detection work properly
 
 void
 nsSVGImageFrame::ReflowSVG()
 {
   NS_ASSERTION(nsSVGUtils::OuterSVGIsCallingReflowSVG(this),
                "This call is probably a wasteful mistake");
--- a/layout/svg/nsSVGMarkerFrame.cpp
+++ b/layout/svg/nsSVGMarkerFrame.cpp
@@ -5,18 +5,18 @@
 
 // Main header first:
 #include "nsSVGMarkerFrame.h"
 
 // Keep others in (case-insensitive) order:
 #include "gfxContext.h"
 #include "nsSVGEffects.h"
 #include "mozilla/dom/SVGMarkerElement.h"
-#include "nsSVGPathGeometryElement.h"
-#include "nsSVGPathGeometryFrame.h"
+#include "SVGGeometryElement.h"
+#include "SVGGeometryFrame.h"
 
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 nsContainerFrame*
 NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsSVGMarkerFrame(aContext);
@@ -67,17 +67,17 @@ nsSVGMarkerFrame::GetType() const
 }
 
 //----------------------------------------------------------------------
 // nsSVGContainerFrame methods:
 
 gfxMatrix
 nsSVGMarkerFrame::GetCanvasTM()
 {
-  NS_ASSERTION(mMarkedFrame, "null nsSVGPathGeometry frame");
+  NS_ASSERTION(mMarkedFrame, "null SVGGeometry frame");
 
   if (mInUse2) {
     // We're going to be bailing drawing the marker, so return an identity.
     return gfxMatrix();
   }
 
   SVGMarkerElement *content = static_cast<SVGMarkerElement*>(mContent);
   
@@ -99,17 +99,17 @@ GetAnonymousChildFrame(nsIFrame* aFrame)
   MOZ_ASSERT(kid && kid->GetType() == nsGkAtoms::svgMarkerAnonChildFrame,
              "expected to find anonymous child of marker frame");
   return kid;
 }
 
 nsresult
 nsSVGMarkerFrame::PaintMark(gfxContext& aContext,
                             const gfxMatrix& aToMarkedFrameUserSpace,
-                            nsSVGPathGeometryFrame *aMarkedFrame,
+                            SVGGeometryFrame *aMarkedFrame,
                             nsSVGMark *aMark, float aStrokeWidth)
 {
   // If the flag is set when we get here, it means this marker frame
   // has already been used painting the current mark, and the document
   // has a marker reference loop.
   if (mInUse)
     return NS_OK;
 
@@ -160,17 +160,17 @@ nsSVGMarkerFrame::PaintMark(gfxContext& 
     aContext.Restore();
 
   return (result == DrawResult::SUCCESS) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 SVGBBox
 nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix &aToBBoxUserspace,
                                           uint32_t aFlags,
-                                          nsSVGPathGeometryFrame *aMarkedFrame,
+                                          SVGGeometryFrame *aMarkedFrame,
                                           const nsSVGMark *aMark,
                                           float aStrokeWidth)
 {
   SVGBBox bbox;
 
   // If the flag is set when we get here, it means this marker frame
   // has already been used in calculating the current mark bbox, and
   // the document has a marker reference loop.
@@ -221,17 +221,17 @@ nsSVGMarkerFrame::SetParentCoordCtxProvi
   marker->SetParentCoordCtxProvider(aContext);
 }
 
 //----------------------------------------------------------------------
 // helper class
 
 nsSVGMarkerFrame::AutoMarkerReferencer::AutoMarkerReferencer(
     nsSVGMarkerFrame *aFrame,
-    nsSVGPathGeometryFrame *aMarkedFrame
+    SVGGeometryFrame *aMarkedFrame
     MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
       : mFrame(aFrame)
 {
   MOZ_GUARD_OBJECT_NOTIFIER_INIT;
   mFrame->mInUse = true;
   mFrame->mMarkedFrame = aMarkedFrame;
 
   SVGSVGElement *ctx =
--- a/layout/svg/nsSVGMarkerFrame.h
+++ b/layout/svg/nsSVGMarkerFrame.h
@@ -11,19 +11,19 @@
 #include "gfxRect.h"
 #include "nsFrame.h"
 #include "nsLiteralString.h"
 #include "nsQueryFrame.h"
 #include "nsSVGContainerFrame.h"
 #include "nsSVGUtils.h"
 
 class gfxContext;
-class nsSVGPathGeometryFrame;
 
 namespace mozilla {
+class SVGGeometryFrame;
 namespace dom {
 class SVGSVGElement;
 } // namespace dom
 } // namespace mozilla
 
 struct nsSVGMark;
 
 class nsSVGMarkerFrame : public nsSVGContainerFrame
@@ -79,45 +79,45 @@ public:
                  nsGkAtoms::svgMarkerAnonChildFrame,
                "Where is our anonymous child?");
     return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
   }
 
   // nsSVGMarkerFrame methods:
   nsresult PaintMark(gfxContext& aContext,
                      const gfxMatrix& aToMarkedFrameUserSpace,
-                     nsSVGPathGeometryFrame *aMarkedFrame,
+                     SVGGeometryFrame *aMarkedFrame,
                      nsSVGMark *aMark,
                      float aStrokeWidth);
 
   SVGBBox GetMarkBBoxContribution(const Matrix &aToBBoxUserspace,
                                   uint32_t aFlags,
-                                  nsSVGPathGeometryFrame *aMarkedFrame,
+                                  SVGGeometryFrame *aMarkedFrame,
                                   const nsSVGMark *aMark,
                                   float aStrokeWidth);
 
 private:
   // stuff needed for callback
-  nsSVGPathGeometryFrame *mMarkedFrame;
+  SVGGeometryFrame *mMarkedFrame;
   float mStrokeWidth, mX, mY, mAutoAngle;
   bool mIsStart;  // whether the callback is for a marker-start marker
 
   // nsSVGContainerFrame methods:
   virtual gfxMatrix GetCanvasTM() override;
 
   // A helper class to allow us to paint markers safely. The helper
   // automatically sets and clears the mInUse flag on the marker frame (to
   // prevent nasty reference loops) as well as the reference to the marked
   // frame and its coordinate context. It's easy to mess this up
   // and break things, so this helper makes the code far more robust.
   class MOZ_RAII AutoMarkerReferencer
   {
   public:
     AutoMarkerReferencer(nsSVGMarkerFrame *aFrame,
-                         nsSVGPathGeometryFrame *aMarkedFrame
+                         SVGGeometryFrame *aMarkedFrame
                          MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
     ~AutoMarkerReferencer();
   private:
     nsSVGMarkerFrame *mFrame;
     MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
   };
 
   // nsSVGMarkerFrame methods:
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -13,17 +13,17 @@
 #include "gfxPattern.h"
 #include "gfxPlatform.h"
 #include "mozilla/gfx/2D.h"
 #include "nsContentUtils.h"
 #include "nsGkAtoms.h"
 #include "nsISVGChildFrame.h"
 #include "nsStyleContext.h"
 #include "nsSVGEffects.h"
-#include "nsSVGPathGeometryFrame.h"
+#include "SVGGeometryFrame.h"
 #include "mozilla/dom/SVGPatternElement.h"
 #include "nsSVGUtils.h"
 #include "nsSVGAnimatedTransformList.h"
 #include "SVGContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
@@ -387,17 +387,17 @@ nsSVGPatternFrame::PaintPattern(const Dr
   }
 
   // OK, now render -- note that we use "firstKid", which
   // we got at the beginning because it takes care of the
   // referenced pattern situation for us
 
   if (aSource->IsFrameOfType(nsIFrame::eSVGGeometry)) {
     // Set the geometrical parent of the pattern we are rendering
-    patternWithChildren->mSource = static_cast<nsSVGPathGeometryFrame*>(aSource);
+    patternWithChildren->mSource = static_cast<SVGGeometryFrame*>(aSource);
   }
 
   // Delay checking NS_FRAME_DRAWING_AS_PAINTSERVER bit until here so we can
   // give back a clear surface if there's a loop
   if (!(patternWithChildren->GetStateBits() & NS_FRAME_DRAWING_AS_PAINTSERVER)) {
     patternWithChildren->AddStateBits(NS_FRAME_DRAWING_AS_PAINTSERVER);
     for (nsIFrame* kid = firstKid; kid;
          kid = kid->GetNextSibling()) {
--- a/layout/svg/nsSVGPatternFrame.h
+++ b/layout/svg/nsSVGPatternFrame.h
@@ -10,21 +10,21 @@
 #include "gfxMatrix.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 #include "nsAutoPtr.h"
 #include "nsSVGPaintServerFrame.h"
 
 class nsIFrame;
 class nsSVGLength2;
-class nsSVGPathGeometryFrame;
 class nsSVGViewBox;
 
 namespace mozilla {
 class SVGAnimatedPreserveAspectRatio;
+class SVGGeometryFrame;
 class nsSVGAnimatedTransformList;
 } // namespace mozilla
 
 /**
  * Patterns can refer to other patterns. We create an nsSVGPaintingProperty
  * with property type nsGkAtoms::href to track the referenced pattern.
  */
 class nsSVGPatternFrame : public nsSVGPaintServerFrame
@@ -137,17 +137,17 @@ protected:
                           const gfxRect &callerBBox,
                           const Matrix &callerCTM,
                           nsIFrame *aTarget);
 
 private:
   // this is a *temporary* reference to the frame of the element currently
   // referencing our pattern.  This must be temporary because different
   // referencing frames will all reference this one frame
-  nsSVGPathGeometryFrame           *mSource;
+  SVGGeometryFrame                 *mSource;
   nsAutoPtr<gfxMatrix>              mCTM;
 
 protected:
   // This flag is used to detect loops in xlink:href processing
   bool                              mLoopFlag;
   bool                              mNoHRefURI;
 };
 
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -41,18 +41,18 @@
 #include "nsSVGForeignObjectFrame.h"
 #include "nsSVGInnerSVGFrame.h"
 #include "nsSVGIntegrationUtils.h"
 #include "nsSVGLength2.h"
 #include "nsSVGMaskFrame.h"
 #include "nsSVGOuterSVGFrame.h"
 #include "mozilla/dom/SVGClipPathElement.h"
 #include "mozilla/dom/SVGPathElement.h"
-#include "nsSVGPathGeometryElement.h"
-#include "nsSVGPathGeometryFrame.h"
+#include "SVGGeometryElement.h"
+#include "SVGGeometryFrame.h"
 #include "nsSVGPaintServerFrame.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "nsTextFrame.h"
 #include "SVGContentUtils.h"
 #include "SVGTextFrame.h"
 #include "mozilla/Unused.h"
 
 using namespace mozilla;
@@ -409,17 +409,17 @@ nsSVGUtils::GetCanvasTM(nsIFrame *aFrame
     return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(aFrame);
   }
 
   nsSVGContainerFrame *containerFrame = do_QueryFrame(aFrame);
   if (containerFrame) {
     return containerFrame->GetCanvasTM();
   }
 
-  return static_cast<nsSVGPathGeometryFrame*>(aFrame)->GetCanvasTM();
+  return static_cast<SVGGeometryFrame*>(aFrame)->GetCanvasTM();
 }
 
 gfxMatrix
 nsSVGUtils::GetUserToCanvasTM(nsIFrame *aFrame)
 {
   nsISVGChildFrame* svgFrame = do_QueryFrame(aFrame);
   NS_ASSERTION(svgFrame, "bad frame");
 
@@ -1272,17 +1272,17 @@ nsSVGUtils::GetRelativeRect(uint16_t aUn
 bool
 nsSVGUtils::CanOptimizeOpacity(nsIFrame *aFrame)
 {
   if (!(aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT)) {
     return false;
   }
   nsIAtom *type = aFrame->GetType();
   if (type != nsGkAtoms::svgImageFrame &&
-      type != nsGkAtoms::svgPathGeometryFrame) {
+      type != nsGkAtoms::svgGeometryFrame) {
     return false;
   }
   if (aFrame->StyleEffects()->HasFilters()) {
     return false;
   }
   // XXX The SVG WG is intending to allow fill, stroke and markers on <image>
   if (type == nsGkAtoms::svgImageFrame) {
     return true;
@@ -1378,17 +1378,17 @@ nsSVGUtils::PathExtentsToMaxStrokeExtent
                                           const gfxMatrix& aMatrix)
 {
   NS_ASSERTION(aFrame->IsSVGText(), "expected an nsTextFrame for SVG text");
   return ::PathExtentsToMaxStrokeExtents(aPathExtents, aFrame, 0.5, aMatrix);
 }
 
 /*static*/ gfxRect
 nsSVGUtils::PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
-                                          nsSVGPathGeometryFrame* aFrame,
+                                          SVGGeometryFrame* aFrame,
                                           const gfxMatrix& aMatrix)
 {
   bool strokeMayHaveCorners =
     !SVGContentUtils::ShapeTypeHasNoCorners(aFrame->GetContent());
 
   // For a shape without corners the stroke can only extend half the stroke
   // width from the path in the x/y-axis directions. For shapes with corners
   // the stroke can extend by sqrt(1/2) (think 45 degree rotated rect, or line
--- a/layout/svg/nsSVGUtils.h
+++ b/layout/svg/nsSVGUtils.h
@@ -34,25 +34,25 @@ class nsIFrame;
 class nsPresContext;
 class nsStyleContext;
 class nsStyleSVGPaint;
 class nsSVGDisplayContainerFrame;
 class nsSVGElement;
 class nsSVGEnum;
 class nsSVGLength2;
 class nsSVGOuterSVGFrame;
-class nsSVGPathGeometryFrame;
 class nsTextFrame;
 
 struct nsStyleSVG;
 struct nsRect;
 
 namespace mozilla {
 class SVGContextPaint;
 struct SVGContextPaintImpl;
+class SVGGeometryFrame;
 namespace dom {
 class Element;
 class UserSpaceMetrics;
 } // namespace dom
 namespace gfx {
 class DrawTarget;
 class GeneralPattern;
 } // namespace gfx
@@ -181,16 +181,17 @@ public:
   typedef mozilla::dom::Element Element;
   typedef mozilla::gfx::AntialiasMode AntialiasMode;
   typedef mozilla::gfx::DrawTarget DrawTarget;
   typedef mozilla::gfx::FillRule FillRule;
   typedef mozilla::gfx::GeneralPattern GeneralPattern;
   typedef mozilla::gfx::Size Size;
   typedef mozilla::SVGContextPaint SVGContextPaint;
   typedef mozilla::SVGContextPaintImpl SVGContextPaintImpl;
+  typedef mozilla::SVGGeometryFrame SVGGeometryFrame;
   typedef mozilla::image::DrawResult DrawResult;
 
   static void Init();
 
   NS_DECLARE_FRAME_PROPERTY_DELETABLE(ObjectBoundingBoxProperty, gfxRect)
 
   /**
    * Gets the nearest nsSVGInnerSVGFrame or nsSVGOuterSVGFrame frame. aFrame
@@ -477,17 +478,17 @@ public:
    * fill/path extents.
    *
    * This should die once bug 478152 is fixed.
    */
   static gfxRect PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
                                                nsTextFrame* aFrame,
                                                const gfxMatrix& aMatrix);
   static gfxRect PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
-                                               nsSVGPathGeometryFrame* aFrame,
+                                               SVGGeometryFrame* aFrame,
                                                const gfxMatrix& aMatrix);
 
   /**
    * Convert a floating-point value to a 32-bit integer value, clamping to
    * the range of valid integers.
    */
   static int32_t ClampToInt(double aVal)
   {
--- a/testing/web-platform/meta/svg/historical.html.ini
+++ b/testing/web-platform/meta/svg/historical.html.ini
@@ -19,17 +19,8 @@
     expected: FAIL
 
   [SVGGraphicsElement.prototype.requiredFeatures must be removed]
     expected: FAIL
 
   [SVGSVGElement.prototype.useCurrentView must be removed]
     expected: FAIL
 
-  [SVGPathElement.prototype.getPointAtLength must be moved to SVGGeometryElement.prototype]
-    expected: FAIL
-
-  [SVGPathElement.prototype.getTotalLength must be moved to SVGGeometryElement.prototype]
-    expected: FAIL
-
-  [SVGPathElement.prototype.pathLength must be moved to SVGGeometryElement.prototype]
-    expected: FAIL
-
--- a/testing/web-platform/meta/svg/interfaces.html.ini
+++ b/testing/web-platform/meta/svg/interfaces.html.ini
@@ -1,25 +1,10 @@
 [interfaces.html]
   type: testharness
-  [SVGGeometryElement interface: existence and properties of interface object]
-    expected: FAIL
-
-  [SVGGeometryElement interface object length]
-    expected: FAIL
-
-  [SVGGeometryElement interface object name]
-    expected: FAIL
-
-  [SVGGeometryElement interface: existence and properties of interface prototype object]
-    expected: FAIL
-
-  [SVGGeometryElement interface: existence and properties of interface prototype object's "constructor" property]
-    expected: FAIL
-
   [SVGGeometryElement interface: operation isPointInFill(DOMPoint)]
     expected: FAIL
 
   [SVGGeometryElement interface: operation isPointInStroke(DOMPoint)]
     expected: FAIL
 
   [SVGNumber interface: existence and properties of interface object]
     expected: FAIL
@@ -301,29 +286,23 @@
     expected: FAIL
 
   [SVGElement interface: style must inherit property "onsort" with the proper type (62)]
     expected: FAIL
 
   [SVGTransform interface: svg.createSVGTransform() must inherit property "matrix" with the proper type (8)]
     expected: FAIL
 
-  [SVGPathElement interface: existence and properties of interface object]
-    expected: FAIL
-
-  [SVGPathElement interface: existence and properties of interface prototype object]
-    expected: FAIL
-
-  [SVGGeometryElement interface: path must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: path must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on path with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: path must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: path must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on path with too few arguments must throw TypeError]
     expected: FAIL
 
   [SVGElement interface: path must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
@@ -343,23 +322,35 @@
     expected: FAIL
 
   [SVGRectElement interface: existence and properties of interface object]
     expected: FAIL
 
   [SVGRectElement interface: existence and properties of interface prototype object]
     expected: FAIL
 
-  [SVGGeometryElement interface: rect must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: rect must inherit property "pathLength" with the proper type (0)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: rect must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on rect with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: rect must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: rect must inherit property "isPointInStroke" with the proper type (2)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: rect must inherit property "getTotalLength" with the proper type (3)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: rect must inherit property "getPointAtLength" with the proper type (4)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: calling getPointAtLength(float) on rect with too few arguments must throw TypeError]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on rect with too few arguments must throw TypeError]
     expected: FAIL
 
   [SVGElement interface: rect must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
@@ -379,28 +370,40 @@
     expected: FAIL
 
   [SVGCircleElement interface: existence and properties of interface object]
     expected: FAIL
 
   [SVGCircleElement interface: existence and properties of interface prototype object]
     expected: FAIL
 
-  [SVGGeometryElement interface: circle must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: circle must inherit property "pathLength" with the proper type (0)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: circle must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on circle with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: circle must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: circle must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on circle with too few arguments must throw TypeError]
     expected: FAIL
 
+  [SVGGeometryElement interface: circle must inherit property "getTotalLength" with the proper type (3)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: circle must inherit property "getPointAtLength" with the proper type (4)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: calling getPointAtLength(float) on circle with too few arguments must throw TypeError]
+    expected: FAIL
+
   [SVGElement interface: circle must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
   [SVGElement interface: circle must inherit property "onautocompleteerror" with the proper type (9)]
     expected: FAIL
 
   [SVGElement interface: circle must inherit property "oncancel" with the proper type (11)]
     expected: FAIL
@@ -415,28 +418,40 @@
     expected: FAIL
 
   [SVGEllipseElement interface: existence and properties of interface object]
     expected: FAIL
 
   [SVGEllipseElement interface: existence and properties of interface prototype object]
     expected: FAIL
 
-  [SVGGeometryElement interface: ellipse must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: ellipse must inherit property "pathLength" with the proper type (0)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: ellipse must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on ellipse with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: ellipse must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: ellipse must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on ellipse with too few arguments must throw TypeError]
     expected: FAIL
 
+  [SVGGeometryElement interface: ellipse must inherit property "getTotalLength" with the proper type (3)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: ellipse must inherit property "getPointAtLength" with the proper type (4)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: calling getPointAtLength(float) on ellipse with too few arguments must throw TypeError]
+    expected: FAIL
+
   [SVGElement interface: ellipse must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
   [SVGElement interface: ellipse must inherit property "onautocompleteerror" with the proper type (9)]
     expected: FAIL
 
   [SVGElement interface: ellipse must inherit property "oncancel" with the proper type (11)]
     expected: FAIL
@@ -451,28 +466,40 @@
     expected: FAIL
 
   [SVGLineElement interface: existence and properties of interface object]
     expected: FAIL
 
   [SVGLineElement interface: existence and properties of interface prototype object]
     expected: FAIL
 
-  [SVGGeometryElement interface: line must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: line must inherit property "pathLength" with the proper type (0)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: line must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on line with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: line must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: line must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on line with too few arguments must throw TypeError]
     expected: FAIL
 
+  [SVGGeometryElement interface: line must inherit property "getTotalLength" with the proper type (3)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: line must inherit property "getPointAtLength" with the proper type (4)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: calling getPointAtLength(float) on line with too few arguments must throw TypeError]
+    expected: FAIL
+
   [SVGElement interface: line must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
   [SVGElement interface: line must inherit property "onautocompleteerror" with the proper type (9)]
     expected: FAIL
 
   [SVGElement interface: line must inherit property "oncancel" with the proper type (11)]
     expected: FAIL
@@ -487,28 +514,40 @@
     expected: FAIL
 
   [SVGPolylineElement interface: existence and properties of interface object]
     expected: FAIL
 
   [SVGPolylineElement interface: existence and properties of interface prototype object]
     expected: FAIL
 
-  [SVGGeometryElement interface: polyline must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: polyline must inherit property "pathLength" with the proper type (0)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: polyline must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on polyline with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: polyline must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: polyline must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on polyline with too few arguments must throw TypeError]
     expected: FAIL
 
+  [SVGGeometryElement interface: polyline must inherit property "getTotalLength" with the proper type (3)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: polyline must inherit property "getPointAtLength" with the proper type (4)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: calling getPointAtLength(float) on polyline with too few arguments must throw TypeError]
+    expected: FAIL
+
   [SVGElement interface: polyline must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
   [SVGElement interface: polyline must inherit property "onautocompleteerror" with the proper type (9)]
     expected: FAIL
 
   [SVGElement interface: polyline must inherit property "oncancel" with the proper type (11)]
     expected: FAIL
@@ -523,28 +562,40 @@
     expected: FAIL
 
   [SVGPolygonElement interface: existence and properties of interface object]
     expected: FAIL
 
   [SVGPolygonElement interface: existence and properties of interface prototype object]
     expected: FAIL
 
-  [SVGGeometryElement interface: polygon must inherit property "isPointInFill" with the proper type (0)]
+  [SVGGeometryElement interface: polygon must inherit property "pathLength" with the proper type (0)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: polygon must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInFill(DOMPoint) on polygon with too few arguments must throw TypeError]
     expected: FAIL
 
-  [SVGGeometryElement interface: polygon must inherit property "isPointInStroke" with the proper type (1)]
+  [SVGGeometryElement interface: polygon must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on polygon with too few arguments must throw TypeError]
     expected: FAIL
 
+  [SVGGeometryElement interface: polygon must inherit property "getTotalLength" with the proper type (3)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: polygon must inherit property "getPointAtLength" with the proper type (4)]
+    expected: FAIL
+
+  [SVGGeometryElement interface: calling getPointAtLength(float) on polygon with too few arguments must throw TypeError]
+    expected: FAIL
+
   [SVGElement interface: polygon must inherit property "onautocomplete" with the proper type (8)]
     expected: FAIL
 
   [SVGElement interface: polygon must inherit property "onautocompleteerror" with the proper type (9)]
     expected: FAIL
 
   [SVGElement interface: polygon must inherit property "oncancel" with the proper type (11)]
     expected: FAIL
@@ -1552,25 +1603,16 @@
     expected: FAIL
 
   [SVGElement interface: feTurbulence must inherit property "oncuechange" with the proper type (18)]
     expected: FAIL
 
   [SVGElement interface: feTurbulence must inherit property "onsort" with the proper type (62)]
     expected: FAIL
 
-  [SVGGeometryElement interface: attribute pathLength]
-    expected: FAIL
-
-  [SVGGeometryElement interface: operation getTotalLength()]
-    expected: FAIL
-
-  [SVGGeometryElement interface: operation getPointAtLength(float)]
-    expected: FAIL
-
   [SVGGeometryElement interface: path must inherit property "isPointInFill" with the proper type (1)]
     expected: FAIL
 
   [SVGGeometryElement interface: path must inherit property "isPointInStroke" with the proper type (2)]
     expected: FAIL
 
   [SVGGeometryElement interface: rect must inherit property "pathLength" with the proper type (0)]
     expected: FAIL