Bug 1264837 Part 19 - Remove nsSVGContainerFrameBase. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 14:56:50 +0800
changeset 352559 b81519cee7bd6a3b7a321a9694aca915e0be20ea
parent 352558 4811c44164bb6af6e0f8be3c16073601cfd2c72f
child 352560 5ad38bf5edce6b225d515a9c195f6050f903e0ff
push id15714
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 09:14:01 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 19 - Remove nsSVGContainerFrameBase. MozReview-Commit-ID: EPoMcv1GsnS
layout/svg/nsSVGContainerFrame.cpp
layout/svg/nsSVGContainerFrame.h
--- a/layout/svg/nsSVGContainerFrame.cpp
+++ b/layout/svg/nsSVGContainerFrame.cpp
@@ -15,17 +15,17 @@
 #include "nsSVGUtils.h"
 #include "nsSVGAnimatedTransformList.h"
 #include "SVGTextFrame.h"
 
 using namespace mozilla;
 
 NS_QUERYFRAME_HEAD(nsSVGContainerFrame)
   NS_QUERYFRAME_ENTRY(nsSVGContainerFrame)
-NS_QUERYFRAME_TAIL_INHERITING(nsSVGContainerFrameBase)
+NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
 
 NS_QUERYFRAME_HEAD(nsSVGDisplayContainerFrame)
   NS_QUERYFRAME_ENTRY(nsSVGDisplayContainerFrame)
   NS_QUERYFRAME_ENTRY(nsISVGChildFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsSVGContainerFrame)
 
 nsIFrame*
 NS_NewSVGContainerFrame(nsIPresShell* aPresShell,
@@ -73,17 +73,17 @@ nsSVGContainerFrame::RemoveFrame(ChildLi
 bool
 nsSVGContainerFrame::UpdateOverflow()
 {
   if (mState & NS_FRAME_IS_NONDISPLAY) {
     // 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();
+  return nsContainerFrame::UpdateOverflow();
 }
 
 /**
  * Traverses a frame tree, marking any SVGTextFrame frames as dirty
  * and calling InvalidateRenderingObservers() on it.
  *
  * 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
--- a/layout/svg/nsSVGContainerFrame.h
+++ b/layout/svg/nsSVGContainerFrame.h
@@ -18,37 +18,35 @@
 class gfxContext;
 class nsFrameList;
 class nsIContent;
 class nsIPresShell;
 class nsStyleContext;
 
 struct nsRect;
 
-typedef nsContainerFrame nsSVGContainerFrameBase;
-
 /**
  * Base class for SVG container frames. Frame sub-classes that do not
  * display their contents directly (such as the frames for <marker> or
  * <pattern>) just inherit this class. Frame sub-classes that do or can
  * display their contents directly (such as the frames for inner-<svg> or
  * <g>) inherit our nsDisplayContainerFrame sub-class.
  *
  *                               *** WARNING ***
  *
  * Do *not* blindly cast to SVG element types in this class's methods (see the
  * warning comment for nsSVGDisplayContainerFrame below). 
  */
-class nsSVGContainerFrame : public nsSVGContainerFrameBase
+class nsSVGContainerFrame : public nsContainerFrame
 {
   friend nsIFrame* NS_NewSVGContainerFrame(nsIPresShell* aPresShell,
                                            nsStyleContext* aContext);
 protected:
   explicit nsSVGContainerFrame(nsStyleContext* aContext)
-    : nsSVGContainerFrameBase(aContext)
+    : nsContainerFrame(aContext)
   {
     AddStateBits(NS_FRAME_SVG_LAYOUT);
   }
 
 public:
   NS_DECL_QUERYFRAME_TARGET(nsSVGContainerFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
@@ -75,17 +73,17 @@ public:
   virtual void InsertFrames(ChildListID     aListID,
                             nsIFrame*       aPrevFrame,
                             nsFrameList&    aFrameList) override;
   virtual void RemoveFrame(ChildListID     aListID,
                            nsIFrame*       aOldFrame) override;
 
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
-    return nsSVGContainerFrameBase::IsFrameOfType(
+    return nsContainerFrame::IsFrameOfType(
             aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
   }
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) override {}
 
   virtual bool UpdateOverflow() override;