Bug 1264837 Part 44 - Remove SVGTextFrameBase. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 18 Apr 2016 15:54:36 +0800
changeset 317505 7e962e85d0917215c8143355c15ef751cbfa6c6c
parent 317504 d855f55ad32ff98b39dffa88fa5c3ce81e0ddcdc
child 317506 e995cbd2835c255c6fbae99a17d2cdfdace8fd8a
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1264837
milestone48.0a1
Bug 1264837 Part 44 - Remove SVGTextFrameBase. r=dholbert MozReview-Commit-ID: J6Kcpqm3ot8
layout/svg/SVGTextFrame.cpp
layout/svg/SVGTextFrame.h
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -3204,17 +3204,17 @@ nsDisplaySVGText::Paint(nsDisplayListBui
   ctx->Restore();
 }
 
 // ---------------------------------------------------------------------
 // nsQueryFrame methods
 
 NS_QUERYFRAME_HEAD(SVGTextFrame)
   NS_QUERYFRAME_ENTRY(SVGTextFrame)
-NS_QUERYFRAME_TAIL_INHERITING(SVGTextFrameBase)
+NS_QUERYFRAME_TAIL_INHERITING(nsSVGDisplayContainerFrame)
 
 // ---------------------------------------------------------------------
 // Implementation
 
 nsIFrame*
 NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) SVGTextFrame(aContext);
@@ -3227,17 +3227,17 @@ NS_IMPL_FRAMEARENA_HELPERS(SVGTextFrame)
 
 void
 SVGTextFrame::Init(nsIContent*       aContent,
                    nsContainerFrame* aParent,
                    nsIFrame*         aPrevInFlow)
 {
   NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::text), "Content is not an SVG text");
 
-  SVGTextFrameBase::Init(aContent, aParent, aPrevInFlow);
+  nsSVGDisplayContainerFrame::Init(aContent, aParent, aPrevInFlow);
   AddStateBits((aParent->GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) |
                NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_SVG_TEXT);
 
   mMutationObserver = new MutationObserver(this);
 }
 
 void
 SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
@@ -3921,17 +3921,17 @@ SVGTextFrame::ReflowSVG()
 
   nsRect overflow = nsRect(nsPoint(0,0), mRect.Size());
   nsOverflowAreas overflowAreas(overflow, overflow);
   FinishAndStoreOverflow(overflowAreas, mRect.Size());
 
   // XXX nsSVGContainerFrame::ReflowSVG only looks at its nsISVGChildFrame
   // children, and calls ConsiderChildOverflow on them.  Does it matter
   // that ConsiderChildOverflow won't be called on our children?
-  SVGTextFrameBase::ReflowSVG();
+  nsSVGDisplayContainerFrame::ReflowSVG();
 }
 
 /**
  * Converts nsSVGUtils::eBBox* flags into TextRenderedRun flags appropriate
  * for the specified rendered run.
  */
 static uint32_t
 TextRenderedRunFlagsForBBoxContribution(const TextRenderedRun& aRun,
--- a/layout/svg/SVGTextFrame.h
+++ b/layout/svg/SVGTextFrame.h
@@ -17,18 +17,16 @@
 #include "nsStubMutationObserver.h"
 #include "nsSVGPaintServerFrame.h"
 
 class gfxContext;
 class nsDisplaySVGText;
 class SVGTextFrame;
 class nsTextFrame;
 
-typedef nsSVGDisplayContainerFrame SVGTextFrameBase;
-
 namespace mozilla {
 
 class CharIterator;
 class nsISVGPoint;
 class TextFrameIterator;
 class TextNodeCorrespondenceRecorder;
 struct TextRenderedRun;
 class TextRenderedRunIterator;
@@ -240,17 +238,17 @@ public:
  * object.  The TextRenderedRunIterator class performs that splitting and
  * returns a TextRenderedRun for each bit of text to be painted separately.
  *
  * Each rendered run is painted by calling nsTextFrame::PaintText.  If the text
  * formatting is simple enough (solid fill, no stroking, etc.), PaintText will
  * itself do the painting.  Otherwise, a DrawPathCallback is passed to
  * PaintText so that we can fill the text geometry with SVG paint servers.
  */
-class SVGTextFrame final : public SVGTextFrameBase
+class SVGTextFrame final : public nsSVGDisplayContainerFrame
 {
   friend nsIFrame*
   NS_NewSVGTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
   friend class mozilla::CharIterator;
   friend class mozilla::GlyphMetricsUpdater;
   friend class mozilla::TextFrameIterator;
   friend class mozilla::TextNodeCorrespondenceRecorder;
@@ -262,20 +260,20 @@ class SVGTextFrame final : public SVGTex
   typedef gfxTextRun::Range Range;
   typedef mozilla::gfx::DrawTarget DrawTarget;
   typedef mozilla::gfx::Path Path;
   typedef mozilla::gfx::Point Point;
   typedef mozilla::SVGTextContextPaint SVGTextContextPaint;
 
 protected:
   explicit SVGTextFrame(nsStyleContext* aContext)
-    : SVGTextFrameBase(aContext),
-      mFontSizeScaleFactor(1.0f),
-      mLastContextScale(1.0f),
-      mLengthAdjustScaleFactor(1.0f)
+    : nsSVGDisplayContainerFrame(aContext)
+    , mFontSizeScaleFactor(1.0f)
+    , mLastContextScale(1.0f)
+    , mLengthAdjustScaleFactor(1.0f)
   {
     AddStateBits(NS_STATE_SVG_POSITIONING_DIRTY);
   }
 
   ~SVGTextFrame() {}
 
 public:
   NS_DECL_QUERYFRAME_TARGET(SVGTextFrame)