Bug 1264837 Part 37 - Remove nsSVGStopFrameBase. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 15:42:05 +0800
changeset 352577 5207ad49766ffa89f4fb1fc64f10e435942e6f16
parent 352576 8ea2ed203f8b6360b34e12bc33187d83647c3fd0
child 352578 8f56a480235c818783a51aab83b40f50ba8d6459
push id15714
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 09:14:01 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 37 - Remove nsSVGStopFrameBase. MozReview-Commit-ID: 9rukuVgOrMm
layout/svg/nsSVGStopFrame.cpp
--- a/layout/svg/nsSVGStopFrame.cpp
+++ b/layout/svg/nsSVGStopFrame.cpp
@@ -9,25 +9,23 @@
 #include "nsGkAtoms.h"
 #include "nsStyleContext.h"
 #include "nsSVGEffects.h"
 
 // This is a very simple frame whose only purpose is to capture style change
 // events and propagate them to the parent.  Most of the heavy lifting is done
 // within the nsSVGGradientFrame, which is the parent for this frame
 
-typedef nsFrame  nsSVGStopFrameBase;
-
-class nsSVGStopFrame : public nsSVGStopFrameBase
+class nsSVGStopFrame : public nsFrame
 {
   friend nsIFrame*
   NS_NewSVGStopFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
   explicit nsSVGStopFrame(nsStyleContext* aContext)
-    : nsSVGStopFrameBase(aContext)
+    : nsFrame(aContext)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   // nsIFrame interface:
@@ -49,17 +47,17 @@ public:
    * Get the "type" of the frame
    *
    * @see nsGkAtoms::svgStopFrame
    */
   virtual nsIAtom* GetType() const override;
 
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
-    return nsSVGStopFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
+    return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
   }
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const override
   {
     return MakeFrameName(NS_LITERAL_STRING("SVGStop"), aResult);
   }
 #endif
@@ -76,17 +74,17 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGStopFram
 #ifdef DEBUG
 void
 nsSVGStopFrame::Init(nsIContent*       aContent,
                      nsContainerFrame* aParent,
                      nsIFrame*         aPrevInFlow)
 {
   NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::stop), "Content is not a stop element");
 
-  nsSVGStopFrameBase::Init(aContent, aParent, aPrevInFlow);
+  nsFrame::Init(aContent, aParent, aPrevInFlow);
 }
 #endif /* DEBUG */
 
 nsIAtom *
 nsSVGStopFrame::GetType() const
 {
   return nsGkAtoms::svgStopFrame;
 }
@@ -99,18 +97,17 @@ nsSVGStopFrame::AttributeChanged(int32_t
   if (aNameSpaceID == kNameSpaceID_None &&
       aAttribute == nsGkAtoms::offset) {
     MOZ_ASSERT(GetParent()->GetType() == nsGkAtoms::svgLinearGradientFrame ||
                GetParent()->GetType() == nsGkAtoms::svgRadialGradientFrame,
                "Observers observe the gradient, so that's what we must invalidate");
     nsSVGEffects::InvalidateDirectRenderingObservers(GetParent());
   }
 
-  return nsSVGStopFrameBase::AttributeChanged(aNameSpaceID,
-                                              aAttribute, aModType);
+  return nsFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
 }
 
 // -------------------------------------------------------------------------
 // Public functions
 // -------------------------------------------------------------------------
 
 nsIFrame* NS_NewSVGStopFrame(nsIPresShell*   aPresShell,
                              nsStyleContext* aContext)