Bug 1264837 Part 33 - Remove nsSVGOuterSVGAnonChildFrameBase. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 15:34:12 +0800
changeset 352573 e9ffb4c025d32bdfe75907f2fa8f06034cdef97d
parent 352572 25b5349cdd29d2364d946fbdfd9c44e01d549253
child 352574 e78001a600ddb9baa7b2470649df8a5642abe780
push id15714
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 09:14:01 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 33 - Remove nsSVGOuterSVGAnonChildFrameBase. MozReview-Commit-ID: 4hnGGYnAjDh
layout/svg/nsSVGOuterSVGFrame.cpp
layout/svg/nsSVGOuterSVGFrame.h
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -950,17 +950,17 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVG
 #ifdef DEBUG
 void
 nsSVGOuterSVGAnonChildFrame::Init(nsIContent*       aContent,
                                   nsContainerFrame* aParent,
                                   nsIFrame*         aPrevInFlow)
 {
   MOZ_ASSERT(aParent->GetType() == nsGkAtoms::svgOuterSVGFrame,
              "Unexpected parent");
-  nsSVGOuterSVGAnonChildFrameBase::Init(aContent, aParent, aPrevInFlow);
+  nsSVGDisplayContainerFrame::Init(aContent, aParent, aPrevInFlow);
 }
 #endif
 
 nsIAtom *
 nsSVGOuterSVGAnonChildFrame::GetType() const
 {
   return nsGkAtoms::svgOuterSVGAnonChildFrame;
 }
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -202,18 +202,16 @@ protected:
 
   bool mViewportInitialized;
   bool mIsRootContent;
 };
 
 ////////////////////////////////////////////////////////////////////////
 // nsSVGOuterSVGAnonChildFrame class
 
-typedef nsSVGDisplayContainerFrame nsSVGOuterSVGAnonChildFrameBase;
-
 /**
  * nsSVGOuterSVGFrames have a single direct child that is an instance of this
  * class, and which is used to wrap their real child frames. Such anonymous
  * wrapper frames created from this class exist because SVG frames need their
  * GetPosition() offset to be their offset relative to "user space" (in app
  * units) so that they can play nicely with nsDisplayTransform. This is fine
  * for all SVG frames except for direct children of an nsSVGOuterSVGFrame,
  * since an nsSVGOuterSVGFrame can have CSS border and padding (unlike other
@@ -227,25 +225,24 @@ typedef nsSVGDisplayContainerFrame nsSVG
  * keeps both nsDisplayTransform and nsIFrame::GetOffsetTo happy.
  *
  * The reason that this class inherit from nsSVGDisplayContainerFrame rather
  * than simply from nsContainerFrame is so that we can avoid having special
  * handling for these inner wrappers in multiple parts of the SVG code. For
  * example, the implementations of IsSVGTransformed and GetCanvasTM assume
  * nsSVGContainerFrame instances all the way up to the nsSVGOuterSVGFrame.
  */
-class nsSVGOuterSVGAnonChildFrame
-  : public nsSVGOuterSVGAnonChildFrameBase
+class nsSVGOuterSVGAnonChildFrame : public nsSVGDisplayContainerFrame
 {
   friend nsContainerFrame*
   NS_NewSVGOuterSVGAnonChildFrame(nsIPresShell* aPresShell,
                                   nsStyleContext* aContext);
 
   explicit nsSVGOuterSVGAnonChildFrame(nsStyleContext* aContext)
-    : nsSVGOuterSVGAnonChildFrameBase(aContext)
+    : nsSVGDisplayContainerFrame(aContext)
   {}
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,