Bug 1863206 - Remove virtual keyword from overrides and stop prefixing variables that don't need prefixing r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D192807
This commit is contained in:
Robert Longson
2023-11-05 18:04:53 +00:00
parent b5e164871a
commit 41d16e7e69
13 changed files with 48 additions and 64 deletions

View File

@@ -65,12 +65,7 @@ bool SVGFilterPrimitiveElement::OutputIsTainted(
nsIPrincipal* aReferencePrincipal) { nsIPrincipal* aReferencePrincipal) {
// This is the default implementation for OutputIsTainted. // This is the default implementation for OutputIsTainted.
// Our output is tainted if we have at least one tainted input. // Our output is tainted if we have at least one tainted input.
for (const auto& inputIsTainted : aInputsAreTainted) { return aInputsAreTainted.Contains(true);
if (inputIsTainted) {
return true;
}
}
return false;
} }
bool SVGFilterPrimitiveElement::AttributeAffectsRendering( bool SVGFilterPrimitiveElement::AttributeAffectsRendering(

View File

@@ -73,8 +73,7 @@ class SVGMarkerElement final : public SVGMarkerElementBase {
LengthAttributesInfo GetLengthInfo() override; LengthAttributesInfo GetLengthInfo() override;
EnumAttributesInfo GetEnumInfo() override; EnumAttributesInfo GetEnumInfo() override;
SVGAnimatedOrient* GetAnimatedOrient() override; SVGAnimatedOrient* GetAnimatedOrient() override;
virtual SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio() SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio() override;
override;
SVGAnimatedViewBox* GetAnimatedViewBox() override; SVGAnimatedViewBox* GetAnimatedViewBox() override;
enum { REFX, REFY, MARKERWIDTH, MARKERHEIGHT }; enum { REFX, REFY, MARKERWIDTH, MARKERHEIGHT };

View File

@@ -45,7 +45,7 @@ class SVGPatternElement final : public SVGPatternElementBase {
// SVGSVGElement methods: // SVGSVGElement methods:
bool HasValidDimensions() const override; bool HasValidDimensions() const override;
virtual mozilla::SVGAnimatedTransformList* GetAnimatedTransformList( SVGAnimatedTransformList* GetAnimatedTransformList(
uint32_t aFlags = 0) override; uint32_t aFlags = 0) override;
nsStaticAtom* GetTransformListAttrName() const override { nsStaticAtom* GetTransformListAttrName() const override {
return nsGkAtoms::patternTransform; return nsGkAtoms::patternTransform;
@@ -67,8 +67,7 @@ class SVGPatternElement final : public SVGPatternElementBase {
LengthAttributesInfo GetLengthInfo() override; LengthAttributesInfo GetLengthInfo() override;
EnumAttributesInfo GetEnumInfo() override; EnumAttributesInfo GetEnumInfo() override;
StringAttributesInfo GetStringInfo() override; StringAttributesInfo GetStringInfo() override;
virtual SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio() SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio() override;
override;
SVGAnimatedViewBox* GetAnimatedViewBox() override; SVGAnimatedViewBox* GetAnimatedViewBox() override;
enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT }; enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
@@ -79,7 +78,7 @@ class SVGPatternElement final : public SVGPatternElementBase {
SVGAnimatedEnumeration mEnumAttributes[2]; SVGAnimatedEnumeration mEnumAttributes[2];
static EnumInfo sEnumInfo[2]; static EnumInfo sEnumInfo[2];
UniquePtr<mozilla::SVGAnimatedTransformList> mPatternTransform; UniquePtr<SVGAnimatedTransformList> mPatternTransform;
enum { HREF, XLINK_HREF }; enum { HREF, XLINK_HREF };
SVGAnimatedString mStringAttributes[2]; SVGAnimatedString mStringAttributes[2];

View File

@@ -59,8 +59,7 @@ class SVGViewElement final : public SVGViewElementBase {
static EnumInfo sEnumInfo[1]; static EnumInfo sEnumInfo[1];
SVGAnimatedViewBox* GetAnimatedViewBox() override; SVGAnimatedViewBox* GetAnimatedViewBox() override;
virtual SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio() SVGAnimatedPreserveAspectRatio* GetAnimatedPreserveAspectRatio() override;
override;
SVGAnimatedViewBox mViewBox; SVGAnimatedViewBox mViewBox;
SVGAnimatedPreserveAspectRatio mPreserveAspectRatio; SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;

View File

@@ -29,13 +29,13 @@ class SVGAFrame final : public SVGDisplayContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGAFrame) NS_DECL_FRAMEARENA_HELPERS(SVGAFrame)
#ifdef DEBUG #ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
#endif #endif
// nsIFrame: // nsIFrame:
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
#ifdef DEBUG_FRAME_DUMP #ifdef DEBUG_FRAME_DUMP
nsresult GetFrameName(nsAString& aResult) const override { nsresult GetFrameName(nsAString& aResult) const override {

View File

@@ -53,12 +53,12 @@ class SVGFEContainerFrame final : public nsContainerFrame {
#endif #endif
#ifdef DEBUG #ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
#endif #endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {
// We don't maintain a ink overflow rect // We don't maintain a ink overflow rect

View File

@@ -40,8 +40,8 @@ class SVGFEImageFrame final : public nsIFrame {
public: public:
NS_DECL_FRAMEARENA_HELPERS(SVGFEImageFrame) NS_DECL_FRAMEARENA_HELPERS(SVGFEImageFrame)
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
void Destroy(DestroyContext&) override; void Destroy(DestroyContext&) override;
bool IsFrameOfType(uint32_t aFlags) const override { bool IsFrameOfType(uint32_t aFlags) const override {
@@ -58,8 +58,8 @@ class SVGFEImageFrame final : public nsIFrame {
} }
#endif #endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
void OnVisibilityChange( void OnVisibilityChange(
Visibility aNewVisibility, Visibility aNewVisibility,
@@ -87,8 +87,7 @@ NS_IMPL_FRAMEARENA_HELPERS(SVGFEImageFrame)
void SVGFEImageFrame::Destroy(DestroyContext& aContext) { void SVGFEImageFrame::Destroy(DestroyContext& aContext) {
DecApproximateVisibleCount(); DecApproximateVisibleCount();
nsCOMPtr<nsIImageLoadingContent> imageLoader = nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
do_QueryInterface(nsIFrame::mContent);
if (imageLoader) { if (imageLoader) {
imageLoader->FrameDestroyed(this); imageLoader->FrameDestroyed(this);
} }
@@ -113,8 +112,7 @@ void SVGFEImageFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
// doesn't have that workaround. // doesn't have that workaround.
IncApproximateVisibleCount(); IncApproximateVisibleCount();
nsCOMPtr<nsIImageLoadingContent> imageLoader = nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
do_QueryInterface(nsIFrame::mContent);
if (imageLoader) { if (imageLoader) {
imageLoader->FrameCreated(this); imageLoader->FrameCreated(this);
} }
@@ -154,16 +152,11 @@ nsresult SVGFEImageFrame::AttributeChanged(int32_t aNameSpaceID,
void SVGFEImageFrame::OnVisibilityChange( void SVGFEImageFrame::OnVisibilityChange(
Visibility aNewVisibility, const Maybe<OnNonvisible>& aNonvisibleAction) { Visibility aNewVisibility, const Maybe<OnNonvisible>& aNonvisibleAction) {
nsCOMPtr<nsIImageLoadingContent> imageLoader = nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
do_QueryInterface(nsIFrame::mContent); if (imageLoader) {
if (!imageLoader) { imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction);
MOZ_ASSERT_UNREACHABLE("Should have an nsIImageLoadingContent");
nsIFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
return;
} }
imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction);
nsIFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction); nsIFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction);
} }

View File

@@ -37,8 +37,8 @@ class SVGFELeafFrame final : public nsIFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGFELeafFrame) NS_DECL_FRAMEARENA_HELPERS(SVGFELeafFrame)
#ifdef DEBUG #ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
#endif #endif
bool IsFrameOfType(uint32_t aFlags) const override { bool IsFrameOfType(uint32_t aFlags) const override {
@@ -55,8 +55,8 @@ class SVGFELeafFrame final : public nsIFrame {
} }
#endif #endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {
// We don't maintain a ink overflow rect // We don't maintain a ink overflow rect

View File

@@ -31,8 +31,8 @@ class SVGFEUnstyledLeafFrame final : public nsIFrame {
public: public:
NS_DECL_FRAMEARENA_HELPERS(SVGFEUnstyledLeafFrame) NS_DECL_FRAMEARENA_HELPERS(SVGFEUnstyledLeafFrame)
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {} const nsDisplayListSet& aLists) override {}
bool IsFrameOfType(uint32_t aFlags) const override { bool IsFrameOfType(uint32_t aFlags) const override {
if (aFlags & eSupportsContainLayoutAndPaint) { if (aFlags & eSupportsContainLayoutAndPaint) {
@@ -48,8 +48,8 @@ class SVGFEUnstyledLeafFrame final : public nsIFrame {
} }
#endif #endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {
// We don't maintain a ink overflow rect // We don't maintain a ink overflow rect

View File

@@ -132,8 +132,7 @@ void SVGImageFrame::Destroy(DestroyContext& aContext) {
mReflowCallbackPosted = false; mReflowCallbackPosted = false;
} }
nsCOMPtr<nsIImageLoadingContent> imageLoader = nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(mContent);
do_QueryInterface(nsIFrame::mContent);
if (imageLoader) { if (imageLoader) {
imageLoader->FrameDestroyed(this); imageLoader->FrameDestroyed(this);

View File

@@ -37,15 +37,15 @@ class SVGStopFrame : public nsIFrame {
// nsIFrame interface: // nsIFrame interface:
#ifdef DEBUG #ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
#endif #endif
void BuildDisplayList(nsDisplayListBuilder* aBuilder, void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {} const nsDisplayListSet& aLists) override {}
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
bool IsFrameOfType(uint32_t aFlags) const override { bool IsFrameOfType(uint32_t aFlags) const override {
if (aFlags & eSupportsContainLayoutAndPaint) { if (aFlags & eSupportsContainLayoutAndPaint) {

View File

@@ -35,8 +35,8 @@ class SVGSwitchFrame final : public SVGGFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGSwitchFrame) NS_DECL_FRAMEARENA_HELPERS(SVGSwitchFrame)
#ifdef DEBUG #ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
#endif #endif
#ifdef DEBUG_FRAME_DUMP #ifdef DEBUG_FRAME_DUMP
@@ -45,16 +45,16 @@ class SVGSwitchFrame final : public SVGGFrame {
} }
#endif #endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override; const nsDisplayListSet& aLists) override;
// ISVGDisplayableFrame interface: // ISVGDisplayableFrame interface:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform, void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams) override; imgDrawingParams& aImgParams) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override; nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
void ReflowSVG() override; void ReflowSVG() override;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace, SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override; uint32_t aFlags) override;
private: private:
nsIFrame* GetActiveChildFrame(); nsIFrame* GetActiveChildFrame();

View File

@@ -40,8 +40,8 @@ class SVGViewFrame final : public nsIFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGViewFrame) NS_DECL_FRAMEARENA_HELPERS(SVGViewFrame)
#ifdef DEBUG #ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override; nsIFrame* aPrevInFlow) override;
#endif #endif
bool IsFrameOfType(uint32_t aFlags) const override { bool IsFrameOfType(uint32_t aFlags) const override {
@@ -58,8 +58,8 @@ class SVGViewFrame final : public nsIFrame {
} }
#endif #endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override; int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {
// We don't maintain a ink overflow rect // We don't maintain a ink overflow rect