Bug 1264837 Part 37 - Remove nsSVGStopFrameBase.
MozReview-Commit-ID: 9rukuVgOrMm
--- a/layout/svg/nsSVGStopFrame.cpp
+++ b/layout/svg/nsSVGStopFrame.cpp
@@ -9,25 +9,23 @@
#include "nsGkAtoms.h"
#include "nsStyleContext.h"
#include "nsSVGEffects.h"
// This is a very simple frame whose only purpose is to capture style change
// events and propagate them to the parent. Most of the heavy lifting is done
// within the nsSVGGradientFrame, which is the parent for this frame
-typedef nsFrame nsSVGStopFrameBase;
-
-class nsSVGStopFrame : public nsSVGStopFrameBase
+class nsSVGStopFrame : public nsFrame
{
friend nsIFrame*
NS_NewSVGStopFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
protected:
explicit nsSVGStopFrame(nsStyleContext* aContext)
- : nsSVGStopFrameBase(aContext)
+ : nsFrame(aContext)
{
AddStateBits(NS_FRAME_IS_NONDISPLAY);
}
public:
NS_DECL_FRAMEARENA_HELPERS
// nsIFrame interface:
@@ -49,17 +47,17 @@ public:
* Get the "type" of the frame
*
* @see nsGkAtoms::svgStopFrame
*/
virtual nsIAtom* GetType() const override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
{
- return nsSVGStopFrameBase::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("SVGStop"), aResult);
}
#endif
@@ -76,17 +74,17 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGStopFram
#ifdef DEBUG
void
nsSVGStopFrame::Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow)
{
NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::stop), "Content is not a stop element");
- nsSVGStopFrameBase::Init(aContent, aParent, aPrevInFlow);
+ nsFrame::Init(aContent, aParent, aPrevInFlow);
}
#endif /* DEBUG */
nsIAtom *
nsSVGStopFrame::GetType() const
{
return nsGkAtoms::svgStopFrame;
}
@@ -99,18 +97,17 @@ nsSVGStopFrame::AttributeChanged(int32_t
if (aNameSpaceID == kNameSpaceID_None &&
aAttribute == nsGkAtoms::offset) {
MOZ_ASSERT(GetParent()->GetType() == nsGkAtoms::svgLinearGradientFrame ||
GetParent()->GetType() == nsGkAtoms::svgRadialGradientFrame,
"Observers observe the gradient, so that's what we must invalidate");
nsSVGEffects::InvalidateDirectRenderingObservers(GetParent());
}
- return nsSVGStopFrameBase::AttributeChanged(aNameSpaceID,
- aAttribute, aModType);
+ return nsFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
}
// -------------------------------------------------------------------------
// Public functions
// -------------------------------------------------------------------------
nsIFrame* NS_NewSVGStopFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext)