Bug 1264837 Part 45 - Remove SVGViewFrameBase. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 15:57:01 +0800
changeset 352585 18724380fd838c77dd08c00f97d04f97c50c7e54
parent 352584 97b027179175cc1c6a9cbaba6cb6a46e1b4d86ba
child 518670 91fb434e6870176b6cb8f1414cb2ab740b6d8a68
push id15714
push userbmo:tlin@mozilla.com
push dateMon, 18 Apr 2016 09:14:01 +0000
bugs1264837
milestone48.0a1
Bug 1264837 Part 45 - Remove SVGViewFrameBase. MozReview-Commit-ID: HynJLTOM7ic
layout/svg/SVGViewFrame.cpp
--- a/layout/svg/SVGViewFrame.cpp
+++ b/layout/svg/SVGViewFrame.cpp
@@ -5,49 +5,47 @@
 
 // Keep in (case-insensitive) order:
 #include "nsFrame.h"
 #include "nsGkAtoms.h"
 #include "nsSVGOuterSVGFrame.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "mozilla/dom/SVGViewElement.h"
 
-typedef nsFrame SVGViewFrameBase;
-
 using namespace mozilla::dom;
 
 /**
  * While views are not directly rendered in SVG they can be linked to
  * and thereby override attributes of an <svg> element via a fragment
  * identifier. The SVGViewFrame class passes on any attribute changes
  * the view receives to the overridden <svg> element (if there is one).
  **/
-class SVGViewFrame : public SVGViewFrameBase
+class SVGViewFrame : public nsFrame
 {
   friend nsIFrame*
   NS_NewSVGViewFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 protected:
   explicit SVGViewFrame(nsStyleContext* aContext)
-    : SVGViewFrameBase(aContext)
+    : nsFrame(aContext)
   {
     AddStateBits(NS_FRAME_IS_NONDISPLAY);
   }
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
 #ifdef DEBUG
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) override;
 #endif
 
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
-    return SVGViewFrameBase::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("SVGView"), aResult);
   }
 #endif
@@ -81,17 +79,17 @@ NS_IMPL_FRAMEARENA_HELPERS(SVGViewFrame)
 void
 SVGViewFrame::Init(nsIContent*       aContent,
                    nsContainerFrame* aParent,
                    nsIFrame*         aPrevInFlow)
 {
   NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::view),
                "Content is not an SVG view");
 
-  SVGViewFrameBase::Init(aContent, aParent, aPrevInFlow);
+  nsFrame::Init(aContent, aParent, aPrevInFlow);
 }
 #endif /* DEBUG */
 
 nsIAtom *
 SVGViewFrame::GetType() const
 {
   return nsGkAtoms::svgViewFrame;
 }
@@ -120,11 +118,10 @@ SVGViewFrame::AttributeChanged(int32_t  
 
     if (svgElement->IsOverriddenBy(viewID)) {
       // We're the view that's providing overrides, so pretend that the frame
       // we're overriding was updated.
       outerSVGFrame->AttributeChanged(aNameSpaceID, aAttribute, aModType);
     }
   }
 
-  return SVGViewFrameBase::AttributeChanged(aNameSpaceID,
-                                            aAttribute, aModType);
+  return nsFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
 }