Bug 1264837 Part 41 - Remove SVGFEImageFrameBase.
MozReview-Commit-ID: Dvff6q8ESvs
--- a/layout/svg/SVGFEImageFrame.cpp
+++ b/layout/svg/SVGFEImageFrame.cpp
@@ -11,25 +11,23 @@
#include "nsLiteralString.h"
#include "nsSVGEffects.h"
#include "nsSVGFilters.h"
#include "mozilla/dom/SVGFEImageElement.h"
using namespace mozilla;
using namespace mozilla::dom;
-typedef nsFrame SVGFEImageFrameBase;
-
-class SVGFEImageFrame : public SVGFEImageFrameBase
+class SVGFEImageFrame : public nsFrame
{
friend nsIFrame*
NS_NewSVGFEImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
protected:
explicit SVGFEImageFrame(nsStyleContext* aContext)
- : SVGFEImageFrameBase(aContext)
+ : nsFrame(aContext)
{
AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
// This frame isn't actually displayed, but it contains an image and we want
// to use the nsImageLoadingContent machinery for managing images, which
// requires visibility tracking, so we enable visibility tracking and
// forcibly mark it visible below.
EnableVisibilityTracking();
@@ -40,17 +38,17 @@ public:
virtual void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override
{
- return SVGFEImageFrameBase::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("SVGFEImage"), aResult);
}
#endif
@@ -84,40 +82,40 @@ NS_NewSVGFEImageFrame(nsIPresShell* aPre
NS_IMPL_FRAMEARENA_HELPERS(SVGFEImageFrame)
/* virtual */ void
SVGFEImageFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
DecApproximateVisibleCount();
nsCOMPtr<nsIImageLoadingContent> imageLoader =
- do_QueryInterface(SVGFEImageFrameBase::mContent);
+ do_QueryInterface(nsFrame::mContent);
if (imageLoader) {
imageLoader->FrameDestroyed(this);
}
- SVGFEImageFrameBase::DestroyFrom(aDestructRoot);
+ nsFrame::DestroyFrom(aDestructRoot);
}
void
SVGFEImageFrame::Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow)
{
NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::feImage),
"Trying to construct an SVGFEImageFrame for a "
"content element that doesn't support the right interfaces");
- SVGFEImageFrameBase::Init(aContent, aParent, aPrevInFlow);
+ nsFrame::Init(aContent, aParent, aPrevInFlow);
// We assume that feImage's are always visible.
IncApproximateVisibleCount();
nsCOMPtr<nsIImageLoadingContent> imageLoader =
- do_QueryInterface(SVGFEImageFrameBase::mContent);
+ do_QueryInterface(nsFrame::mContent);
if (imageLoader) {
imageLoader->FrameCreated(this);
}
}
nsIAtom *
SVGFEImageFrame::GetType() const
{
@@ -139,28 +137,27 @@ SVGFEImageFrame::AttributeChanged(int32_
aAttribute == nsGkAtoms::href) {
if (element->mStringAttributes[SVGFEImageElement::HREF].IsExplicitlySet()) {
element->LoadSVGImage(true, true);
} else {
element->CancelImageRequests(true);
}
}
- return SVGFEImageFrameBase::AttributeChanged(aNameSpaceID,
- aAttribute, aModType);
+ return nsFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType);
}
void
SVGFEImageFrame::OnVisibilityChange(Visibility aNewVisibility,
Maybe<OnNonvisible> aNonvisibleAction)
{
nsCOMPtr<nsIImageLoadingContent> imageLoader =
- do_QueryInterface(SVGFEImageFrameBase::mContent);
+ do_QueryInterface(nsFrame::mContent);
if (!imageLoader) {
MOZ_ASSERT_UNREACHABLE("Should have an nsIImageLoadingContent");
- SVGFEImageFrameBase::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
+ nsFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
return;
}
imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction);
- SVGFEImageFrameBase::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
+ nsFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
}