Bug 1264837 Part 26 - Remove nsSVGRadialGradientFrameBase. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 15:19:21 +0800
changeset 352472 7de9056658fe6af9c0616a3cc72fac4c5249090e
parent 352471 9a77a49306a4e3ed18c24c2843e2ba489806964c
child 352473 1c17b59a6e3691be574f525049225dd5f7c3b43c
push id15708
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 08:36:12 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 26 - Remove nsSVGRadialGradientFrameBase. MozReview-Commit-ID: DPgBVVoWied
layout/svg/nsSVGGradientFrame.cpp
layout/svg/nsSVGGradientFrame.h
--- a/layout/svg/nsSVGGradientFrame.cpp
+++ b/layout/svg/nsSVGGradientFrame.cpp
@@ -508,17 +508,17 @@ nsSVGLinearGradientFrame::CreateGradient
 void
 nsSVGRadialGradientFrame::Init(nsIContent*       aContent,
                                nsContainerFrame* aParent,
                                nsIFrame*         aPrevInFlow)
 {
   NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::radialGradient),
                "Content is not an SVG radialGradient");
 
-  nsSVGRadialGradientFrameBase::Init(aContent, aParent, aPrevInFlow);
+  nsSVGGradientFrame::Init(aContent, aParent, aPrevInFlow);
 }
 #endif /* DEBUG */
 
 nsIAtom*
 nsSVGRadialGradientFrame::GetType() const
 {
   return nsGkAtoms::svgRadialGradientFrame;
 }
@@ -595,18 +595,17 @@ nsSVGRadialGradientFrame::GetRadialGradi
   dom::SVGRadialGradientElement* thisElement =
     static_cast<dom::SVGRadialGradientElement*>(mContent);
   const nsSVGLength2 &length = thisElement->mLengthAttributes[aIndex];
 
   if (length.IsExplicitlySet()) {
     return thisElement;
   }
 
-  return nsSVGRadialGradientFrameBase::GetRadialGradientWithLength(aIndex,
-                                                                   aDefault);
+  return nsSVGGradientFrame::GetRadialGradientWithLength(aIndex, aDefault);
 }
 
 bool
 nsSVGRadialGradientFrame::GradientVectorLengthIsZero()
 {
   return GetLengthValue(dom::SVGRadialGradientElement::ATTR_R) == 0;
 }
 
--- a/layout/svg/nsSVGGradientFrame.h
+++ b/layout/svg/nsSVGGradientFrame.h
@@ -162,25 +162,23 @@ protected:
   virtual bool GradientVectorLengthIsZero() override;
   virtual already_AddRefed<gfxPattern> CreateGradient() override;
 };
 
 // -------------------------------------------------------------------------
 // Radial Gradients
 // -------------------------------------------------------------------------
 
-typedef nsSVGGradientFrame nsSVGRadialGradientFrameBase;
-
-class nsSVGRadialGradientFrame : public nsSVGRadialGradientFrameBase
+class nsSVGRadialGradientFrame : public nsSVGGradientFrame
 {
   friend nsIFrame* NS_NewSVGRadialGradientFrame(nsIPresShell* aPresShell,
                                                 nsStyleContext* aContext);
 protected:
-  explicit nsSVGRadialGradientFrame(nsStyleContext* aContext) :
-    nsSVGRadialGradientFrameBase(aContext) {}
+  explicit nsSVGRadialGradientFrame(nsStyleContext* aContext)
+    : nsSVGGradientFrame(aContext) {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame interface:
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,