Bug 1264837 Part 32 - Remove nsSVGOuterSVGFrameBase.
MozReview-Commit-ID: qFKf1Da8Cn
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -51,24 +51,24 @@ nsSVGOuterSVGFrame::UnregisterForeignObj
return mForeignObjectHash->RemoveEntry(aFrame);
}
//----------------------------------------------------------------------
// Implementation
nsContainerFrame*
NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
-{
+{
return new (aPresShell) nsSVGOuterSVGFrame(aContext);
}
NS_IMPL_FRAMEARENA_HELPERS(nsSVGOuterSVGFrame)
nsSVGOuterSVGFrame::nsSVGOuterSVGFrame(nsStyleContext* aContext)
- : nsSVGOuterSVGFrameBase(aContext)
+ : nsSVGDisplayContainerFrame(aContext)
, mFullZoom(aContext->PresContext()->GetFullZoom())
, mViewportInitialized(false)
, mIsRootContent(false)
{
// Outer-<svg> has CSS layout, so remove this bit:
RemoveStateBits(NS_FRAME_SVG_LAYOUT);
}
@@ -107,17 +107,17 @@ nsSVGOuterSVGFrame::Init(nsIContent*
// prevent them from painting by [ab]use NS_FRAME_IS_NONDISPLAY. The
// frame will be recreated via an nsChangeHint_ReconstructFrame restyle if
// the value returned by PassesConditionalProcessingTests changes.
SVGSVGElement *svg = static_cast<SVGSVGElement*>(aContent);
if (!svg->PassesConditionalProcessingTests()) {
AddStateBits(NS_FRAME_IS_NONDISPLAY);
}
- nsSVGOuterSVGFrameBase::Init(aContent, aParent, aPrevInFlow);
+ nsSVGDisplayContainerFrame::Init(aContent, aParent, aPrevInFlow);
nsIDocument* doc = mContent->GetUncomposedDoc();
if (doc) {
// we only care about our content's zoom and pan values if it's the root element
if (doc->GetRootElement() == mContent) {
mIsRootContent = true;
nsIFrame* embeddingFrame;
@@ -136,21 +136,20 @@ nsSVGOuterSVGFrame::Init(nsIContent*
}
}
//----------------------------------------------------------------------
// nsQueryFrame methods
NS_QUERYFRAME_HEAD(nsSVGOuterSVGFrame)
NS_QUERYFRAME_ENTRY(nsISVGSVGFrame)
-NS_QUERYFRAME_TAIL_INHERITING(nsSVGOuterSVGFrameBase)
+NS_QUERYFRAME_TAIL_INHERITING(nsSVGDisplayContainerFrame)
//----------------------------------------------------------------------
// nsIFrame methods
-
//----------------------------------------------------------------------
// reflowing
/* virtual */ nscoord
nsSVGOuterSVGFrame::GetMinISize(nsRenderingContext *aRenderingContext)
{
nscoord result;
DISPLAY_MIN_WIDTH(this, result);
@@ -271,17 +270,17 @@ nsSVGOuterSVGFrame::GetIntrinsicRatio()
}
if (viewBoxHeight < 0.0f) {
viewBoxHeight = 0.0f;
}
return nsSize(NSToCoordRoundWithClamp(viewBoxWidth),
NSToCoordRoundWithClamp(viewBoxHeight));
}
- return nsSVGOuterSVGFrameBase::GetIntrinsicRatio();
+ return nsSVGDisplayContainerFrame::GetIntrinsicRatio();
}
/* virtual */
LogicalSize
nsSVGOuterSVGFrame::ComputeSize(nsRenderingContext *aRenderingContext,
WritingMode aWM,
const LogicalSize& aCBSize,
nscoord aAvailableISize,
@@ -503,17 +502,17 @@ nsSVGOuterSVGFrame::Reflow(nsPresContext
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
}
void
nsSVGOuterSVGFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus)
{
- nsSVGOuterSVGFrameBase::DidReflow(aPresContext,aReflowState,aStatus);
+ nsSVGDisplayContainerFrame::DidReflow(aPresContext,aReflowState,aStatus);
// Make sure elements styled by :hover get updated if script/animation moves
// them under or out from under the pointer:
PresContext()->PresShell()->SynthesizeMouseMove(false);
}
/* virtual */ bool
nsSVGOuterSVGFrame::UpdateOverflow()
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -12,20 +12,18 @@
#include "nsRegion.h"
class gfxContext;
class nsSVGForeignObjectFrame;
////////////////////////////////////////////////////////////////////////
// nsSVGOuterSVGFrame class
-typedef nsSVGDisplayContainerFrame nsSVGOuterSVGFrameBase;
-
-class nsSVGOuterSVGFrame final : public nsSVGOuterSVGFrameBase,
- public nsISVGSVGFrame
+class nsSVGOuterSVGFrame final : public nsSVGDisplayContainerFrame
+ , public nsISVGSVGFrame
{
friend nsContainerFrame*
NS_NewSVGOuterSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
protected:
explicit nsSVGOuterSVGFrame(nsStyleContext* aContext);
public:
NS_DECL_QUERYFRAME