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) {
// This is the default implementation for OutputIsTainted.
// Our output is tainted if we have at least one tainted input.
for (const auto& inputIsTainted : aInputsAreTainted) {
if (inputIsTainted) {
return true;
}
}
return false;
return aInputsAreTainted.Contains(true);
}
bool SVGFilterPrimitiveElement::AttributeAffectsRendering(

View File

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

View File

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

View File

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

View File

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

View File

@@ -53,11 +53,11 @@ class SVGFEContainerFrame final : public nsContainerFrame {
#endif
#ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {

View File

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

View File

@@ -37,7 +37,7 @@ class SVGFELeafFrame final : public nsIFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGFELeafFrame)
#ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
@@ -55,7 +55,7 @@ class SVGFELeafFrame final : public nsIFrame {
}
#endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {

View File

@@ -31,7 +31,7 @@ class SVGFEUnstyledLeafFrame final : public nsIFrame {
public:
NS_DECL_FRAMEARENA_HELPERS(SVGFEUnstyledLeafFrame)
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
bool IsFrameOfType(uint32_t aFlags) const override {
@@ -48,7 +48,7 @@ class SVGFEUnstyledLeafFrame final : public nsIFrame {
}
#endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {

View File

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

View File

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

View File

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

View File

@@ -40,7 +40,7 @@ class SVGViewFrame final : public nsIFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGViewFrame)
#ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
@@ -58,7 +58,7 @@ class SVGViewFrame final : public nsIFrame {
}
#endif
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override {