Bug 940193 - rename nsSVGTextFrame2 to SVGTextFrame. r=dholbert
authorRobert Longson <longsonr@gmail.com>
Fri, 20 Dec 2013 16:38:51 +0000
changeset 171803 d7c9b80ab65fe155d4a0ed70e435f766567812ba
parent 171802 b463b606cf9d4724301eac88117a65799a51768e
child 171804 d4aec392a165f049fb455a1936cecca91dcf140c
push id5166
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:47:54 +0000
treeherdermozilla-aurora@977eb2548b2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs940193
milestone29.0a1
Bug 940193 - rename nsSVGTextFrame2 to SVGTextFrame. r=dholbert
content/base/src/nsGkAtomList.h
content/svg/content/src/SVGTextContentElement.cpp
content/svg/content/src/SVGTextContentElement.h
content/svg/content/src/SVGTextPathElement.h
layout/base/RestyleManager.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsLayoutUtils.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsFrameIdList.h
layout/generic/nsIFrame.h
layout/generic/nsInlineFrame.cpp
layout/generic/nsTextFrame.cpp
layout/svg/SVGTextFrame.cpp
layout/svg/SVGTextFrame.h
layout/svg/moz.build
layout/svg/nsSVGClipPathFrame.cpp
layout/svg/nsSVGContainerFrame.cpp
layout/svg/nsSVGContainerFrame.h
layout/svg/nsSVGEffects.cpp
layout/svg/nsSVGTextFrame2.cpp
layout/svg/nsSVGTextFrame2.h
layout/svg/nsSVGUtils.cpp
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -1871,17 +1871,17 @@ GK_ATOM(svgMarkerAnonChildFrame, "SVGMar
 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(svgTextFrame2, "SVGTextFrame2")
+GK_ATOM(svgTextFrame, "SVGTextFrame")
 GK_ATOM(svgUseFrame, "SVGUseFrame")
 GK_ATOM(svgViewFrame, "SVGViewFrame")
 GK_ATOM(HTMLVideoFrame, "VideoFrame")
 GK_ATOM(onloadend, "onloadend")
 GK_ATOM(onloadstart, "onloadstart")
 GK_ATOM(onprogress, "onprogress")
 GK_ATOM(onsuspend, "onsuspend")
 GK_ATOM(onemptied, "onemptied")
--- a/content/svg/content/src/SVGTextContentElement.cpp
+++ b/content/svg/content/src/SVGTextContentElement.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/SVGTextContentElement.h"
 #include "nsISVGPoint.h"
-#include "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 #include "mozilla/dom/SVGIRect.h"
 
 namespace mozilla {
 namespace dom {
 
 nsSVGEnumMapping SVGTextContentElement::sLengthAdjustMap[] = {
   { &nsGkAtoms::spacing, SVG_LENGTHADJUST_SPACING },
   { &nsGkAtoms::spacingAndGlyphs, SVG_LENGTHADJUST_SPACINGANDGLYPHS },
@@ -22,22 +22,22 @@ nsSVGElement::EnumInfo SVGTextContentEle
   { &nsGkAtoms::lengthAdjust, sLengthAdjustMap, SVG_LENGTHADJUST_SPACING }
 };
 
 nsSVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] =
 {
   { &nsGkAtoms::textLength, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
 };
 
-nsSVGTextFrame2*
+SVGTextFrame*
 SVGTextContentElement::GetSVGTextFrame()
 {
   nsIFrame* frame = GetPrimaryFrame(Flush_Layout);
   while (frame) {
-    nsSVGTextFrame2* textFrame = do_QueryFrame(frame);
+    SVGTextFrame* textFrame = do_QueryFrame(frame);
     if (textFrame) {
       return textFrame;
     }
     frame = frame->GetParent();
   }
   return nullptr;
 }
 
@@ -53,108 +53,108 @@ SVGTextContentElement::LengthAdjust()
   return EnumAttributes()[LENGTHADJUST].ToDOMAnimatedEnum(this);
 }
 
 //----------------------------------------------------------------------
 
 int32_t
 SVGTextContentElement::GetNumberOfChars()
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   return textFrame ? textFrame->GetNumberOfChars(this) : 0;
 }
 
 float
 SVGTextContentElement::GetComputedTextLength()
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   return textFrame ? textFrame->GetComputedTextLength(this) : 0.0f;
 }
 
 void
 SVGTextContentElement::SelectSubString(uint32_t charnum, uint32_t nchars, ErrorResult& rv)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   if (!textFrame)
     return;
 
   rv = textFrame->SelectSubString(this, charnum, nchars);
 }
 
 float
 SVGTextContentElement::GetSubStringLength(uint32_t charnum, uint32_t nchars, ErrorResult& rv)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   if (!textFrame)
     return 0.0f;
 
   float length = 0.0f;
   rv = textFrame->GetSubStringLength(this, charnum, nchars, &length);
   return length;
 }
 
 already_AddRefed<nsISVGPoint>
 SVGTextContentElement::GetStartPositionOfChar(uint32_t charnum, ErrorResult& rv)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   if (!textFrame) {
     rv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsCOMPtr<nsISVGPoint> point;
   rv = textFrame->GetStartPositionOfChar(this, charnum, getter_AddRefs(point));
   return point.forget();
 }
 
 already_AddRefed<nsISVGPoint>
 SVGTextContentElement::GetEndPositionOfChar(uint32_t charnum, ErrorResult& rv)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   if (!textFrame) {
     rv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsCOMPtr<nsISVGPoint> point;
   rv = textFrame->GetEndPositionOfChar(this, charnum, getter_AddRefs(point));
   return point.forget();
 }
 
 already_AddRefed<SVGIRect>
 SVGTextContentElement::GetExtentOfChar(uint32_t charnum, ErrorResult& rv)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
 
   if (!textFrame) {
     rv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   nsRefPtr<SVGIRect> rect;
   rv = textFrame->GetExtentOfChar(this, charnum, getter_AddRefs(rect));
   return rect.forget();
 }
 
 float
 SVGTextContentElement::GetRotationOfChar(uint32_t charnum, ErrorResult& rv)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
 
   if (!textFrame) {
     rv.Throw(NS_ERROR_FAILURE);
     return 0.0f;
   }
 
   float rotation;
   rv = textFrame->GetRotationOfChar(this, charnum, &rotation);
   return rotation;
 }
 
 int32_t
 SVGTextContentElement::GetCharNumAtPosition(nsISVGPoint& aPoint)
 {
-  nsSVGTextFrame2* textFrame = GetSVGTextFrame();
+  SVGTextFrame* textFrame = GetSVGTextFrame();
   return textFrame ? textFrame->GetCharNumAtPosition(this, &aPoint) : -1;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/content/svg/content/src/SVGTextContentElement.h
+++ b/content/svg/content/src/SVGTextContentElement.h
@@ -10,17 +10,17 @@
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 
 static const unsigned short SVG_LENGTHADJUST_UNKNOWN          = 0;
 static const unsigned short SVG_LENGTHADJUST_SPACING          = 1;
 static const unsigned short SVG_LENGTHADJUST_SPACINGANDGLYPHS = 2;
 
-class nsSVGTextFrame2;
+class SVGTextFrame;
 
 namespace mozilla {
 class nsISVGPoint;
 
 namespace dom {
 
 class SVGIRect;
 
@@ -45,17 +45,17 @@ public:
   int32_t GetCharNumAtPosition(nsISVGPoint& point);
 
 protected:
 
   SVGTextContentElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGTextContentElementBase(aNodeInfo)
   {}
 
-  nsSVGTextFrame2* GetSVGTextFrame();
+  SVGTextFrame* GetSVGTextFrame();
 
   enum { LENGTHADJUST };
   virtual nsSVGEnum* EnumAttributes() = 0;
   static nsSVGEnumMapping sLengthAdjustMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { TEXTLENGTH };
   virtual nsSVGLength2* LengthAttributes() = 0;
--- a/content/svg/content/src/SVGTextPathElement.h
+++ b/content/svg/content/src/SVGTextPathElement.h
@@ -29,17 +29,17 @@ static const unsigned short TEXTPATH_MET
 static const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
 static const unsigned short TEXTPATH_SPACINGTYPE_AUTO    = 1;
 static const unsigned short TEXTPATH_SPACINGTYPE_EXACT   = 2;
 
 typedef SVGTextContentElement SVGTextPathElementBase;
 
 class SVGTextPathElement MOZ_FINAL : public SVGTextPathElementBase
 {
-friend class ::nsSVGTextFrame2;
+friend class ::SVGTextFrame;
 
 protected:
   friend nsresult (::NS_NewSVGTextPathElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGTextPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx,
                              JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
 
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -22,17 +22,17 @@
 #include "nsViewManager.h"
 #include "nsRenderingContext.h"
 #include "nsSVGIntegrationUtils.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsContainerFrame.h"
 #include "nsPlaceholderFrame.h"
 #include "nsBlockFrame.h"
 #include "nsViewportFrame.h"
-#include "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 #include "StickyScrollContainer.h"
 #include "nsIRootBox.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsContentUtils.h"
 #include "nsIFrameInlines.h"
 #include "ActiveLayerTracker.h"
 
 #ifdef ACCESSIBILITY
@@ -199,24 +199,24 @@ DoApplyRenderingChangeToTree(nsIFrame* a
           aFrame->IsFrameOfType(nsIFrame::eSVG) &&
           !(aFrame->GetStateBits() & NS_STATE_IS_OUTER_SVG)) {
         // Need to update our overflow rects:
         nsSVGUtils::ScheduleReflowSVG(aFrame);
       }
     }
     if (aChange & nsChangeHint_UpdateTextPath) {
       if (aFrame->IsSVGText()) {
-        // Invalidate and reflow the entire nsSVGTextFrame2:
+        // Invalidate and reflow the entire SVGTextFrame:
         NS_ASSERTION(aFrame->GetContent()->IsSVG(nsGkAtoms::textPath),
                      "expected frame for a <textPath> element");
         nsIFrame* text = nsLayoutUtils::GetClosestFrameOfType(
                                                       aFrame,
-                                                      nsGkAtoms::svgTextFrame2);
-        NS_ASSERTION(text, "expected to find an ancestor nsSVGTextFrame2");
-        static_cast<nsSVGTextFrame2*>(text)->NotifyGlyphMetricsChange();
+                                                      nsGkAtoms::svgTextFrame);
+        NS_ASSERTION(text, "expected to find an ancestor SVGTextFrame");
+        static_cast<SVGTextFrame*>(text)->NotifyGlyphMetricsChange();
       } else {
         NS_ABORT_IF_FALSE(false, "unexpected frame got "
                                  "nsChangeHint_UpdateTextPath");
       }
     }
     if (aChange & nsChangeHint_UpdateOpacityLayer) {
       // FIXME/bug 796697: we can get away with empty transactions for
       // opacity updates in many cases.
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -118,17 +118,17 @@ nsIFrame*
 NS_NewSVGGenericContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGForeignObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGAFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGSwitchFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
-NS_NewSVGTextFrame2(nsIPresShell* aPresShell, nsStyleContext* aContext);
+NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGUseFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 nsIFrame*
 NS_NewSVGViewFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 extern nsIFrame*
 NS_NewSVGLinearGradientFrame(nsIPresShell *aPresShell, nsStyleContext* aContext);
@@ -4946,17 +4946,17 @@ nsCSSFrameConstructor::FindSVGData(Eleme
                aTag == nsGkAtoms::a) {
       return &sTSpanData;
     }
     return &sSuppressData;
   } else if (aTag == nsGkAtoms::text) {
     static const FrameConstructionData sTextData =
       FCDATA_WITH_WRAPPING_BLOCK(FCDATA_DISALLOW_OUT_OF_FLOW |
                                  FCDATA_ALLOW_BLOCK_STYLES,
-                                 NS_NewSVGTextFrame2,
+                                 NS_NewSVGTextFrame,
                                  nsCSSAnonBoxes::mozSVGText);
     return &sTextData;
   } else if (aTag == nsGkAtoms::tspan ||
              aTag == nsGkAtoms::altGlyph ||
              aTag == nsGkAtoms::textPath) {
     return &sSuppressData;
   }
 
@@ -5127,17 +5127,17 @@ nsCSSFrameConstructor::AddFrameConstruct
   styleContext = ResolveStyleContext(aParentFrame, aContent, &aState);
 
   uint32_t flags = ITEM_ALLOW_XBL_BASE | ITEM_ALLOW_PAGE_BREAK;
   if (aParentFrame->IsSVGText()) {
     flags |= ITEM_IS_WITHIN_SVG_TEXT;
   }
   if (aParentFrame->GetType() == nsGkAtoms::blockFrame &&
       aParentFrame->GetParent() &&
-      aParentFrame->GetParent()->GetType() == nsGkAtoms::svgTextFrame2) {
+      aParentFrame->GetParent()->GetType() == nsGkAtoms::svgTextFrame) {
     flags |= ITEM_ALLOWS_TEXT_PATH_CHILD;
   }
   AddFrameConstructionItemsInternal(aState, aContent, aParentFrame,
                                     aContent->Tag(), aContent->GetNameSpaceID(),
                                     aSuppressWhiteSpaceOptimizations,
                                     styleContext,
                                     flags, nullptr,
                                     aItems);
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -59,17 +59,17 @@
 #include "nsCanvasFrame.h"
 #include "gfxDrawable.h"
 #include "gfxUtils.h"
 #include "nsDataHashtable.h"
 #include "nsTextFrame.h"
 #include "nsFontFaceList.h"
 #include "nsFontInflationData.h"
 #include "nsSVGUtils.h"
-#include "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 #include "nsStyleStructInlines.h"
 #include "nsStyleTransformMatrix.h"
 #include "nsIFrameInlines.h"
 #include "ImageContainer.h"
 #include "nsComputedDOMStyle.h"
 #include "ActiveLayerTracker.h"
 #include "mozilla/gfx/2D.h"
 #include "gfx2DGlue.h"
@@ -1848,34 +1848,34 @@ TransformGfxRectToAncestor(nsIFrame *aFr
   if (aPreservesAxisAlignedRectangles) {
     gfxMatrix matrix2d;
     *aPreservesAxisAlignedRectangles =
       ctm.Is2D(&matrix2d) && matrix2d.PreservesAxisAlignedRectangles();
   }
   return ctm.TransformBounds(aRect);
 }
 
-static nsSVGTextFrame2*
+static SVGTextFrame*
 GetContainingSVGTextFrame(nsIFrame* aFrame)
 {
   if (!aFrame->IsSVGText()) {
     return nullptr;
   }
 
-  return static_cast<nsSVGTextFrame2*>
+  return static_cast<SVGTextFrame*>
     (nsLayoutUtils::GetClosestFrameOfType(aFrame->GetParent(),
-                                          nsGkAtoms::svgTextFrame2));
+                                          nsGkAtoms::svgTextFrame));
 }
 
 nsPoint
 nsLayoutUtils::TransformAncestorPointToFrame(nsIFrame* aFrame,
                                              const nsPoint& aPoint,
                                              nsIFrame* aAncestor)
 {
-    nsSVGTextFrame2* text = GetContainingSVGTextFrame(aFrame);
+    SVGTextFrame* text = GetContainingSVGTextFrame(aFrame);
 
     float factor = aFrame->PresContext()->AppUnitsPerDevPixel();
     gfxPoint result(NSAppUnitsToFloatPixels(aPoint.x, factor),
                     NSAppUnitsToFloatPixels(aPoint.y, factor));
 
     if (text) {
         result = TransformGfxPointFromAncestor(text, result, aAncestor);
         result = text->TransformFramePointToTextChild(result, aFrame);
@@ -1887,17 +1887,17 @@ nsLayoutUtils::TransformAncestorPointToF
                    NSFloatPixelsToAppUnits(float(result.y), factor));
 }
 
 nsRect 
 nsLayoutUtils::TransformAncestorRectToFrame(nsIFrame* aFrame,
                                             const nsRect &aRect,
                                             const nsIFrame* aAncestor)
 {
-    nsSVGTextFrame2* text = GetContainingSVGTextFrame(aFrame);
+    SVGTextFrame* text = GetContainingSVGTextFrame(aFrame);
 
     float srcAppUnitsPerDevPixel = aAncestor->PresContext()->AppUnitsPerDevPixel();
     gfxRect result(NSAppUnitsToFloatPixels(aRect.x, srcAppUnitsPerDevPixel),
                    NSAppUnitsToFloatPixels(aRect.y, srcAppUnitsPerDevPixel),
                    NSAppUnitsToFloatPixels(aRect.width, srcAppUnitsPerDevPixel),
                    NSAppUnitsToFloatPixels(aRect.height, srcAppUnitsPerDevPixel));
 
     if (text) {
@@ -1915,17 +1915,17 @@ nsLayoutUtils::TransformAncestorRectToFr
 }
 
 nsRect
 nsLayoutUtils::TransformFrameRectToAncestor(nsIFrame* aFrame,
                                             const nsRect& aRect,
                                             const nsIFrame* aAncestor,
                                             bool* aPreservesAxisAlignedRectangles /* = nullptr */)
 {
-  nsSVGTextFrame2* text = GetContainingSVGTextFrame(aFrame);
+  SVGTextFrame* text = GetContainingSVGTextFrame(aFrame);
 
   float srcAppUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
   gfxRect result;
 
   if (text) {
     result = text->TransformFrameRectFromTextChild(aRect, aFrame);
     result = TransformGfxRectToAncestor(text, result, aAncestor);
     // TransformFrameRectFromTextChild could involve any kind of transform, we
@@ -5617,22 +5617,22 @@ nsLayoutUtils::InflationMinFontSizeFor(c
   return 0;
 }
 
 float
 nsLayoutUtils::FontSizeInflationFor(const nsIFrame *aFrame)
 {
   if (aFrame->IsSVGText()) {
     const nsIFrame* container = aFrame;
-    while (container->GetType() != nsGkAtoms::svgTextFrame2) {
+    while (container->GetType() != nsGkAtoms::svgTextFrame) {
       container = container->GetParent();
     }
-    NS_ASSERTION(container, "expected to find an ancestor nsSVGTextFrame2");
+    NS_ASSERTION(container, "expected to find an ancestor SVGTextFrame");
     return
-      static_cast<const nsSVGTextFrame2*>(container)->GetFontSizeScaleFactor();
+      static_cast<const SVGTextFrame*>(container)->GetFontSizeScaleFactor();
   }
 
   if (!FontSizeInflationEnabled(aFrame->PresContext())) {
     return 1.0f;
   }
 
   return FontSizeInflationInner(aFrame, InflationMinFontSizeFor(aFrame));
 }
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -403,29 +403,29 @@ nsBlockFrame::GetType() const
 {
   return nsGkAtoms::blockFrame;
 }
 
 void
 nsBlockFrame::InvalidateFrame(uint32_t aDisplayItemKey)
 {
   if (IsSVGText()) {
-    NS_ASSERTION(GetParent()->GetType() == nsGkAtoms::svgTextFrame2,
+    NS_ASSERTION(GetParent()->GetType() == nsGkAtoms::svgTextFrame,
                  "unexpected block frame in SVG text");
     GetParent()->InvalidateFrame();
     return;
   }
   nsBlockFrameSuper::InvalidateFrame(aDisplayItemKey);
 }
 
 void
 nsBlockFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey)
 {
   if (IsSVGText()) {
-    NS_ASSERTION(GetParent()->GetType() == nsGkAtoms::svgTextFrame2,
+    NS_ASSERTION(GetParent()->GetType() == nsGkAtoms::svgTextFrame,
                  "unexpected block frame in SVG text");
     GetParent()->InvalidateFrame();
     return;
   }
   nsBlockFrameSuper::InvalidateFrameWithRect(aRect, aDisplayItemKey);
 }
 
 nscoord
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -62,17 +62,17 @@
 #include "nsBoxLayoutState.h"
 #include "nsBlockFrame.h"
 #include "nsDisplayList.h"
 #include "nsSVGIntegrationUtils.h"
 #include "nsSVGEffects.h"
 #include "nsChangeHint.h"
 #include "nsDeckFrame.h"
 #include "nsSubDocumentFrame.h"
-#include "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 
 #include "gfxContext.h"
 #include "nsRenderingContext.h"
 #include "nsAbsoluteContainingBlock.h"
 #include "StickyScrollContainer.h"
 #include "nsFontInflationData.h"
 #include "gfxASurface.h"
 #include "nsRegion.h"
@@ -705,24 +705,24 @@ nsFrame::GetOffsets(int32_t &aStart, int
   return NS_OK;
 }
 
 // Subclass hook for style post processing
 /* virtual */ void
 nsFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
 {
   if (IsSVGText()) {
-    nsSVGTextFrame2* svgTextFrame = static_cast<nsSVGTextFrame2*>(
-        nsLayoutUtils::GetClosestFrameOfType(this, nsGkAtoms::svgTextFrame2));
+    SVGTextFrame* svgTextFrame = static_cast<SVGTextFrame*>(
+        nsLayoutUtils::GetClosestFrameOfType(this, nsGkAtoms::svgTextFrame));
     nsIFrame* anonBlock = svgTextFrame->GetFirstPrincipalChild();
-    // Just as in nsSVGTextFrame2::DidSetStyleContext, we need to ensure that
-    // any non-display nsSVGTextFrame2s get reflowed when a child text frame
+    // Just as in SVGTextFrame::DidSetStyleContext, we need to ensure that
+    // any non-display SVGTextFrames get reflowed when a child text frame
     // gets new style.
     //
-    // Note that we must check NS_FRAME_FIRST_REFLOW on our nsSVGTextFrame2's
+    // Note that we must check NS_FRAME_FIRST_REFLOW on our SVGTextFrame's
     // anonymous block frame rather than our self, since NS_FRAME_FIRST_REFLOW
     // may be set on us if we're a new frame that has been inserted after the
     // document's first reflow. (In which case this DidSetStyleContext call may
     // be happening under frame construction under a Reflow() call.)
     if (anonBlock && !(anonBlock->GetStateBits() & NS_FRAME_FIRST_REFLOW) &&
         (svgTextFrame->GetStateBits() & NS_FRAME_IS_NONDISPLAY) &&
         !(svgTextFrame->GetStateBits() & NS_STATE_SVG_TEXT_IN_REFLOW)) {
       svgTextFrame->ScheduleReflowSVGNonDisplayText();
@@ -7372,17 +7372,17 @@ ConvertSVGDominantBaselineToVerticalAlig
 uint8_t
 nsIFrame::VerticalAlignEnum() const
 {
   if (IsSVGText()) {
     uint8_t dominantBaseline;
     for (const nsIFrame* frame = this; frame; frame = frame->GetParent()) {
       dominantBaseline = frame->StyleSVGReset()->mDominantBaseline;
       if (dominantBaseline != NS_STYLE_DOMINANT_BASELINE_AUTO ||
-          frame->GetType() == nsGkAtoms::svgTextFrame2) {
+          frame->GetType() == nsGkAtoms::svgTextFrame) {
         break;
       }
     }
     return ConvertSVGDominantBaselineToVerticalAlign(dominantBaseline);
   }
 
   const nsStyleCoord& verticalAlign = StyleTextReset()->mVerticalAlign;
   if (verticalAlign.GetUnit() == eStyleUnit_Enumerated) {
--- a/layout/generic/nsFrameIdList.h
+++ b/layout/generic/nsFrameIdList.h
@@ -146,17 +146,17 @@ FRAME_ID(nsSVGMaskFrame)
 FRAME_ID(nsSVGOuterSVGFrame)
 FRAME_ID(nsSVGOuterSVGAnonChildFrame)
 FRAME_ID(nsSVGPaintServerFrame)
 FRAME_ID(nsSVGPathGeometryFrame)
 FRAME_ID(nsSVGPatternFrame)
 FRAME_ID(nsSVGRadialGradientFrame)
 FRAME_ID(nsSVGStopFrame)
 FRAME_ID(nsSVGSwitchFrame)
-FRAME_ID(nsSVGTextFrame2)
+FRAME_ID(SVGTextFrame)
 FRAME_ID(nsSVGUseFrame)
 FRAME_ID(SVGViewFrame)
 FRAME_ID(nsTableCaptionFrame)
 FRAME_ID(nsTableCellFrame)
 FRAME_ID(nsTableColFrame)
 FRAME_ID(nsTableColGroupFrame)
 FRAME_ID(nsTableFrame)
 FRAME_ID(nsTableOuterFrame)
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -297,17 +297,17 @@ typedef uint64_t nsFrameState;
 // Is this frame allowed to have generated (::before/::after) content?
 #define NS_FRAME_MAY_HAVE_GENERATED_CONTENT         NS_FRAME_STATE_BIT(44)
 
 // This bit is set on frames that create ContainerLayers with component
 // alpha children. With BasicLayers we avoid creating these, so we mark
 // the frames for future reference.
 #define NS_FRAME_NO_COMPONENT_ALPHA                 NS_FRAME_STATE_BIT(45)
 
-// The frame is a descendant of nsSVGTextFrame2 and is thus used for SVG
+// The frame is a descendant of SVGTextFrame and is thus used for SVG
 // text layout.
 #define NS_FRAME_IS_SVG_TEXT                        NS_FRAME_STATE_BIT(47)
 
 // Frame is marked as needing painting
 #define NS_FRAME_NEEDS_PAINT                        NS_FRAME_STATE_BIT(48)
 
 // Frame has a descendant frame that needs painting - This includes
 // cross-doc children.
@@ -2928,17 +2928,17 @@ NS_PTR_TO_INT32(frame->Properties().Get(
   };
 
   /**
    * Finds a frame that is closer to a specified point than a current
    * distance.  Distance is measured as for text selection -- a closer x
    * distance beats a closer y distance.
    *
    * Normally, this function will only check the distance between this
-   * frame's rectangle and the specified point.  nsSVGTextFrame2 overrides
+   * frame's rectangle and the specified point.  SVGTextFrame overrides
    * this so that it can manage all of its descendant frames and take
    * into account any SVG text layout.
    *
    * If aPoint is closer to this frame's rectangle than aCurrentBestFrame
    * indicates, then aCurrentBestFrame is updated with the distance between
    * aPoint and this frame's rectangle, and with a pointer to this frame.
    * If aPoint is not closer, then aCurrentBestFrame is left unchanged.
    *
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -58,30 +58,30 @@ nsInlineFrame::GetType() const
 }
 
 void
 nsInlineFrame::InvalidateFrame(uint32_t aDisplayItemKey)
 {
   if (IsSVGText()) {
     nsIFrame* svgTextFrame =
       nsLayoutUtils::GetClosestFrameOfType(GetParent(),
-                                           nsGkAtoms::svgTextFrame2);
+                                           nsGkAtoms::svgTextFrame);
     svgTextFrame->InvalidateFrame();
     return;
   }
   nsInlineFrameBase::InvalidateFrame(aDisplayItemKey);
 }
 
 void
 nsInlineFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey)
 {
   if (IsSVGText()) {
     nsIFrame* svgTextFrame =
       nsLayoutUtils::GetClosestFrameOfType(GetParent(),
-                                           nsGkAtoms::svgTextFrame2);
+                                           nsGkAtoms::svgTextFrame);
     svgTextFrame->InvalidateFrame();
     return;
   }
   nsInlineFrameBase::InvalidateFrameWithRect(aRect, aDisplayItemKey);
 }
 
 static inline bool
 IsMarginZero(const nsStyleCoord &aCoord)
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -21,17 +21,17 @@
 #include "nsString.h"
 #include "nsUnicharUtils.h"
 #include "nsPresContext.h"
 #include "nsIContent.h"
 #include "nsStyleConsts.h"
 #include "nsStyleContext.h"
 #include "nsStyleStruct.h"
 #include "nsStyleStructInlines.h"
-#include "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 #include "nsCoord.h"
 #include "nsRenderingContext.h"
 #include "nsIPresShell.h"
 #include "nsTArray.h"
 #include "nsCSSPseudoElements.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsCompatibility.h"
 #include "nsCSSColorUtils.h"
@@ -4246,30 +4246,30 @@ nsTextFrame::LastContinuation() const
 }
 
 void
 nsTextFrame::InvalidateFrame(uint32_t aDisplayItemKey)
 {
   if (IsSVGText()) {
     nsIFrame* svgTextFrame =
       nsLayoutUtils::GetClosestFrameOfType(GetParent(),
-                                           nsGkAtoms::svgTextFrame2);
+                                           nsGkAtoms::svgTextFrame);
     svgTextFrame->InvalidateFrame();
     return;
   }
   nsTextFrameBase::InvalidateFrame(aDisplayItemKey);
 }
 
 void
 nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey)
 {
   if (IsSVGText()) {
     nsIFrame* svgTextFrame =
       nsLayoutUtils::GetClosestFrameOfType(GetParent(),
-                                           nsGkAtoms::svgTextFrame2);
+                                           nsGkAtoms::svgTextFrame);
     svgTextFrame->InvalidateFrame();
     return;
   }
   nsTextFrameBase::InvalidateFrameWithRect(aRect, aDisplayItemKey);
 }
 
 gfxTextRun*
 nsTextFrame::GetUninflatedTextRun()
@@ -4764,22 +4764,22 @@ nsTextFrame::GetTextDecorations(
   }
 }
 
 static float
 GetInflationForTextDecorations(nsIFrame* aFrame, nscoord aInflationMinFontSize)
 {
   if (aFrame->IsSVGText()) {
     const nsIFrame* container = aFrame;
-    while (container->GetType() != nsGkAtoms::svgTextFrame2) {
+    while (container->GetType() != nsGkAtoms::svgTextFrame) {
       container = container->GetParent();
     }
-    NS_ASSERTION(container, "expected to find an ancestor nsSVGTextFrame2");
+    NS_ASSERTION(container, "expected to find an ancestor SVGTextFrame");
     return
-      static_cast<const nsSVGTextFrame2*>(container)->GetFontSizeScaleFactor();
+      static_cast<const SVGTextFrame*>(container)->GetFontSizeScaleFactor();
   }
   return nsLayoutUtils::FontSizeInflationInner(aFrame, aInflationMinFontSize);
 }
 
 void
 nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext,
                                      const nsHTMLReflowState& aBlockReflowState,
                                      PropertyProvider& aProvider,
rename from layout/svg/nsSVGTextFrame2.cpp
rename to layout/svg/SVGTextFrame.cpp
--- a/layout/svg/nsSVGTextFrame2.cpp
+++ b/layout/svg/SVGTextFrame.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 "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 
 // Keep others in (case-insensitive) order:
 #include "DOMSVGPoint.h"
 #include "gfx2DGlue.h"
 #include "gfxFont.h"
 #include "gfxSkipChars.h"
 #include "gfxTypes.h"
 #include "LookAndFeel.h"
@@ -405,27 +405,27 @@ TruncateTo(nsTArray<T>& aArrayToTruncate
 {
   uint32_t length = aReferenceArray.Length();
   if (aArrayToTruncate.Length() > length) {
     aArrayToTruncate.TruncateLength(length);
   }
 }
 
 /**
- * Asserts that the anonymous block child of the nsSVGTextFrame2 has been
+ * Asserts that the anonymous block child of the SVGTextFrame has been
  * reflowed (or does not exist).  Returns null if the child has not been
  * reflowed, and the frame otherwise.
  *
  * We check whether the kid has been reflowed and not the frame itself
  * since we sometimes need to call this function during reflow, after the
  * kid has been reflowed but before we have cleared the dirty bits on the
  * frame itself.
  */
-static nsSVGTextFrame2*
-FrameIfAnonymousChildReflowed(nsSVGTextFrame2* aFrame)
+static SVGTextFrame*
+FrameIfAnonymousChildReflowed(SVGTextFrame* aFrame)
 {
   NS_PRECONDITION(aFrame, "aFrame must not be null");
   nsIFrame* kid = aFrame->GetFirstPrincipalChild();
   if (NS_SUBTREE_DIRTY(kid)) {
     MOZ_ASSERT(false, "should have already reflowed the anonymous block child");
     return nullptr;
   }
   return aFrame;
@@ -457,17 +457,17 @@ namespace mozilla {
  *
  *   - Only the first glyph has (or none of the glyphs have) been positioned
  *     with SVG text positioning attributes
  *   - All of the glyphs have zero rotation
  *   - The glyphs are not on a text path
  *   - The glyphs correspond to content within the one nsTextFrame
  *
  * A TextRenderedRunIterator produces TextRenderedRuns required for painting a
- * whole nsSVGTextFrame2.
+ * whole SVGTextFrame.
  */
 struct TextRenderedRun
 {
   /**
    * Constructs a TextRenderedRun that is uninitialized except for mFrame
    * being null.
    */
   TextRenderedRun()
@@ -533,17 +533,17 @@ struct TextRenderedRun
    *   - one for "ab"
    *   - one for "c"
    *   - one for "de"
    *   - one for "f"
    *
    * Assume now that we are painting the third TextRenderedRun.  It will have
    * a left clip edge that is the sum of the advances of "abc", and it will
    * have a right clip edge that is the advance of "f".  In
-   * nsSVGTextFrame2::PaintSVG(), we pass in nsPoint() (i.e., the origin)
+   * SVGTextFrame::PaintSVG(), we pass in nsPoint() (i.e., the origin)
    * as the point at which to paint the text frame, and we pass in the
    * clip edge values.  The nsTextFrame will paint the substring of its
    * text such that the top-left corner of the "d"'s glyph cell will be at
    * (0, 0) in the current coordinate system.
    *
    * Thus, GetTransformFromUserSpaceForPainting must return a transform from
    * whatever user space the <text> element is in to a coordinate space in
    * device pixels (as that's what nsTextFrame works in) where the origin is at
@@ -1278,39 +1278,39 @@ GetUndisplayedCharactersBeforeFrame(nsTe
     NS_NOTREACHED("expected a TextNodeCorrespondenceProperty on nsTextFrame "
                   "used for SVG text");
     return 0;
   }
   return correspondence->mUndisplayedCharacters;
 }
 
 /**
- * Traverses the nsTextFrames for an nsSVGTextFrame2 and records a
+ * Traverses the nsTextFrames for an SVGTextFrame and records a
  * TextNodeCorrespondenceProperty on each for the number of undisplayed DOM
  * characters between each frame.  This is done by iterating simultaenously
  * over the nsTextNodes and nsTextFrames and noting when nsTextNodes (or
  * parts of them) are skipped when finding the next nsTextFrame.
  */
 class TextNodeCorrespondenceRecorder
 {
 public:
   /**
    * Entry point for the TextNodeCorrespondenceProperty recording.
    */
-  static void RecordCorrespondence(nsSVGTextFrame2* aRoot);
+  static void RecordCorrespondence(SVGTextFrame* aRoot);
 
 private:
-  TextNodeCorrespondenceRecorder(nsSVGTextFrame2* aRoot)
+  TextNodeCorrespondenceRecorder(SVGTextFrame* aRoot)
     : mNodeIterator(aRoot->GetContent()),
       mPreviousNode(nullptr),
       mNodeCharIndex(0)
   {
   }
 
-  void Record(nsSVGTextFrame2* aRoot);
+  void Record(SVGTextFrame* aRoot);
   void TraverseAndRecord(nsIFrame* aFrame);
 
   /**
    * Returns the next non-empty nsTextNode.
    */
   nsTextNode* NextNode();
 
   /**
@@ -1326,24 +1326,24 @@ private:
 
   /**
    * The index into the current nsTextNode's character content.
    */
   uint32_t mNodeCharIndex;
 };
 
 /* static */ void
-TextNodeCorrespondenceRecorder::RecordCorrespondence(nsSVGTextFrame2* aRoot)
+TextNodeCorrespondenceRecorder::RecordCorrespondence(SVGTextFrame* aRoot)
 {
   TextNodeCorrespondenceRecorder recorder(aRoot);
   recorder.Record(aRoot);
 }
 
 void
-TextNodeCorrespondenceRecorder::Record(nsSVGTextFrame2* aRoot)
+TextNodeCorrespondenceRecorder::Record(SVGTextFrame* aRoot)
 {
   if (!mNodeIterator.Current()) {
     // If there are no nsTextNodes then there is nothing to do.
     return;
   }
 
   // Traverse over all the nsTextFrames and record the number of undisplayed
   // characters.
@@ -1364,17 +1364,17 @@ TextNodeCorrespondenceRecorder::Record(n
     for (nsTextNode* textNode = mNodeIterator.Current();
          textNode;
          textNode = NextNode()) {
       undisplayed += textNode->TextLength();
     }
   }
 
   // Record the trailing number of undisplayed characters on the
-  // nsSVGTextFrame2.
+  // SVGTextFrame.
   aRoot->mTrailingUndisplayedCharacters = undisplayed;
 }
 
 nsTextNode*
 TextNodeCorrespondenceRecorder::NextNode()
 {
   mPreviousNode = mNodeIterator.Current();
   nsTextNode* next;
@@ -1469,71 +1469,71 @@ TextNodeCorrespondenceRecorder::Traverse
   mNodeCharIndex = frame->GetContentEnd();
 }
 
 // ----------------------------------------------------------------------------
 // TextFrameIterator
 
 /**
  * An iterator class for nsTextFrames that are descendants of an
- * nsSVGTextFrame2.  The iterator can optionally track whether the
+ * SVGTextFrame.  The iterator can optionally track whether the
  * current nsTextFrame is for a descendant of, or past, a given subtree
  * content node or frame.  (This functionality is used for example by the SVG
  * DOM text methods to get only the nsTextFrames for a particular <tspan>.)
  *
  * TextFrameIterator also tracks and exposes other information about the
  * current nsTextFrame:
  *
  *   * how many undisplayed characters came just before it
- *   * its position (in app units) relative to the nsSVGTextFrame2's anonymous
+ *   * its position (in app units) relative to the SVGTextFrame's anonymous
  *     block frame
  *   * what nsInlineFrame corresponding to a <textPath> element it is a
  *     descendant of
  *   * what computed dominant-baseline value applies to it
  *
  * Note that any text frames that are empty -- whose ContentLength() is 0 --
  * will be skipped over.
  */
 class TextFrameIterator
 {
 public:
   /**
-   * Constructs a TextFrameIterator for the specified nsSVGTextFrame2
+   * Constructs a TextFrameIterator for the specified SVGTextFrame
    * with an optional frame subtree to restrict iterated text frames to.
    */
-  TextFrameIterator(nsSVGTextFrame2* aRoot, nsIFrame* aSubtree = nullptr)
+  TextFrameIterator(SVGTextFrame* aRoot, nsIFrame* aSubtree = nullptr)
     : mRootFrame(aRoot),
       mSubtree(aSubtree),
       mCurrentFrame(aRoot),
       mCurrentPosition(),
       mSubtreePosition(mSubtree ? eBeforeSubtree : eWithinSubtree)
   {
     Init();
   }
 
   /**
-   * Constructs a TextFrameIterator for the specified nsSVGTextFrame2
+   * Constructs a TextFrameIterator for the specified SVGTextFrame
    * with an optional frame content subtree to restrict iterated text frames to.
    */
-  TextFrameIterator(nsSVGTextFrame2* aRoot, nsIContent* aSubtree)
+  TextFrameIterator(SVGTextFrame* aRoot, nsIContent* aSubtree)
     : mRootFrame(aRoot),
       mSubtree(aRoot && aSubtree && aSubtree != aRoot->GetContent() ?
                  aSubtree->GetPrimaryFrame() :
                  nullptr),
       mCurrentFrame(aRoot),
       mCurrentPosition(),
       mSubtreePosition(mSubtree ? eBeforeSubtree : eWithinSubtree)
   {
     Init();
   }
 
   /**
-   * Returns the root nsSVGTextFrame2 this TextFrameIterator is iterating over.
+   * Returns the root SVGTextFrame this TextFrameIterator is iterating over.
    */
-  nsSVGTextFrame2* Root() const
+  SVGTextFrame* Root() const
   {
     return mRootFrame;
   }
 
   /**
    * Returns the current nsTextFrame.
    */
   nsTextFrame* Current() const
@@ -1544,17 +1544,17 @@ public:
   /**
    * Returns the number of undisplayed characters in the DOM just before the
    * current frame.
    */
   uint32_t UndisplayedCharacters() const;
 
   /**
    * Returns the current frame's position, in app units, relative to the
-   * root nsSVGTextFrame2's anonymous block frame.
+   * root SVGTextFrame's anonymous block frame.
    */
   nsPoint Position() const
   {
     return mCurrentPosition;
   }
 
   /**
    * Advances to the next nsTextFrame and returns it.
@@ -1628,17 +1628,17 @@ private:
   /**
    * Pops the current dominant-baseline off the stack.
    */
   void PopBaseline();
 
   /**
    * The root frame we are iterating through.
    */
-  nsSVGTextFrame2* mRootFrame;
+  SVGTextFrame* mRootFrame;
 
   /**
    * The frame for the subtree we are also interested in tracking.
    */
   nsIFrame* mSubtree;
 
   /**
    * The current value of the iterator.
@@ -1777,17 +1777,17 @@ TextFrameIterator::PopBaseline()
   NS_ASSERTION(!mBaselines.IsEmpty(), "popped too many baselines");
   mBaselines.TruncateLength(mBaselines.Length() - 1);
 }
 
 // -----------------------------------------------------------------------------
 // TextRenderedRunIterator
 
 /**
- * Iterator for TextRenderedRun objects for the nsSVGTextFrame2.
+ * Iterator for TextRenderedRun objects for the SVGTextFrame.
  */
 class TextRenderedRunIterator
 {
 public:
   /**
    * Values for the aFilter argument of the constructor, to indicate which frames
    * we should be limited to iterating TextRenderedRun objects for.
    */
@@ -1798,46 +1798,46 @@ public:
     // visibility:visible.
     eVisibleFrames
   };
 
   /**
    * Constructs a TextRenderedRunIterator with an optional frame subtree to
    * restrict iterated rendered runs to.
    *
-   * @param aSVGTextFrame The nsSVGTextFrame2 whose rendered runs to iterate
+   * @param aSVGTextFrame The SVGTextFrame whose rendered runs to iterate
    *   through.
    * @param aFilter Indicates whether to iterate rendered runs for non-visible
    *   nsTextFrames.
    * @param aSubtree An optional frame subtree to restrict iterated rendered
    *   runs to.
    */
-  TextRenderedRunIterator(nsSVGTextFrame2* aSVGTextFrame,
+  TextRenderedRunIterator(SVGTextFrame* aSVGTextFrame,
                           RenderedRunFilter aFilter = eAllFrames,
                           nsIFrame* aSubtree = nullptr)
     : mFrameIterator(FrameIfAnonymousChildReflowed(aSVGTextFrame), aSubtree),
       mFilter(aFilter),
       mTextElementCharIndex(0),
       mFrameStartTextElementCharIndex(0),
       mFontSizeScaleFactor(aSVGTextFrame->mFontSizeScaleFactor),
       mCurrent(First())
   {
   }
 
   /**
    * Constructs a TextRenderedRunIterator with a content subtree to restrict
    * iterated rendered runs to.
    *
-   * @param aSVGTextFrame The nsSVGTextFrame2 whose rendered runs to iterate
+   * @param aSVGTextFrame The SVGTextFrame whose rendered runs to iterate
    *   through.
    * @param aFilter Indicates whether to iterate rendered runs for non-visible
    *   nsTextFrames.
    * @param aSubtree A content subtree to restrict iterated rendered runs to.
    */
-  TextRenderedRunIterator(nsSVGTextFrame2* aSVGTextFrame,
+  TextRenderedRunIterator(SVGTextFrame* aSVGTextFrame,
                           RenderedRunFilter aFilter,
                           nsIContent* aSubtree)
     : mFrameIterator(FrameIfAnonymousChildReflowed(aSVGTextFrame), aSubtree),
       mFilter(aFilter),
       mTextElementCharIndex(0),
       mFrameStartTextElementCharIndex(0),
       mFontSizeScaleFactor(aSVGTextFrame->mFontSizeScaleFactor),
       mCurrent(First())
@@ -1854,19 +1854,19 @@ public:
 
   /**
    * Advances to the next TextRenderedRun and returns it.
    */
   TextRenderedRun Next();
 
 private:
   /**
-   * Returns the root nsSVGTextFrame2 this iterator is for.
+   * Returns the root SVGTextFrame this iterator is for.
    */
-  nsSVGTextFrame2* Root() const
+  SVGTextFrame* Root() const
   {
     return mFrameIterator.Root();
   }
 
   /**
    * Advances to the first TextRenderedRun and returns it.
    */
   TextRenderedRun First();
@@ -1932,34 +1932,34 @@ TextRenderedRunIterator::Next()
       return mCurrent;
     }
 
     frame = mFrameIterator.Current();
 
     charIndex = mTextElementCharIndex;
 
     // Find the end of the rendered run, by looking through the
-    // nsSVGTextFrame2's positions array until we find one that is recorded
+    // SVGTextFrame's positions array until we find one that is recorded
     // as a run boundary.
     uint32_t runStart, runEnd;  // XXX Replace runStart with mTextElementCharIndex.
     runStart = mTextElementCharIndex;
     runEnd = runStart + 1;
     while (runEnd < Root()->mPositions.Length() &&
            !Root()->mPositions[runEnd].mRunBoundary) {
       runEnd++;
     }
 
     // Convert the global run start/end indexes into an offset/length into the
     // current frame's nsTextNode.
     offset = frame->GetContentOffset() + runStart -
              mFrameStartTextElementCharIndex;
     length = runEnd - runStart;
 
     // If the end of the frame's content comes before the run boundary we found
-    // in nsSVGTextFrame2's position array, we need to shorten the rendered run.
+    // in SVGTextFrame's position array, we need to shorten the rendered run.
     uint32_t contentEnd = frame->GetContentEnd();
     if (offset + length > contentEnd) {
       length = contentEnd - offset;
     }
 
     NS_ASSERTION(offset >= uint32_t(frame->GetContentOffset()), "invalid offset");
     NS_ASSERTION(offset + length <= contentEnd, "invalid offset or length");
 
@@ -2043,17 +2043,17 @@ TextRenderedRunIterator::First()
 
   return Next();
 }
 
 // -----------------------------------------------------------------------------
 // CharIterator
 
 /**
- * Iterator for characters within an nsSVGTextFrame2.
+ * Iterator for characters within an SVGTextFrame.
  */
 class CharIterator
 {
 public:
   /**
    * Values for the aFilter argument of the constructor, to indicate which
    * characters we should be iterating over.
    */
@@ -2071,23 +2071,23 @@ public:
     // Iterate only over characters that are part of a cluster or ligature
     // group but not the first character.
     eClusterOrLigatureGroupMiddle
   };
 
   /**
    * Constructs a CharIterator.
    *
-   * @param aSVGTextFrame The nsSVGTextFrame2 whose characters to iterate
+   * @param aSVGTextFrame The SVGTextFrame whose characters to iterate
    *   through.
    * @param aFilter Indicates which characters to iterate over.
    * @param aSubtree A content subtree to track whether the current character
    *   is within.
    */
-  CharIterator(nsSVGTextFrame2* aSVGTextFrame,
+  CharIterator(SVGTextFrame* aSVGTextFrame,
                CharacterFilter aFilter,
                nsIContent* aSubtree = nullptr);
 
   /**
    * Returns whether the iterator is finished.
    */
   bool AtEnd() const
   {
@@ -2355,17 +2355,17 @@ private:
 
   /**
    * The scale factor to apply to glyph advances returned by
    * GetGlyphAdvance etc. to take into account textLength="".
    */
   float mLengthAdjustScaleFactor;
 };
 
-CharIterator::CharIterator(nsSVGTextFrame2* aSVGTextFrame,
+CharIterator::CharIterator(SVGTextFrame* aSVGTextFrame,
                            CharIterator::CharacterFilter aFilter,
                            nsIContent* aSubtree)
   : mFilter(aFilter),
     mFrameIterator(FrameIfAnonymousChildReflowed(aSVGTextFrame), aSubtree),
     mFrameForTrimCheck(nullptr),
     mTrimmedOffset(0),
     mTrimmedLength(0),
     mTextElementCharIndex(0),
@@ -3044,25 +3044,25 @@ SVGTextContextPaint::Paint::GetPattern(f
   mPatternCache.Put(aOpacity, pattern);
   return pattern.forget();
 }
 
 } // namespace mozilla
 
 
 // ============================================================================
-// nsSVGTextFrame2
+// SVGTextFrame
 
 // ----------------------------------------------------------------------------
 // Display list item
 
 class nsDisplaySVGText : public nsDisplayItem {
 public:
   nsDisplaySVGText(nsDisplayListBuilder* aBuilder,
-                   nsSVGTextFrame2* aFrame)
+                   SVGTextFrame* aFrame)
     : nsDisplayItem(aBuilder, aFrame)
   {
     MOZ_COUNT_CTOR(nsDisplaySVGText);
     NS_ABORT_IF_FALSE(aFrame, "Must have a frame!");
   }
 #ifdef NS_BUILD_REFCNT_LOGGING
   virtual ~nsDisplaySVGText() {
     MOZ_COUNT_DTOR(nsDisplaySVGText);
@@ -3076,17 +3076,17 @@ public:
   virtual void Paint(nsDisplayListBuilder* aBuilder,
                      nsRenderingContext* aCtx);
 };
 
 void
 nsDisplaySVGText::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                           HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
 {
-  nsSVGTextFrame2 *frame = static_cast<nsSVGTextFrame2*>(mFrame);
+  SVGTextFrame *frame = static_cast<SVGTextFrame*>(mFrame);
   nsPoint pointRelativeToReferenceFrame = aRect.Center();
   // ToReferenceFrame() includes frame->GetPosition(), our user space position.
   nsPoint userSpacePt = pointRelativeToReferenceFrame -
                           (ToReferenceFrame() - frame->GetPosition());
 
   nsIFrame* target = frame->GetFrameForPoint(userSpacePt);
   if (target) {
     aOutFrames->AppendElement(target);
@@ -3099,74 +3099,74 @@ nsDisplaySVGText::Paint(nsDisplayListBui
 {
   // 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();
 
   aCtx->PushState();
   aCtx->Translate(offset);
-  static_cast<nsSVGTextFrame2*>(mFrame)->PaintSVG(aCtx, nullptr);
+  static_cast<SVGTextFrame*>(mFrame)->PaintSVG(aCtx, nullptr);
   aCtx->PopState();
 }
 
 // ---------------------------------------------------------------------
 // nsQueryFrame methods
 
-NS_QUERYFRAME_HEAD(nsSVGTextFrame2)
-  NS_QUERYFRAME_ENTRY(nsSVGTextFrame2)
-NS_QUERYFRAME_TAIL_INHERITING(nsSVGTextFrame2Base)
+NS_QUERYFRAME_HEAD(SVGTextFrame)
+  NS_QUERYFRAME_ENTRY(SVGTextFrame)
+NS_QUERYFRAME_TAIL_INHERITING(SVGTextFrameBase)
 
 // ---------------------------------------------------------------------
 // Implementation
 
 nsIFrame*
-NS_NewSVGTextFrame2(nsIPresShell* aPresShell, nsStyleContext* aContext)
+NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
-  return new (aPresShell) nsSVGTextFrame2(aContext);
+  return new (aPresShell) SVGTextFrame(aContext);
 }
 
-NS_IMPL_FRAMEARENA_HELPERS(nsSVGTextFrame2)
+NS_IMPL_FRAMEARENA_HELPERS(SVGTextFrame)
 
 // ---------------------------------------------------------------------
 // nsIFrame methods
 
 void
-nsSVGTextFrame2::Init(nsIContent* aContent,
-                      nsIFrame* aParent,
-                      nsIFrame* aPrevInFlow)
+SVGTextFrame::Init(nsIContent* aContent,
+                   nsIFrame* aParent,
+                   nsIFrame* aPrevInFlow)
 {
   NS_ASSERTION(aContent->IsSVG(nsGkAtoms::text), "Content is not an SVG text");
 
-  nsSVGTextFrame2Base::Init(aContent, aParent, aPrevInFlow);
+  SVGTextFrameBase::Init(aContent, aParent, aPrevInFlow);
   AddStateBits((aParent->GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) |
                NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_SVG_TEXT);
 
   mMutationObserver.StartObserving(this);
 }
 
 void
-nsSVGTextFrame2::BuildDisplayList(nsDisplayListBuilder* aBuilder,
-                                  const nsRect& aDirtyRect,
-                                  const nsDisplayListSet& aLists)
+SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
+                               const nsRect& aDirtyRect,
+                               const nsDisplayListSet& aLists)
 {
   if (NS_SUBTREE_DIRTY(this)) {
     // We can sometimes be asked to paint before reflow happens and we
     // have updated mPositions, etc.  In this case, we just avoid
     // painting.
     return;
   }
   aLists.Content()->AppendNewToTop(
     new (aBuilder) nsDisplaySVGText(aBuilder, this));
 }
 
 NS_IMETHODIMP
-nsSVGTextFrame2::AttributeChanged(int32_t aNameSpaceID,
-                                  nsIAtom* aAttribute,
-                                  int32_t aModType)
+SVGTextFrame::AttributeChanged(int32_t aNameSpaceID,
+                               nsIAtom* aAttribute,
+                               int32_t aModType)
 {
   if (aNameSpaceID != kNameSpaceID_None)
     return NS_OK;
 
   if (aAttribute == nsGkAtoms::transform) {
     // 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
@@ -3183,23 +3183,23 @@ nsSVGTextFrame2::AttributeChanged(int32_
              aAttribute == nsGkAtoms::lengthAdjust) {
     NotifyGlyphMetricsChange();
   }
 
   return NS_OK;
 }
 
 nsIAtom *
-nsSVGTextFrame2::GetType() const
+SVGTextFrame::GetType() const
 {
-  return nsGkAtoms::svgTextFrame2;
+  return nsGkAtoms::svgTextFrame;
 }
 
 void
-nsSVGTextFrame2::DidSetStyleContext(nsStyleContext* aOldStyleContext)
+SVGTextFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
 {
   if (mState & NS_FRAME_IS_NONDISPLAY) {
     // We need this DidSetStyleContext override to handle cases like this:
     //
     //   <defs>
     //     <g>
     //       <mask>
     //         <text>...</text>
@@ -3217,44 +3217,44 @@ nsSVGTextFrame2::DidSetStyleContext(nsSt
     // child to be reflowed when it is next painted, and (b) not cause the
     // <text> to be repainted anyway since the user of the <mask> would not
     // know it needs to be repainted.
     ScheduleReflowSVGNonDisplayText();
   }
 }
 
 void
-nsSVGTextFrame2::ReflowSVGNonDisplayText()
+SVGTextFrame::ReflowSVGNonDisplayText()
 {
   MOZ_ASSERT(nsSVGUtils::AnyOuterSVGIsCallingReflowSVG(this),
              "only call ReflowSVGNonDisplayText when an outer SVG frame is "
              "under ReflowSVG");
   MOZ_ASSERT(mState & NS_FRAME_IS_NONDISPLAY,
              "only call ReflowSVGNonDisplayText if the frame is "
              "NS_FRAME_IS_NONDISPLAY");
 
   // We had a style change, so we mark this frame as dirty so that the next
   // time it is painted, we reflow the anonymous block frame.
   AddStateBits(NS_FRAME_IS_DIRTY);
 
   // We also need to call InvalidateRenderingObservers, so that if the <text>
   // element is within a <mask>, say, the element referencing the <mask> will
-  // be updated, which will then cause this nsSVGTextFrame2 to be painted and
+  // be updated, which will then cause this SVGTextFrame to be painted and
   // in doing so cause the anonymous block frame to be reflowed.
   nsSVGEffects::InvalidateRenderingObservers(this);
 
   // Finally, we need to actually reflow the anonymous block frame and update
   // mPositions, in case we are being reflowed immediately after a DOM
   // mutation that needs frame reconstruction.
   MaybeReflowAnonymousBlockChild();
   UpdateGlyphPositioning();
 }
 
 void
-nsSVGTextFrame2::ScheduleReflowSVGNonDisplayText()
+SVGTextFrame::ScheduleReflowSVGNonDisplayText()
 {
   MOZ_ASSERT(!nsSVGUtils::OuterSVGIsCallingReflowSVG(this),
              "do not call ScheduleReflowSVGNonDisplayText when the outer SVG "
              "frame is under ReflowSVG");
   MOZ_ASSERT(!(mState & NS_STATE_SVG_TEXT_IN_REFLOW),
              "do not call ScheduleReflowSVGNonDisplayText while reflowing the "
              "anonymous block child");
 
@@ -3286,71 +3286,71 @@ nsSVGTextFrame2::ScheduleReflowSVGNonDis
   }
 
   MOZ_ASSERT(f, "should have found an ancestor frame to reflow");
 
   PresContext()->PresShell()->FrameNeedsReflow(
     f, nsIPresShell::eResize, NS_FRAME_HAS_DIRTY_CHILDREN);
 }
 
-NS_IMPL_ISUPPORTS1(nsSVGTextFrame2::MutationObserver, nsIMutationObserver)
+NS_IMPL_ISUPPORTS1(SVGTextFrame::MutationObserver, nsIMutationObserver)
 
 void
-nsSVGTextFrame2::MutationObserver::ContentAppended(nsIDocument* aDocument,
-                                                   nsIContent* aContainer,
-                                                   nsIContent* aFirstNewContent,
-                                                   int32_t aNewIndexInContainer)
+SVGTextFrame::MutationObserver::ContentAppended(nsIDocument* aDocument,
+                                                nsIContent* aContainer,
+                                                nsIContent* aFirstNewContent,
+                                                int32_t aNewIndexInContainer)
 {
   mFrame->NotifyGlyphMetricsChange();
 }
 
 void
-nsSVGTextFrame2::MutationObserver::ContentInserted(
+SVGTextFrame::MutationObserver::ContentInserted(
                                         nsIDocument* aDocument,
                                         nsIContent* aContainer,
                                         nsIContent* aChild,
                                         int32_t aIndexInContainer)
 {
   mFrame->NotifyGlyphMetricsChange();
 }
 
 void
-nsSVGTextFrame2::MutationObserver::ContentRemoved(
+SVGTextFrame::MutationObserver::ContentRemoved(
                                        nsIDocument *aDocument,
                                        nsIContent* aContainer,
                                        nsIContent* aChild,
                                        int32_t aIndexInContainer,
                                        nsIContent* aPreviousSibling)
 {
   mFrame->NotifyGlyphMetricsChange();
 }
 
 void
-nsSVGTextFrame2::MutationObserver::CharacterDataChanged(
+SVGTextFrame::MutationObserver::CharacterDataChanged(
                                                  nsIDocument* aDocument,
                                                  nsIContent* aContent,
                                                  CharacterDataChangeInfo* aInfo)
 {
   mFrame->NotifyGlyphMetricsChange();
 }
 
 void
-nsSVGTextFrame2::MutationObserver::AttributeChanged(
+SVGTextFrame::MutationObserver::AttributeChanged(
                                                 nsIDocument* aDocument,
                                                 mozilla::dom::Element* aElement,
                                                 int32_t aNameSpaceID,
                                                 nsIAtom* aAttribute,
                                                 int32_t aModType)
 {
   if (!aElement->IsSVG()) {
     return;
   }
 
   // Attribute changes on this element are handled in
-  // nsSVGTextFrame2::AttributeChanged.
+  // SVGTextFrame::AttributeChanged.
   if (aElement == mFrame->GetContent()) {
     return;
   }
 
   // Attributes changes on descendent elements.
   if (aElement->Tag() == nsGkAtoms::textPath) {
     if (aNameSpaceID == kNameSpaceID_None &&
         aAttribute == nsGkAtoms::startOffset) {
@@ -3368,17 +3368,17 @@ nsSVGTextFrame2::MutationObserver::Attri
     if (aNameSpaceID == kNameSpaceID_None &&
         IsGlyphPositioningAttribute(aAttribute)) {
       mFrame->NotifyGlyphMetricsChange();
     }
   }
 }
 
 void
-nsSVGTextFrame2::FindCloserFrameForSelection(
+SVGTextFrame::FindCloserFrameForSelection(
                                  nsPoint aPoint,
                                  nsIFrame::FrameWithDistance* aCurrentBestFrame)
 {
   if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) {
     return;
   }
 
   UpdateGlyphPositioning();
@@ -3405,17 +3405,17 @@ nsSVGTextFrame2::FindCloserFrameForSelec
     }
   }
 }
 
 //----------------------------------------------------------------------
 // nsISVGChildFrame methods
 
 void
-nsSVGTextFrame2::NotifySVGChanged(uint32_t aFlags)
+SVGTextFrame::NotifySVGChanged(uint32_t aFlags)
 {
   NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
                     "Invalidation logic may need adjusting");
 
   bool needNewBounds = false;
   bool needGlyphMetricsUpdate = false;
   bool needNewCanvasTM = false;
 
@@ -3516,19 +3516,19 @@ ShouldPaintCaret(const TextRenderedRun& 
                                 aThisRun.mTextFrameContentLength) {
     return true;
   }
 
   return false;
 }
 
 NS_IMETHODIMP
-nsSVGTextFrame2::PaintSVG(nsRenderingContext* aContext,
-                          const nsIntRect *aDirtyRect,
-                          nsIFrame* aTransformRoot)
+SVGTextFrame::PaintSVG(nsRenderingContext* aContext,
+                       const nsIntRect *aDirtyRect,
+                       nsIFrame* aTransformRoot)
 {
   nsIFrame* kid = GetFirstPrincipalChild();
   if (!kid)
     return NS_OK;
 
   nsPresContext* presContext = PresContext();
 
   gfxContext *gfx = aContext->ThebesContext();
@@ -3651,17 +3651,17 @@ nsSVGTextFrame2::PaintSVG(nsRenderingCon
 
     run = it.Next();
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP_(nsIFrame*)
-nsSVGTextFrame2::GetFrameForPoint(const nsPoint& aPoint)
+SVGTextFrame::GetFrameForPoint(const nsPoint& aPoint)
 {
   NS_ASSERTION(GetFirstPrincipalChild(), "must have a child frame");
 
   if (mState & NS_FRAME_IS_NONDISPLAY) {
     // Text frames inside <clipPath> will never have had ReflowSVG called on
     // them, so call UpdateGlyphPositioning to do this now.  (Text frames
     // inside <mask> and other non-display containers will never need to
     // be hit tested.)
@@ -3695,24 +3695,24 @@ nsSVGTextFrame2::GetFrameForPoint(const 
         nsSVGUtils::HitTestClip(this, aPoint)) {
       hit = run.mFrame;
     }
   }
   return hit;
 }
 
 NS_IMETHODIMP_(nsRect)
-nsSVGTextFrame2::GetCoveredRegion()
+SVGTextFrame::GetCoveredRegion()
 {
   return nsSVGUtils::TransformFrameRectToOuterSVG(
            mRect, GetCanvasTM(FOR_OUTERSVG_TM), PresContext());
 }
 
 void
-nsSVGTextFrame2::ReflowSVG()
+SVGTextFrame::ReflowSVG()
 {
   NS_ASSERTION(nsSVGUtils::OuterSVGIsCallingReflowSVG(this),
                "This call is probaby a wasteful mistake");
 
   NS_ABORT_IF_FALSE(!(GetStateBits() & NS_FRAME_IS_NONDISPLAY),
                     "ReflowSVG mechanism not designed for this");
 
   if (!nsSVGUtils::NeedsReflowSVG(this)) {
@@ -3770,17 +3770,17 @@ nsSVGTextFrame2::ReflowSVG()
 
   // Now unset the various reflow bits:
   mState &= ~(NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY |
               NS_FRAME_HAS_DIRTY_CHILDREN);
 
   // XXX nsSVGContainerFrame::ReflowSVG only looks at its nsISVGChildFrame
   // children, and calls ConsiderChildOverflow on them.  Does it matter
   // that ConsiderChildOverflow won't be called on our children?
-  nsSVGTextFrame2Base::ReflowSVG();
+  SVGTextFrameBase::ReflowSVG();
 }
 
 /**
  * Converts nsSVGUtils::eBBox* flags into TextRenderedRun flags appropriate
  * for the specified rendered run.
  */
 static uint32_t
 TextRenderedRunFlagsForBBoxContribution(const TextRenderedRun& aRun,
@@ -3796,18 +3796,18 @@ TextRenderedRunFlagsForBBoxContribution(
       ((aBBoxFlags & nsSVGUtils::eBBoxIncludeStroke) &&
        nsSVGUtils::HasStroke(aRun.mFrame))) {
     flags |= TextRenderedRun::eIncludeStroke;
   }
   return flags;
 }
 
 SVGBBox
-nsSVGTextFrame2::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace,
-                                     uint32_t aFlags)
+SVGTextFrame::GetBBoxContribution(const gfxMatrix &aToBBoxUserspace,
+                                  uint32_t aFlags)
 {
   NS_ASSERTION(GetFirstPrincipalChild(), "must have a child frame");
 
   UpdateGlyphPositioning();
 
   SVGBBox bbox;
   nsPresContext* presContext = PresContext();
 
@@ -3821,17 +3821,17 @@ nsSVGTextFrame2::GetBBoxContribution(con
 
   return bbox;
 }
 
 //----------------------------------------------------------------------
 // nsSVGContainerFrame methods
 
 gfxMatrix
-nsSVGTextFrame2::GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot)
+SVGTextFrame::GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot)
 {
   if (!(GetStateBits() & NS_FRAME_IS_NONDISPLAY) &&
       !aTransformRoot) {
     if ((aFor == FOR_PAINTING && NS_SVGDisplayListPaintingEnabled()) ||
         (aFor == FOR_HIT_TESTING && NS_SVGDisplayListHitTestingEnabled())) {
       return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(this);
     }
   }
@@ -3850,17 +3850,17 @@ nsSVGTextFrame2::GetCanvasTM(uint32_t aF
                                  parent->GetCanvasTM(aFor, aTransformRoot));
 
     mCanvasTM = new gfxMatrix(tm);
   }
   return *mCanvasTM;
 }
 
 //----------------------------------------------------------------------
-// nsSVGTextFrame2 SVG DOM methods
+// SVGTextFrame SVG DOM methods
 
 /**
  * Returns whether the specified node has any non-empty nsTextNodes
  * beneath it.
  */
 static bool
 HasTextContent(nsIContent* aContent)
 {
@@ -3887,17 +3887,17 @@ GetTextContentLength(nsIContent* aConten
   TextNodeIterator it(aContent);
   for (nsTextNode* text = it.Current(); text; text = it.Next()) {
     length += text->TextLength();
   }
   return length;
 }
 
 int32_t
-nsSVGTextFrame2::ConvertTextElementCharIndexToAddressableIndex(
+SVGTextFrame::ConvertTextElementCharIndexToAddressableIndex(
                                                            int32_t aIndex,
                                                            nsIContent* aContent)
 {
   CharIterator it(this, CharIterator::eOriginal, aContent);
   if (!it.AdvanceToSubtree()) {
     return -1;
   }
   int32_t result = 0;
@@ -3919,17 +3919,17 @@ nsSVGTextFrame2::ConvertTextElementCharI
   return -1;
 }
 
 /**
  * Implements the SVG DOM GetNumberOfChars method for the specified
  * text content element.
  */
 uint32_t
-nsSVGTextFrame2::GetNumberOfChars(nsIContent* aContent)
+SVGTextFrame::GetNumberOfChars(nsIContent* aContent)
 {
   UpdateGlyphPositioning();
 
   uint32_t n = 0;
   CharIterator it(this, CharIterator::eAddressable, aContent);
   if (it.AdvanceToSubtree()) {
     while (!it.AtEnd() && it.IsWithinSubtree()) {
       n++;
@@ -3939,17 +3939,17 @@ nsSVGTextFrame2::GetNumberOfChars(nsICon
   return n;
 }
 
 /**
  * Implements the SVG DOM GetComputedTextLength method for the specified
  * text child element.
  */
 float
-nsSVGTextFrame2::GetComputedTextLength(nsIContent* aContent)
+SVGTextFrame::GetComputedTextLength(nsIContent* aContent)
 {
   UpdateGlyphPositioning();
 
   float cssPxPerDevPx = PresContext()->
     AppUnitsToFloatCSSPixels(PresContext()->AppUnitsPerDevPixel());
 
   nscoord length = 0;
   TextRenderedRunIterator it(this, TextRenderedRunIterator::eAllFrames,
@@ -3962,18 +3962,18 @@ nsSVGTextFrame2::GetComputedTextLength(n
            cssPxPerDevPx * mLengthAdjustScaleFactor / mFontSizeScaleFactor;
 }
 
 /**
  * Implements the SVG DOM SelectSubString method for the specified
  * text content element.
  */
 nsresult
-nsSVGTextFrame2::SelectSubString(nsIContent* aContent,
-                                 uint32_t charnum, uint32_t nchars)
+SVGTextFrame::SelectSubString(nsIContent* aContent,
+                              uint32_t charnum, uint32_t nchars)
 {
   UpdateGlyphPositioning();
 
   // Convert charnum/nchars from addressable characters relative to
   // aContent to global character indices.
   CharIterator chit(this, CharIterator::eAddressable, aContent);
   if (!chit.AdvanceToSubtree() ||
       !chit.Next(charnum) ||
@@ -3994,19 +3994,19 @@ nsSVGTextFrame2::SelectSubString(nsICont
   return NS_OK;
 }
 
 /**
  * Implements the SVG DOM GetSubStringLength method for the specified
  * text content element.
  */
 nsresult
-nsSVGTextFrame2::GetSubStringLength(nsIContent* aContent,
-                                    uint32_t charnum, uint32_t nchars,
-                                    float* aResult)
+SVGTextFrame::GetSubStringLength(nsIContent* aContent,
+                                 uint32_t charnum, uint32_t nchars,
+                                 float* aResult)
 {
   UpdateGlyphPositioning();
 
   // Convert charnum/nchars from addressable characters relative to
   // aContent to global character indices.
   CharIterator chit(this, CharIterator::eAddressable, aContent);
   if (!chit.AdvanceToSubtree() ||
       !chit.Next(charnum) ||
@@ -4068,18 +4068,18 @@ nsSVGTextFrame2::GetSubStringLength(nsIC
   return NS_OK;
 }
 
 /**
  * Implements the SVG DOM GetCharNumAtPosition method for the specified
  * text content element.
  */
 int32_t
-nsSVGTextFrame2::GetCharNumAtPosition(nsIContent* aContent,
-                                      mozilla::nsISVGPoint* aPoint)
+SVGTextFrame::GetCharNumAtPosition(nsIContent* aContent,
+                                   mozilla::nsISVGPoint* aPoint)
 {
   UpdateGlyphPositioning();
 
   nsPresContext* context = PresContext();
 
   gfxPoint p(aPoint->X(), aPoint->Y());
 
   int32_t result = -1;
@@ -4100,19 +4100,19 @@ nsSVGTextFrame2::GetCharNumAtPosition(ns
   return ConvertTextElementCharIndexToAddressableIndex(result, aContent);
 }
 
 /**
  * Implements the SVG DOM GetStartPositionOfChar method for the specified
  * text content element.
  */
 nsresult
-nsSVGTextFrame2::GetStartPositionOfChar(nsIContent* aContent,
-                                        uint32_t aCharNum,
-                                        mozilla::nsISVGPoint** aResult)
+SVGTextFrame::GetStartPositionOfChar(nsIContent* aContent,
+                                     uint32_t aCharNum,
+                                     mozilla::nsISVGPoint** aResult)
 {
   UpdateGlyphPositioning();
 
   CharIterator it(this, CharIterator::eAddressable, aContent);
   if (!it.AdvanceToSubtree() ||
       !it.Next(aCharNum)) {
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   }
@@ -4124,19 +4124,19 @@ nsSVGTextFrame2::GetStartPositionOfChar(
   return NS_OK;
 }
 
 /**
  * Implements the SVG DOM GetEndPositionOfChar method for the specified
  * text content element.
  */
 nsresult
-nsSVGTextFrame2::GetEndPositionOfChar(nsIContent* aContent,
-                                      uint32_t aCharNum,
-                                      mozilla::nsISVGPoint** aResult)
+SVGTextFrame::GetEndPositionOfChar(nsIContent* aContent,
+                                   uint32_t aCharNum,
+                                   mozilla::nsISVGPoint** aResult)
 {
   UpdateGlyphPositioning();
 
   CharIterator it(this, CharIterator::eAddressable, aContent);
   if (!it.AdvanceToSubtree() ||
       !it.Next(aCharNum)) {
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   }
@@ -4161,19 +4161,19 @@ nsSVGTextFrame2::GetEndPositionOfChar(ns
   return NS_OK;
 }
 
 /**
  * Implements the SVG DOM GetExtentOfChar method for the specified
  * text content element.
  */
 nsresult
-nsSVGTextFrame2::GetExtentOfChar(nsIContent* aContent,
-                                 uint32_t aCharNum,
-                                 dom::SVGIRect** aResult)
+SVGTextFrame::GetExtentOfChar(nsIContent* aContent,
+                              uint32_t aCharNum,
+                              dom::SVGIRect** aResult)
 {
   UpdateGlyphPositioning();
 
   CharIterator it(this, CharIterator::eAddressable, aContent);
   if (!it.AdvanceToSubtree() ||
       !it.Next(aCharNum)) {
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   }
@@ -4212,34 +4212,34 @@ nsSVGTextFrame2::GetExtentOfChar(nsICont
   return NS_OK;
 }
 
 /**
  * Implements the SVG DOM GetRotationOfChar method for the specified
  * text content element.
  */
 nsresult
-nsSVGTextFrame2::GetRotationOfChar(nsIContent* aContent,
-                                   uint32_t aCharNum,
-                                   float* aResult)
+SVGTextFrame::GetRotationOfChar(nsIContent* aContent,
+                                uint32_t aCharNum,
+                                float* aResult)
 {
   UpdateGlyphPositioning();
 
   CharIterator it(this, CharIterator::eAddressable, aContent);
   if (!it.AdvanceToSubtree() ||
       !it.Next(aCharNum)) {
     return NS_ERROR_DOM_INDEX_SIZE_ERR;
   }
 
   *aResult = mPositions[it.TextElementCharIndex()].mAngle * 180.0 / M_PI;
   return NS_OK;
 }
 
 //----------------------------------------------------------------------
-// nsSVGTextFrame2 text layout methods
+// SVGTextFrame text layout methods
 
 /**
  * Given the character position array before values have been filled in
  * to any unspecified positions, and an array of dx/dy values, returns whether
  * a character at a given index should start a new rendered run.
  *
  * @param aPositions The array of character positions before unspecified
  *   positions have been filled in and dx/dy values have been added to them.
@@ -4279,21 +4279,21 @@ ShouldStartRunAtIndex(const nsTArray<Cha
       return true;
     }
   }
 
   return false;
 }
 
 uint32_t
-nsSVGTextFrame2::ResolvePositions(nsIContent* aContent,
-                                  uint32_t aIndex,
-                                  bool aInTextPath,
-                                  bool& aForceStartOfChunk,
-                                  nsTArray<gfxPoint>& aDeltas)
+SVGTextFrame::ResolvePositions(nsIContent* aContent,
+                               uint32_t aIndex,
+                               bool aInTextPath,
+                               bool& aForceStartOfChunk,
+                               nsTArray<gfxPoint>& aDeltas)
 {
   if (aContent->IsNodeOfType(nsINode::eTEXT)) {
     // We found a text node.
     uint32_t length = static_cast<nsTextNode*>(aContent)->TextLength();
     if (length) {
       if (aForceStartOfChunk) {
         // Note this character as starting a new anchored chunk.
         mPositions[aIndex].mStartOfChunk = true;
@@ -4430,18 +4430,18 @@ nsSVGTextFrame2::ResolvePositions(nsICon
     // Force a new anchored chunk just after a <textPath>.
     aForceStartOfChunk = true;
   }
 
   return aIndex;
 }
 
 bool
-nsSVGTextFrame2::ResolvePositions(nsTArray<gfxPoint>& aDeltas,
-                                  bool aRunPerGlyph)
+SVGTextFrame::ResolvePositions(nsTArray<gfxPoint>& aDeltas,
+                               bool aRunPerGlyph)
 {
   NS_ASSERTION(mPositions.IsEmpty(), "expected mPositions to be empty");
   RemoveStateBits(NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES);
 
   CharIterator it(this, CharIterator::eOriginal);
   if (it.AtEnd()) {
     return false;
   }
@@ -4467,17 +4467,17 @@ nsSVGTextFrame2::ResolvePositions(nsTArr
 
   // Recurse over the content and fill in character positions as we go.
   bool forceStartOfChunk = false;
   return ResolvePositions(mContent, 0, aRunPerGlyph,
                           forceStartOfChunk, aDeltas) != 0;
 }
 
 void
-nsSVGTextFrame2::DetermineCharPositions(nsTArray<nsPoint>& aPositions)
+SVGTextFrame::DetermineCharPositions(nsTArray<nsPoint>& aPositions)
 {
   NS_ASSERTION(aPositions.IsEmpty(), "expected aPositions to be empty");
 
   nsPoint position, lastPosition;
 
   TextFrameIterator frit(this);
   for (nsTextFrame* frame = frit.Current(); frame; frame = frit.Next()) {
     gfxSkipCharsIterator it = frame->EnsureTextRun(nsTextFrame::eInflated);
@@ -4605,17 +4605,17 @@ ShiftAnchoredChunk(nsTArray<mozilla::Cha
   if (shift != 0.0) {
     for (uint32_t i = aChunkStart; i < aChunkEnd; i++) {
       aCharPositions[i].mPosition.x += shift;
     }
   }
 }
 
 void
-nsSVGTextFrame2::AdjustChunksForLineBreaks()
+SVGTextFrame::AdjustChunksForLineBreaks()
 {
   nsBlockFrame* block = nsLayoutUtils::GetAsBlock(GetFirstPrincipalChild());
   NS_ASSERTION(block, "expected block frame");
 
   nsBlockFrame::line_iterator line = block->begin_lines();
 
   CharIterator it(this, CharIterator::eOriginal);
   while (!it.AtEnd() && line != block->end_lines()) {
@@ -4623,17 +4623,17 @@ nsSVGTextFrame2::AdjustChunksForLineBrea
       mPositions[it.TextElementCharIndex()].mStartOfChunk = true;
       line++;
     }
     it.AdvancePastCurrentFrame();
   }
 }
 
 void
-nsSVGTextFrame2::AdjustPositionsForClusters()
+SVGTextFrame::AdjustPositionsForClusters()
 {
   nsPresContext* presContext = PresContext();
 
   CharIterator it(this, CharIterator::eClusterOrLigatureGroupMiddle);
   while (!it.AtEnd()) {
     // Find the start of the cluster/ligature group.
     uint32_t charIndex = it.TextElementCharIndex();
     uint32_t startIndex = it.GlyphStartTextElementCharIndex();
@@ -4681,17 +4681,17 @@ nsSVGTextFrame2::AdjustPositionsForClust
       }
     }
 
     it.Next();
   }
 }
 
 nsIFrame*
-nsSVGTextFrame2::GetTextPathPathFrame(nsIFrame* aTextPathFrame)
+SVGTextFrame::GetTextPathPathFrame(nsIFrame* aTextPathFrame)
 {
   nsSVGTextPathProperty *property = static_cast<nsSVGTextPathProperty*>
     (aTextPathFrame->Properties().Get(nsSVGEffects::HrefProperty()));
 
   if (!property) {
     nsIContent* content = aTextPathFrame->GetContent();
     dom::SVGTextPathElement* tp = static_cast<dom::SVGTextPathElement*>(content);
     nsAutoString href;
@@ -4710,17 +4710,17 @@ nsSVGTextFrame2::GetTextPathPathFrame(ns
     if (!property)
       return nullptr;
   }
 
   return property->GetReferencedFrame(nsGkAtoms::svgPathGeometryFrame, nullptr);
 }
 
 TemporaryRef<Path>
-nsSVGTextFrame2::GetTextPath(nsIFrame* aTextPathFrame)
+SVGTextFrame::GetTextPath(nsIFrame* aTextPathFrame)
 {
   nsIFrame *pathFrame = GetTextPathPathFrame(aTextPathFrame);
 
   if (!pathFrame) {
     return nullptr;
   }
 
   nsSVGPathGeometryElement *element =
@@ -4737,45 +4737,45 @@ nsSVGTextFrame2::GetTextPath(nsIFrame* a
       path->TransformedCopyToBuilder(ToMatrix(matrix));
     path = builder->Finish();
   }
 
   return path.forget();
 }
 
 gfxFloat
-nsSVGTextFrame2::GetOffsetScale(nsIFrame* aTextPathFrame)
+SVGTextFrame::GetOffsetScale(nsIFrame* aTextPathFrame)
 {
   nsIFrame *pathFrame = GetTextPathPathFrame(aTextPathFrame);
   if (!pathFrame)
     return 1.0;
 
   return static_cast<dom::SVGPathElement*>(pathFrame->GetContent())->
     GetPathLengthScale(dom::SVGPathElement::eForTextPath);
 }
 
 gfxFloat
-nsSVGTextFrame2::GetStartOffset(nsIFrame* aTextPathFrame)
+SVGTextFrame::GetStartOffset(nsIFrame* aTextPathFrame)
 {
   dom::SVGTextPathElement *tp =
     static_cast<dom::SVGTextPathElement*>(aTextPathFrame->GetContent());
   nsSVGLength2 *length =
     &tp->mLengthAttributes[dom::SVGTextPathElement::STARTOFFSET];
 
   if (length->IsPercentage()) {
     RefPtr<Path> data = GetTextPath(aTextPathFrame);
     return data ?
       length->GetAnimValInSpecifiedUnits() * data->ComputeLength() / 100.0 :
       0.0;
   }
   return length->GetAnimValue(tp) * GetOffsetScale(aTextPathFrame);
 }
 
 void
-nsSVGTextFrame2::DoTextPathLayout()
+SVGTextFrame::DoTextPathLayout()
 {
   nsPresContext* context = PresContext();
 
   CharIterator it(this, CharIterator::eClusterAndLigatureGroupStart);
   while (!it.AtEnd()) {
     nsIFrame* textPathFrame = it.TextPathFrame();
     if (!textPathFrame) {
       // Skip past this frame if we're not in a text path.
@@ -4830,17 +4830,17 @@ nsSVGTextFrame2::DoTextPathLayout()
       }
       it.Next();
     } while (it.TextPathFrame() &&
              it.TextPathFrame()->GetContent() == textPath);
   }
 }
 
 void
-nsSVGTextFrame2::DoAnchoring()
+SVGTextFrame::DoAnchoring()
 {
   nsPresContext* presContext = PresContext();
 
   CharIterator it(this, CharIterator::eOriginal);
 
   // Don't need to worry about skipped or trimmed characters.
   while (!it.AtEnd() &&
          (it.IsOriginalCharSkipped() || it.IsOriginalCharTrimmed())) {
@@ -4883,17 +4883,17 @@ nsSVGTextFrame2::DoAnchoring()
       ShiftAnchoredChunk(mPositions, start, end, left, right, anchor);
     }
 
     start = it.TextElementCharIndex();
   }
 }
 
 void
-nsSVGTextFrame2::DoGlyphPositioning()
+SVGTextFrame::DoGlyphPositioning()
 {
   mPositions.Clear();
   RemoveStateBits(NS_STATE_SVG_POSITIONING_DIRTY);
 
   nsIFrame* kid = GetFirstPrincipalChild();
   if (kid && NS_SUBTREE_DIRTY(kid)) {
     MOZ_ASSERT(false, "should have already reflowed the kid");
     return;
@@ -5028,19 +5028,19 @@ nsSVGTextFrame2::DoGlyphPositioning()
 
   AdjustChunksForLineBreaks();
   AdjustPositionsForClusters();
   DoAnchoring();
   DoTextPathLayout();
 }
 
 bool
-nsSVGTextFrame2::ShouldRenderAsPath(nsRenderingContext* aContext,
-                                    nsTextFrame* aFrame,
-                                    bool& aShouldPaintSVGGlyphs)
+SVGTextFrame::ShouldRenderAsPath(nsRenderingContext* aContext,
+                                 nsTextFrame* aFrame,
+                                 bool& aShouldPaintSVGGlyphs)
 {
   // Rendering to a clip path.
   if (SVGAutoRenderState::GetRenderMode(aContext) != SVGAutoRenderState::NORMAL) {
     aShouldPaintSVGGlyphs = false;
     return true;
   }
 
   aShouldPaintSVGGlyphs = true;
@@ -5062,48 +5062,48 @@ nsSVGTextFrame2::ShouldRenderAsPath(nsRe
                                     style->mStrokeWidth) > 0) {
     return true;
   }
 
   return false;
 }
 
 void
-nsSVGTextFrame2::ScheduleReflowSVG()
+SVGTextFrame::ScheduleReflowSVG()
 {
   if (mState & NS_FRAME_IS_NONDISPLAY) {
     ScheduleReflowSVGNonDisplayText();
   } else {
     nsSVGUtils::ScheduleReflowSVG(this);
   }
 }
 
 void
-nsSVGTextFrame2::NotifyGlyphMetricsChange()
+SVGTextFrame::NotifyGlyphMetricsChange()
 {
   AddStateBits(NS_STATE_SVG_POSITIONING_DIRTY);
   nsSVGEffects::InvalidateRenderingObservers(this);
   ScheduleReflowSVG();
 }
 
 void
-nsSVGTextFrame2::UpdateGlyphPositioning()
+SVGTextFrame::UpdateGlyphPositioning()
 {
   nsIFrame* kid = GetFirstPrincipalChild();
   if (!kid) {
     return;
   }
 
   if (mState & NS_STATE_SVG_POSITIONING_DIRTY) {
     DoGlyphPositioning();
   }
 }
 
 void
-nsSVGTextFrame2::MaybeReflowAnonymousBlockChild()
+SVGTextFrame::MaybeReflowAnonymousBlockChild()
 {
   nsIFrame* kid = GetFirstPrincipalChild();
   if (!kid)
     return;
 
   NS_ASSERTION(!(kid->GetStateBits() & NS_FRAME_IN_REFLOW),
                "should not be in reflow when about to reflow again");
 
@@ -5118,26 +5118,26 @@ nsSVGTextFrame2::MaybeReflowAnonymousBlo
     MOZ_ASSERT(nsSVGUtils::AnyOuterSVGIsCallingReflowSVG(this),
                "should be under ReflowSVG");
     nsPresContext::InterruptPreventer noInterrupts(PresContext());
     DoReflow();
   }
 }
 
 void
-nsSVGTextFrame2::DoReflow()
+SVGTextFrame::DoReflow()
 {
   // Since we are going to reflow the anonymous block frame, we will
   // need to update mPositions.
   AddStateBits(NS_STATE_SVG_POSITIONING_DIRTY);
 
   if (mState & NS_FRAME_IS_NONDISPLAY) {
     // Normally, these dirty flags would be cleared in ReflowSVG(), but that
     // doesn't get called for non-display frames. We don't want to reflow our
-    // descendants every time nsSVGTextFrame2::PaintSVG makes sure that we have
+    // descendants every time SVGTextFrame::PaintSVG makes sure that we have
     // valid positions by calling UpdateGlyphPositioning(), so we need to clear
     // these dirty bits. Note that this also breaks an invalidation loop where
     // our descendants invalidate as they reflow, which invalidates rendering
     // observers, which reschedules the frame that is currently painting by
     // referencing us to paint again. See bug 839958 comment 7. Hopefully we
     // will break that loop more convincingly at some point.
     mState &= ~(NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN);
   }
@@ -5185,17 +5185,17 @@ nsSVGTextFrame2::DoReflow()
 }
 
 // Usable font size range in devpixels / user-units
 #define CLAMP_MIN_SIZE 8.0
 #define CLAMP_MAX_SIZE 200.0
 #define PRECISE_SIZE   200.0
 
 bool
-nsSVGTextFrame2::UpdateFontSizeScaleFactor()
+SVGTextFrame::UpdateFontSizeScaleFactor()
 {
   double oldFontSizeScaleFactor = mFontSizeScaleFactor;
 
   nsPresContext* presContext = PresContext();
 
   bool geometricPrecision = false;
   nscoord min = nscoord_MAX,
           max = nscoord_MIN;
@@ -5275,33 +5275,33 @@ nsSVGTextFrame2::UpdateFontSizeScaleFact
   } else {
     mFontSizeScaleFactor = CLAMP_MAX_SIZE / maxTextRunSize;
   }
 
   return mFontSizeScaleFactor != oldFontSizeScaleFactor;
 }
 
 double
-nsSVGTextFrame2::GetFontSizeScaleFactor() const
+SVGTextFrame::GetFontSizeScaleFactor() const
 {
   return mFontSizeScaleFactor;
 }
 
 /**
  * Take aPoint, which is in the <text> element's user space, and convert
  * it to the appropriate frame user space of aChildFrame according to
  * which rendered run the point hits.
  */
 gfxPoint
-nsSVGTextFrame2::TransformFramePointToTextChild(const gfxPoint& aPoint,
-                                                nsIFrame* aChildFrame)
+SVGTextFrame::TransformFramePointToTextChild(const gfxPoint& aPoint,
+                                             nsIFrame* aChildFrame)
 {
   NS_ASSERTION(aChildFrame &&
                nsLayoutUtils::GetClosestFrameOfType
-                 (aChildFrame->GetParent(), nsGkAtoms::svgTextFrame2) == this,
+                 (aChildFrame->GetParent(), nsGkAtoms::svgTextFrame) == this,
                "aChildFrame must be a descendant of this frame");
 
   UpdateGlyphPositioning();
 
   nsPresContext* presContext = PresContext();
 
   // Add in the mRect offset to aPoint, as that will have been taken into
   // account when transforming the point from the ancestor frame down
@@ -5363,22 +5363,22 @@ nsSVGTextFrame2::TransformFramePointToTe
 /**
  * For each rendered run for frames beneath aChildFrame, convert aRect
  * into the run's frame user space and intersect it with the run's
  * frame user space rectangle.  For each of these intersections,
  * then translate them up into aChildFrame's coordinate space
  * and union them all together.
  */
 gfxRect
-nsSVGTextFrame2::TransformFrameRectToTextChild(const gfxRect& aRect,
-                                               nsIFrame* aChildFrame)
+SVGTextFrame::TransformFrameRectToTextChild(const gfxRect& aRect,
+                                            nsIFrame* aChildFrame)
 {
   NS_ASSERTION(aChildFrame &&
                nsLayoutUtils::GetClosestFrameOfType
-                 (aChildFrame->GetParent(), nsGkAtoms::svgTextFrame2) == this,
+                 (aChildFrame->GetParent(), nsGkAtoms::svgTextFrame) == this,
                "aChildFrame must be a descendant of this frame");
 
   UpdateGlyphPositioning();
 
   nsPresContext* presContext = PresContext();
 
   // Add in the mRect offset to aRect, as that will have been taken into
   // account when transforming the rect from the ancestor frame down
@@ -5440,22 +5440,22 @@ nsSVGTextFrame2::TransformFrameRectToTex
 /**
  * For each rendered run beneath aChildFrame, translate aRect from
  * aChildFrame to the run's text frame, transform it then into
  * the run's frame user space, intersect it with the run's
  * frame user space rect, then transform it up to user space.
  * The result is the union of all of these.
  */
 gfxRect
-nsSVGTextFrame2::TransformFrameRectFromTextChild(const nsRect& aRect,
-                                                 nsIFrame* aChildFrame)
+SVGTextFrame::TransformFrameRectFromTextChild(const nsRect& aRect,
+                                              nsIFrame* aChildFrame)
 {
   NS_ASSERTION(aChildFrame &&
                nsLayoutUtils::GetClosestFrameOfType
-                 (aChildFrame->GetParent(), nsGkAtoms::svgTextFrame2) == this,
+                 (aChildFrame->GetParent(), nsGkAtoms::svgTextFrame) == this,
                "aChildFrame must be a descendant of this frame");
 
   UpdateGlyphPositioning();
 
   nsPresContext* presContext = PresContext();
 
   gfxRect result;
   TextRenderedRunIterator it(this, TextRenderedRunIterator::eAllFrames,
@@ -5494,20 +5494,20 @@ nsSVGTextFrame2::TransformFrameRectFromT
   float factor = presContext->AppUnitsPerCSSPixel();
   gfxPoint framePosition(NSAppUnitsToFloatPixels(mRect.x, factor),
                          NSAppUnitsToFloatPixels(mRect.y, factor));
 
   return result - framePosition;
 }
 
 DrawMode
-nsSVGTextFrame2::SetupCairoState(gfxContext* aContext,
-                                 nsIFrame* aFrame,
-                                 gfxTextContextPaint* aOuterContextPaint,
-                                 gfxTextContextPaint** aThisContextPaint)
+SVGTextFrame::SetupCairoState(gfxContext* aContext,
+                              nsIFrame* aFrame,
+                              gfxTextContextPaint* aOuterContextPaint,
+                              gfxTextContextPaint** aThisContextPaint)
 {
   DrawMode toDraw = DrawMode(0);
   SVGTextContextPaint *thisContextPaint = new SVGTextContextPaint();
 
   if (SetupCairoStroke(aContext, aFrame, aOuterContextPaint, thisContextPaint)) {
     toDraw = DrawMode(int(toDraw) | int(DrawMode::GLYPH_STROKE));
   }
 
@@ -5516,20 +5516,20 @@ nsSVGTextFrame2::SetupCairoState(gfxCont
   }
 
   *aThisContextPaint = thisContextPaint;
 
   return toDraw;
 }
 
 bool
-nsSVGTextFrame2::SetupCairoStroke(gfxContext* aContext,
-                                  nsIFrame* aFrame,
-                                  gfxTextContextPaint* aOuterContextPaint,
-                                  SVGTextContextPaint* aThisContextPaint)
+SVGTextFrame::SetupCairoStroke(gfxContext* aContext,
+                               nsIFrame* aFrame,
+                               gfxTextContextPaint* aOuterContextPaint,
+                               SVGTextContextPaint* aThisContextPaint)
 {
   const nsStyleSVG *style = aFrame->StyleSVG();
   if (style->mStroke.mType == eStyleSVGPaintType_None) {
     aThisContextPaint->SetStrokeOpacity(0.0f);
     return false;
   }
 
   nsSVGUtils::SetupCairoStrokeGeometry(aFrame, aContext, aOuterContextPaint);
@@ -5542,20 +5542,20 @@ nsSVGTextFrame2::SetupCairoStroke(gfxCon
                         nsSVGEffects::StrokeProperty());
 
   aThisContextPaint->SetStrokeOpacity(opacity);
 
   return opacity != 0.0f;
 }
 
 bool
-nsSVGTextFrame2::SetupCairoFill(gfxContext* aContext,
-                                nsIFrame* aFrame,
-                                gfxTextContextPaint* aOuterContextPaint,
-                                SVGTextContextPaint* aThisContextPaint)
+SVGTextFrame::SetupCairoFill(gfxContext* aContext,
+                             nsIFrame* aFrame,
+                             gfxTextContextPaint* aOuterContextPaint,
+                             SVGTextContextPaint* aThisContextPaint)
 {
   const nsStyleSVG *style = aFrame->StyleSVG();
   if (style->mFill.mType == eStyleSVGPaintType_None) {
     aThisContextPaint->SetFillOpacity(0.0f);
     return false;
   }
 
   float opacity = nsSVGUtils::GetOpacity(style->mFillOpacitySource,
@@ -5567,23 +5567,23 @@ nsSVGTextFrame2::SetupCairoFill(gfxConte
                         nsSVGEffects::FillProperty());
 
   aThisContextPaint->SetFillOpacity(opacity);
 
   return true;
 }
 
 void
-nsSVGTextFrame2::SetupInheritablePaint(gfxContext* aContext,
-                                       nsIFrame* aFrame,
-                                       float& aOpacity,
-                                       gfxTextContextPaint* aOuterContextPaint,
-                                       SVGTextContextPaint::Paint& aTargetPaint,
-                                       nsStyleSVGPaint nsStyleSVG::*aFillOrStroke,
-                                       const FramePropertyDescriptor* aProperty)
+SVGTextFrame::SetupInheritablePaint(gfxContext* aContext,
+                                    nsIFrame* aFrame,
+                                    float& aOpacity,
+                                    gfxTextContextPaint* aOuterContextPaint,
+                                    SVGTextContextPaint::Paint& aTargetPaint,
+                                    nsStyleSVGPaint nsStyleSVG::*aFillOrStroke,
+                                    const FramePropertyDescriptor* aProperty)
 {
   const nsStyleSVG *style = aFrame->StyleSVG();
   nsSVGPaintServerFrame *ps =
     nsSVGEffects::GetPaintServer(aFrame, &(style->*aFillOrStroke), aProperty);
 
   if (ps && ps->SetupPaintServer(aContext, aFrame, aFillOrStroke, aOpacity)) {
     aTargetPaint.SetPaintServer(aFrame, aContext->CurrentMatrix(), ps);
   } else if (SetupContextPaint(aContext, aFrame, aFillOrStroke, aOpacity, aOuterContextPaint)) {
@@ -5599,21 +5599,21 @@ nsSVGTextFrame2::SetupInheritablePaint(g
                              NS_GET_G(color) / 255.0,
                              NS_GET_B(color) / 255.0,
                              NS_GET_A(color) / 255.0 * aOpacity));
     aContext->SetPattern(pattern);
   }
 }
 
 bool
-nsSVGTextFrame2::SetupContextPaint(gfxContext* aContext,
-                                   nsIFrame* aFrame,
-                                   nsStyleSVGPaint nsStyleSVG::*aFillOrStroke,
-                                   float& aOpacity,
-                                   gfxTextContextPaint* aOuterContextPaint)
+SVGTextFrame::SetupContextPaint(gfxContext* aContext,
+                                nsIFrame* aFrame,
+                                nsStyleSVGPaint nsStyleSVG::*aFillOrStroke,
+                                float& aOpacity,
+                                gfxTextContextPaint* aOuterContextPaint)
 {
   if (!aOuterContextPaint) {
     return false;
   }
 
   const nsStyleSVG *style = aFrame->StyleSVG();
   const nsStyleSVGPaint &paint = style->*aFillOrStroke;
 
rename from layout/svg/nsSVGTextFrame2.h
rename to layout/svg/SVGTextFrame.h
--- a/layout/svg/nsSVGTextFrame2.h
+++ b/layout/svg/SVGTextFrame.h
@@ -1,32 +1,32 @@
 /* -*- 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_SVGTEXTFRAME2_H
-#define NS_SVGTEXTFRAME2_H
+#ifndef MOZILLA_SVGTEXTFRAME_H
+#define MOZILLA_SVGTEXTFRAME_H
 
 #include "mozilla/Attributes.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/gfx/2D.h"
 #include "gfxMatrix.h"
 #include "gfxRect.h"
 #include "gfxSVGGlyphs.h"
 #include "nsIContent.h"
 #include "nsStubMutationObserver.h"
 #include "nsSVGPaintServerFrame.h"
 
 class nsDisplaySVGText;
 class nsRenderingContext;
-class nsSVGTextFrame2;
+class SVGTextFrame;
 class nsTextFrame;
 
-typedef nsSVGDisplayContainerFrame nsSVGTextFrame2Base;
+typedef nsSVGDisplayContainerFrame SVGTextFrameBase;
 
 namespace mozilla {
 
 class CharIterator;
 class nsISVGPoint;
 class TextFrameIterator;
 class TextNodeCorrespondenceRecorder;
 struct TextRenderedRun;
@@ -120,26 +120,26 @@ private:
   static gfxPoint UnspecifiedPoint()
   {
     return gfxPoint(UnspecifiedCoord(), UnspecifiedCoord());
   }
 };
 
 /**
  * A runnable to mark glyph positions as needing to be recomputed
- * and to invalid the bounds of the nsSVGTextFrame2 frame.
+ * and to invalid the bounds of the SVGTextFrame frame.
  */
 class GlyphMetricsUpdater : public nsRunnable {
 public:
   NS_DECL_NSIRUNNABLE
-  GlyphMetricsUpdater(nsSVGTextFrame2* aFrame) : mFrame(aFrame) { }
-  static void Run(nsSVGTextFrame2* aFrame);
+  GlyphMetricsUpdater(SVGTextFrame* aFrame) : mFrame(aFrame) { }
+  static void Run(SVGTextFrame* aFrame);
   void Revoke() { mFrame = nullptr; }
 private:
-  nsSVGTextFrame2* mFrame;
+  SVGTextFrame* mFrame;
 };
 
 // Slightly horrible callback for deferring application of opacity
 struct SVGTextContextPaint : public gfxTextContextPaint {
   already_AddRefed<gfxPattern> GetFillPattern(float aOpacity,
                                               const gfxMatrix& aCTM) MOZ_OVERRIDE;
   already_AddRefed<gfxPattern> GetStrokePattern(float aOpacity,
                                                 const gfxMatrix& aCTM) MOZ_OVERRIDE;
@@ -203,20 +203,20 @@ struct SVGTextContextPaint : public gfxT
 };
 
 } // namespace mozilla
 
 /**
  * Frame class for SVG <text> elements, used when the
  * layout.svg.css-text.enabled is true.
  *
- * An nsSVGTextFrame2 manages SVG text layout, painting and interaction for
+ * An SVGTextFrame manages SVG text layout, painting and interaction for
  * all descendent text content elements.  The frame tree will look like this:
  *
- *   nsSVGTextFrame2                  -- for <text>
+ *   SVGTextFrame                     -- for <text>
  *     <anonymous block frame>
  *       ns{Block,Inline,Text}Frames  -- for text nodes, <tspan>s, <a>s, etc.
  *
  * SVG text layout is done by:
  *
  *   1. Reflowing the anonymous block frame.
  *   2. Inspecting the (app unit) positions of the glyph for each character in
  *      the nsTextFrames underneath the anonymous block frame.
@@ -233,45 +233,45 @@ struct SVGTextContextPaint : public gfxT
  * object.  The TextRenderedRunIterator class performs that splitting and
  * returns a TextRenderedRun for each bit of text to be painted separately.
  *
  * Each rendered run is painted by calling nsTextFrame::PaintText.  If the text
  * formatting is simple enough (solid fill, no stroking, etc.), PaintText will
  * itself do the painting.  Otherwise, a DrawPathCallback is passed to
  * PaintText so that we can fill the text geometry with SVG paint servers.
  */
-class nsSVGTextFrame2 : public nsSVGTextFrame2Base
+class SVGTextFrame : public SVGTextFrameBase
 {
   friend nsIFrame*
-  NS_NewSVGTextFrame2(nsIPresShell* aPresShell, nsStyleContext* aContext);
+  NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
   friend class mozilla::CharIterator;
   friend class mozilla::GlyphMetricsUpdater;
   friend class mozilla::TextFrameIterator;
   friend class mozilla::TextNodeCorrespondenceRecorder;
   friend struct mozilla::TextRenderedRun;
   friend class mozilla::TextRenderedRunIterator;
   friend class MutationObserver;
   friend class nsDisplaySVGText;
 
   typedef mozilla::gfx::Path Path;
   typedef mozilla::SVGTextContextPaint SVGTextContextPaint;
 
 protected:
-  nsSVGTextFrame2(nsStyleContext* aContext)
-    : nsSVGTextFrame2Base(aContext),
+  SVGTextFrame(nsStyleContext* aContext)
+    : SVGTextFrameBase(aContext),
       mFontSizeScaleFactor(1.0f),
       mLastContextScale(1.0f),
       mLengthAdjustScaleFactor(1.0f)
   {
     AddStateBits(NS_STATE_SVG_POSITIONING_DIRTY);
   }
 
 public:
-  NS_DECL_QUERYFRAME_TARGET(nsSVGTextFrame2)
+  NS_DECL_QUERYFRAME_TARGET(SVGTextFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame:
   virtual void Init(nsIContent* aContent,
                     nsIFrame*   aParent,
                     nsIFrame*   aPrevInFlow) MOZ_OVERRIDE;
 
@@ -286,24 +286,24 @@ public:
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE;
 
   /**
    * Get the "type" of the frame
    *
-   * @see nsGkAtoms::svgTextFrame2
+   * @see nsGkAtoms::svgTextFrame
    */
   virtual nsIAtom* GetType() const MOZ_OVERRIDE;
 
 #ifdef DEBUG
   NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
   {
-    return MakeFrameName(NS_LITERAL_STRING("SVGText2"), aResult);
+    return MakeFrameName(NS_LITERAL_STRING("SVGText"), aResult);
   }
 #endif
 
   virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
 
   /**
    * Finds the nsTextFrame for the closest rendered run to the specified point.
    */
@@ -339,55 +339,55 @@ public:
                                   mozilla::nsISVGPoint** aResult);
   nsresult GetEndPositionOfChar(nsIContent* aContent, uint32_t aCharNum,
                                 mozilla::nsISVGPoint** aResult);
   nsresult GetExtentOfChar(nsIContent* aContent, uint32_t aCharNum,
                            mozilla::dom::SVGIRect** aResult);
   nsresult GetRotationOfChar(nsIContent* aContent, uint32_t aCharNum,
                              float* aResult);
 
-  // nsSVGTextFrame2 methods:
+  // SVGTextFrame methods:
 
   /**
    * Schedules mPositions to be recomputed and the covered region to be
    * updated.
    */
   void NotifyGlyphMetricsChange();
 
   /**
    * Calls ScheduleReflowSVGNonDisplayText if this is a non-display frame,
    * and nsSVGUtils::ScheduleReflowSVG otherwise.
    */
   void ScheduleReflowSVG();
 
   /**
-   * Reflows the anonymous block frame of this non-display nsSVGTextFrame2.
+   * Reflows the anonymous block frame of this non-display SVGTextFrame.
    *
    * When we are under nsSVGDisplayContainerFrame::ReflowSVG, we need to
-   * reflow any nsSVGTextFrame2 frames in the subtree in case they are
+   * reflow any SVGTextFrame frames in the subtree in case they are
    * being observed (by being for example in a <mask>) and the change
    * that caused the reflow would not already have caused a reflow.
    *
-   * Note that displayed nsSVGTextFrame2s are reflowed as needed, when PaintSVG
+   * Note that displayed SVGTextFrames are reflowed as needed, when PaintSVG
    * is called or some SVG DOM method is called on the element.
    */
   void ReflowSVGNonDisplayText();
 
   /**
    * This is a function that behaves similarly to nsSVGUtils::ScheduleReflowSVG,
    * but which will skip over any ancestor non-display container frames on the
    * way to the nsSVGOuterSVGFrame.  It exists for the situation where a
    * non-display <text> element has changed and needs to ensure ReflowSVG will
    * be called on its closest display container frame, so that
    * nsSVGDisplayContainerFrame::ReflowSVG will call ReflowSVGNonDisplayText on
    * it.
    *
    * The only case where we have to do this is in response to a style change on
    * a non-display <text>; the only caller of ScheduleReflowSVGNonDisplayText
-   * currently is nsSVGTextFrame2::DidSetStyleContext.
+   * currently is SVGTextFrame::DidSetStyleContext.
    */
   void ScheduleReflowSVGNonDisplayText();
 
   /**
    * Updates the mFontSizeScaleFactor value by looking at the range of
    * font-sizes used within the <text>.
    *
    * @return Whether mFontSizeScaleFactor changed.
@@ -429,17 +429,17 @@ private:
    */
   class MutationObserver : public nsStubMutationObserver {
   public:
     MutationObserver()
       : mFrame(nullptr)
     {
     }
 
-    void StartObserving(nsSVGTextFrame2* aFrame)
+    void StartObserving(SVGTextFrame* aFrame)
     {
       NS_ASSERTION(!mFrame, "should not be observing yet!");
       mFrame = aFrame;
       aFrame->GetContent()->AddMutationObserver(this);
     }
 
     virtual ~MutationObserver()
     {
@@ -454,22 +454,22 @@ private:
     // nsIMutationObserver
     NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
     NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
     NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
     NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
     NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
 
   private:
-    nsSVGTextFrame2* mFrame;
+    SVGTextFrame* mFrame;
   };
 
   /**
    * Reflows the anonymous block child if it is dirty or has dirty
-   * children, or if the nsSVGTextFrame2 itself is dirty.
+   * children, or if the SVGTextFrame itself is dirty.
    */
   void MaybeReflowAnonymousBlockChild();
 
   /**
    * Performs the actual work of reflowing the anonymous block child.
    */
   void DoReflow();
 
@@ -683,17 +683,17 @@ private:
    * is identical or close to the size that the text will appear on the screen,
    * because at very small or large font sizes, text metrics will be computed
    * differently due to the limited precision that text runs have.
    *
    * mFontSizeScaleFactor is the amount the actual font-size property value
    * should be multiplied by to cause the text run font size to (a) be within a
    * "reasonable" range, and (b) be close to the actual size to be painted on
    * screen.  (The "reasonable" range as determined by some #defines in
-   * nsSVGTextFrame2.cpp is 8..200.)
+   * SVGTextFrame.cpp is 8..200.)
    */
   float mFontSizeScaleFactor;
 
   /**
    * The scale of the context that we last used to compute mFontSizeScaleFactor.
    * We record this so that we can tell when our scale transform has changed
    * enough to warrant reflowing the text.
    */
--- a/layout/svg/moz.build
+++ b/layout/svg/moz.build
@@ -31,23 +31,23 @@ UNIFIED_SOURCES += [
     'nsSVGMarkerFrame.cpp',
     'nsSVGMaskFrame.cpp',
     'nsSVGOuterSVGFrame.cpp',
     'nsSVGPaintServerFrame.cpp',
     'nsSVGPathGeometryFrame.cpp',
     'nsSVGPatternFrame.cpp',
     'nsSVGStopFrame.cpp',
     'nsSVGSwitchFrame.cpp',
-    'nsSVGTextFrame2.cpp',
     'nsSVGUseFrame.cpp',
     'nsSVGUtils.cpp',
     'SVGFEContainerFrame.cpp',
     'SVGFEImageFrame.cpp',
     'SVGFELeafFrame.cpp',
     'SVGFEUnstyledLeafFrame.cpp',
+    'SVGTextFrame.cpp',
     'SVGViewFrame.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'gklayout'
 LOCAL_INCLUDES += [
     '../../content/base/src',
--- a/layout/svg/nsSVGClipPathFrame.cpp
+++ b/layout/svg/nsSVGClipPathFrame.cpp
@@ -255,24 +255,24 @@ nsSVGClipPathFrame::IsValid()
 
     if (type == nsGkAtoms::svgUseFrame) {
       for (nsIFrame* grandKid = kid->GetFirstPrincipalChild(); grandKid;
            grandKid = grandKid->GetNextSibling()) {
 
         nsIAtom *type = grandKid->GetType();
 
         if (type != nsGkAtoms::svgPathGeometryFrame &&
-            type != nsGkAtoms::svgTextFrame2) {
+            type != nsGkAtoms::svgTextFrame) {
           return false;
         }
       }
       continue;
     }
     if (type != nsGkAtoms::svgPathGeometryFrame &&
-        type != nsGkAtoms::svgTextFrame2) {
+        type != nsGkAtoms::svgTextFrame) {
       return false;
     }
   }
   return true;
 }
 
 NS_IMETHODIMP
 nsSVGClipPathFrame::AttributeChanged(int32_t         aNameSpaceID,
--- a/layout/svg/nsSVGContainerFrame.cpp
+++ b/layout/svg/nsSVGContainerFrame.cpp
@@ -7,17 +7,17 @@
 #include "nsSVGContainerFrame.h"
 
 // Keep others in (case-insensitive) order:
 #include "nsCSSFrameConstructor.h"
 #include "nsSVGEffects.h"
 #include "nsSVGElement.h"
 #include "nsSVGUtils.h"
 #include "nsSVGAnimatedTransformList.h"
-#include "nsSVGTextFrame2.h"
+#include "SVGTextFrame.h"
 #include "RestyleManager.h"
 
 using namespace mozilla;
 
 NS_QUERYFRAME_HEAD(nsSVGContainerFrame)
   NS_QUERYFRAME_ENTRY(nsSVGContainerFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsSVGContainerFrameBase)
 
@@ -79,52 +79,52 @@ nsSVGContainerFrame::UpdateOverflow()
     // We don't maintain overflow rects.
     // XXX It would have be better if the restyle request hadn't even happened.
     return false;
   }
   return nsSVGContainerFrameBase::UpdateOverflow();
 }
 
 /**
- * Traverses a frame tree, marking any nsSVGTextFrame2 frames as dirty
+ * Traverses a frame tree, marking any SVGTextFrame frames as dirty
  * and calling InvalidateRenderingObservers() on it.
  *
- * The reason that this helper exists is because nsSVGTextFrame2 is special.
+ * The reason that this helper exists is because SVGTextFrame is special.
  * None of the other SVG frames ever need to be reflowed when they have the
  * NS_FRAME_IS_NONDISPLAY bit set on them because their PaintSVG methods
  * (and those of any containers that they can validly be contained within) do
  * not make use of mRect or overflow rects. "em" lengths, etc., are resolved
  * as those elements are painted.
  *
- * nsSVGTextFrame2 is different because its anonymous block and inline frames
+ * SVGTextFrame is different because its anonymous block and inline frames
  * need to be reflowed in order to get the correct metrics when things like
  * inherited font-size of an ancestor changes, or a delayed webfont loads and
  * applies.
  *
  * We assume that any change that requires the anonymous kid of an
- * nsSVGTextFrame2 to reflow will result in an NS_FRAME_IS_DIRTY reflow. When
+ * SVGTextFrame to reflow will result in an NS_FRAME_IS_DIRTY reflow. When
  * that reflow reaches an NS_FRAME_IS_NONDISPLAY frame it would normally
- * stop, but this helper looks for any nsSVGTextFrame2 descendants of such
+ * stop, but this helper looks for any SVGTextFrame descendants of such
  * frames and marks them NS_FRAME_IS_DIRTY so that the next time that they are
  * painted their anonymous kid will first get the necessary reflow.
  */
 /* static */ void
 nsSVGContainerFrame::ReflowSVGNonDisplayText(nsIFrame* aContainer)
 {
   NS_ASSERTION(aContainer->GetStateBits() & NS_FRAME_IS_DIRTY,
                "expected aContainer to be NS_FRAME_IS_DIRTY");
   NS_ASSERTION((aContainer->GetStateBits() & NS_FRAME_IS_NONDISPLAY) ||
                !aContainer->IsFrameOfType(nsIFrame::eSVG),
                "it is wasteful to call ReflowSVGNonDisplayText on a container "
                "frame that is not NS_FRAME_IS_NONDISPLAY");
   for (nsIFrame* kid = aContainer->GetFirstPrincipalChild(); kid;
        kid = kid->GetNextSibling()) {
     nsIAtom* type = kid->GetType();
-    if (type == nsGkAtoms::svgTextFrame2) {
-      static_cast<nsSVGTextFrame2*>(kid)->ReflowSVGNonDisplayText();
+    if (type == nsGkAtoms::svgTextFrame) {
+      static_cast<SVGTextFrame*>(kid)->ReflowSVGNonDisplayText();
     } else {
       if (kid->IsFrameOfType(nsIFrame::eSVG | nsIFrame::eSVGContainer) ||
           type == nsGkAtoms::svgForeignObjectFrame ||
           !kid->IsFrameOfType(nsIFrame::eSVG)) {
         ReflowSVGNonDisplayText(kid);
       }
     }
   }
@@ -335,17 +335,17 @@ nsSVGDisplayContainerFrame::ReflowSVG()
       SVGFrame->ReflowSVG();
 
       // We build up our child frame overflows here instead of using
       // nsLayoutUtils::UnionChildOverflow since SVG frame's all use the same
       // frame list, and we're iterating over that list now anyway.
       ConsiderChildOverflow(overflowRects, kid);
     } else {
       // Inside a non-display container frame, we might have some
-      // nsSVGTextFrame2s.  We need to cause those to get reflowed in
+      // SVGTextFrames.  We need to cause those to get reflowed in
       // case they are the target of a rendering observer.
       NS_ASSERTION(kid->GetStateBits() & NS_FRAME_IS_NONDISPLAY,
                    "expected kid to be a NS_FRAME_IS_NONDISPLAY frame");
       if (kid->GetStateBits() & NS_FRAME_IS_DIRTY) {
         nsSVGContainerFrame* container = do_QueryFrame(kid);
         if (container && container->GetContent()->IsSVG()) {
           ReflowSVGNonDisplayText(container);
         }
--- a/layout/svg/nsSVGContainerFrame.h
+++ b/layout/svg/nsSVGContainerFrame.h
@@ -91,17 +91,17 @@ public:
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
 
   virtual bool UpdateOverflow() MOZ_OVERRIDE;
 
 protected:
   /**
-   * Traverses a frame tree, marking any nsSVGTextFrame2 frames as dirty
+   * Traverses a frame tree, marking any SVGTextFrame frames as dirty
    * and calling InvalidateRenderingObservers() on it.
    */
   static void ReflowSVGNonDisplayText(nsIFrame* aContainer);
 };
 
 /**
  * Frame class or base-class for SVG containers that can or do display their
  * contents directly.
--- a/layout/svg/nsSVGEffects.cpp
+++ b/layout/svg/nsSVGEffects.cpp
@@ -298,17 +298,17 @@ nsSVGTextPathProperty::DoUpdate()
   // Avoid getting into an infinite loop of reflows if the <textPath> is
   // pointing to one of its ancestors.  TargetIsValid returns true iff
   // the target element is a <path> element, and we would not have this
   // nsSVGTextPathProperty if this <textPath> were a descendant of the
   // target <path>.
   //
   // Note that we still have to post the restyle event when we
   // change from being valid to invalid, so that mPositions on the
-  // nsSVGTextFrame2 gets updated, skipping the <textPath>, ensuring
+  // SVGTextFrame gets updated, skipping the <textPath>, ensuring
   // that nothing gets painted for that element.
   bool nowValid = TargetIsValid();
   if (!mValid && !nowValid) {
     // Just return if we were previously invalid, and are still invalid.
     return;
   }
   mValid = nowValid;
 
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1169,17 +1169,17 @@ nsSVGUtils::GetBBox(nsIFrame *aFrame, ui
   if (svg || aFrame->IsSVGText()) {
     // It is possible to apply a gradient, pattern, clipping path, mask or
     // filter to text. When one of these facilities is applied to text
     // the bounding box is the entire text element in all
     // cases.
     if (aFrame->IsSVGText()) {
       nsIFrame* ancestor = GetFirstNonAAncestorFrame(aFrame);
       if (ancestor && ancestor->IsSVGText()) {
-        while (ancestor->GetType() != nsGkAtoms::svgTextFrame2) {
+        while (ancestor->GetType() != nsGkAtoms::svgTextFrame) {
           ancestor = ancestor->GetParent();
         }
       }
       svg = do_QueryFrame(ancestor);
     }
     nsIContent* content = aFrame->GetContent();
     if (content->IsSVG() &&
         !static_cast<const nsSVGElement*>(content)->HasValidDimensions()) {