diff --git a/dom/svg/SVGFilters.cpp b/dom/svg/SVGFilters.cpp index 5b8874959c31..1b900a0da127 100644 --- a/dom/svg/SVGFilters.cpp +++ b/dom/svg/SVGFilters.cpp @@ -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( diff --git a/dom/svg/SVGMarkerElement.h b/dom/svg/SVGMarkerElement.h index 3904b36a87c6..2fcbf6c326c8 100644 --- a/dom/svg/SVGMarkerElement.h +++ b/dom/svg/SVGMarkerElement.h @@ -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 }; diff --git a/dom/svg/SVGPatternElement.h b/dom/svg/SVGPatternElement.h index 5df515d27467..e82a736938ab 100644 --- a/dom/svg/SVGPatternElement.h +++ b/dom/svg/SVGPatternElement.h @@ -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 mPatternTransform; + UniquePtr mPatternTransform; enum { HREF, XLINK_HREF }; SVGAnimatedString mStringAttributes[2]; diff --git a/dom/svg/SVGViewElement.h b/dom/svg/SVGViewElement.h index 8fec053a04f8..3f3ea2d51878 100644 --- a/dom/svg/SVGViewElement.h +++ b/dom/svg/SVGViewElement.h @@ -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; diff --git a/layout/svg/SVGAFrame.cpp b/layout/svg/SVGAFrame.cpp index cbfdf69e62cb..02ff68d7e7e6 100644 --- a/layout/svg/SVGAFrame.cpp +++ b/layout/svg/SVGAFrame.cpp @@ -29,13 +29,13 @@ class SVGAFrame final : public SVGDisplayContainerFrame { NS_DECL_FRAMEARENA_HELPERS(SVGAFrame) #ifdef DEBUG - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + void Init(nsIContent* aContent, nsContainerFrame* aParent, + nsIFrame* aPrevInFlow) override; #endif // nsIFrame: - virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; #ifdef DEBUG_FRAME_DUMP nsresult GetFrameName(nsAString& aResult) const override { diff --git a/layout/svg/SVGFEContainerFrame.cpp b/layout/svg/SVGFEContainerFrame.cpp index 7427159d19e3..5ff6a6eae4f4 100644 --- a/layout/svg/SVGFEContainerFrame.cpp +++ b/layout/svg/SVGFEContainerFrame.cpp @@ -53,12 +53,12 @@ class SVGFEContainerFrame final : public nsContainerFrame { #endif #ifdef DEBUG - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + void Init(nsIContent* aContent, nsContainerFrame* aParent, + nsIFrame* aPrevInFlow) override; #endif - virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { // We don't maintain a ink overflow rect diff --git a/layout/svg/SVGFEImageFrame.cpp b/layout/svg/SVGFEImageFrame.cpp index 1cfe788d89bf..5ee4f8558deb 100644 --- a/layout/svg/SVGFEImageFrame.cpp +++ b/layout/svg/SVGFEImageFrame.cpp @@ -40,8 +40,8 @@ class SVGFEImageFrame final : public nsIFrame { public: NS_DECL_FRAMEARENA_HELPERS(SVGFEImageFrame) - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + void Init(nsIContent* aContent, nsContainerFrame* aParent, + nsIFrame* aPrevInFlow) override; void Destroy(DestroyContext&) override; bool IsFrameOfType(uint32_t aFlags) const override { @@ -58,8 +58,8 @@ class SVGFEImageFrame final : public nsIFrame { } #endif - virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; void OnVisibilityChange( Visibility aNewVisibility, @@ -87,8 +87,7 @@ NS_IMPL_FRAMEARENA_HELPERS(SVGFEImageFrame) void SVGFEImageFrame::Destroy(DestroyContext& aContext) { DecApproximateVisibleCount(); - nsCOMPtr imageLoader = - do_QueryInterface(nsIFrame::mContent); + nsCOMPtr 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 imageLoader = - do_QueryInterface(nsIFrame::mContent); + nsCOMPtr imageLoader = do_QueryInterface(mContent); if (imageLoader) { imageLoader->FrameCreated(this); } @@ -154,16 +152,11 @@ nsresult SVGFEImageFrame::AttributeChanged(int32_t aNameSpaceID, void SVGFEImageFrame::OnVisibilityChange( Visibility aNewVisibility, const Maybe& aNonvisibleAction) { - nsCOMPtr imageLoader = - do_QueryInterface(nsIFrame::mContent); - if (!imageLoader) { - MOZ_ASSERT_UNREACHABLE("Should have an nsIImageLoadingContent"); - nsIFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction); - return; + nsCOMPtr imageLoader = do_QueryInterface(mContent); + if (imageLoader) { + imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction); } - imageLoader->OnVisibilityChange(aNewVisibility, aNonvisibleAction); - nsIFrame::OnVisibilityChange(aNewVisibility, aNonvisibleAction); } diff --git a/layout/svg/SVGFELeafFrame.cpp b/layout/svg/SVGFELeafFrame.cpp index 6599113fcedb..7a9e5cbaf5d6 100644 --- a/layout/svg/SVGFELeafFrame.cpp +++ b/layout/svg/SVGFELeafFrame.cpp @@ -37,8 +37,8 @@ class SVGFELeafFrame final : public nsIFrame { NS_DECL_FRAMEARENA_HELPERS(SVGFELeafFrame) #ifdef DEBUG - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + void Init(nsIContent* aContent, nsContainerFrame* aParent, + nsIFrame* aPrevInFlow) override; #endif bool IsFrameOfType(uint32_t aFlags) const override { @@ -55,8 +55,8 @@ class SVGFELeafFrame final : public nsIFrame { } #endif - virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { // We don't maintain a ink overflow rect diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp index ababcf57a8bd..b63150a20a51 100644 --- a/layout/svg/SVGFEUnstyledLeafFrame.cpp +++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp @@ -31,8 +31,8 @@ class SVGFEUnstyledLeafFrame final : public nsIFrame { public: NS_DECL_FRAMEARENA_HELPERS(SVGFEUnstyledLeafFrame) - virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsDisplayListSet& aLists) override {} + void BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsDisplayListSet& aLists) override {} bool IsFrameOfType(uint32_t aFlags) const override { if (aFlags & eSupportsContainLayoutAndPaint) { @@ -48,8 +48,8 @@ class SVGFEUnstyledLeafFrame final : public nsIFrame { } #endif - virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { // We don't maintain a ink overflow rect diff --git a/layout/svg/SVGImageFrame.cpp b/layout/svg/SVGImageFrame.cpp index ae1cf1ded7d1..242ee6e25e94 100644 --- a/layout/svg/SVGImageFrame.cpp +++ b/layout/svg/SVGImageFrame.cpp @@ -132,8 +132,7 @@ void SVGImageFrame::Destroy(DestroyContext& aContext) { mReflowCallbackPosted = false; } - nsCOMPtr imageLoader = - do_QueryInterface(nsIFrame::mContent); + nsCOMPtr imageLoader = do_QueryInterface(mContent); if (imageLoader) { imageLoader->FrameDestroyed(this); diff --git a/layout/svg/SVGStopFrame.cpp b/layout/svg/SVGStopFrame.cpp index b838e38f8b9d..c7a3ca933287 100644 --- a/layout/svg/SVGStopFrame.cpp +++ b/layout/svg/SVGStopFrame.cpp @@ -37,15 +37,15 @@ class SVGStopFrame : public nsIFrame { // nsIFrame interface: #ifdef DEBUG - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + 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, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; bool IsFrameOfType(uint32_t aFlags) const override { if (aFlags & eSupportsContainLayoutAndPaint) { diff --git a/layout/svg/SVGSwitchFrame.cpp b/layout/svg/SVGSwitchFrame.cpp index 4238e6b0175e..7a28843b6f6b 100644 --- a/layout/svg/SVGSwitchFrame.cpp +++ b/layout/svg/SVGSwitchFrame.cpp @@ -35,8 +35,8 @@ class SVGSwitchFrame final : public SVGGFrame { NS_DECL_FRAMEARENA_HELPERS(SVGSwitchFrame) #ifdef DEBUG - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + void Init(nsIContent* aContent, nsContainerFrame* aParent, + nsIFrame* aPrevInFlow) override; #endif #ifdef DEBUG_FRAME_DUMP @@ -45,16 +45,16 @@ class SVGSwitchFrame final : public SVGGFrame { } #endif - virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsDisplayListSet& aLists) override; + void BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsDisplayListSet& aLists) override; // ISVGDisplayableFrame interface: - virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform, - imgDrawingParams& aImgParams) override; + 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, - uint32_t aFlags) override; + SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace, + uint32_t aFlags) override; private: nsIFrame* GetActiveChildFrame(); diff --git a/layout/svg/SVGViewFrame.cpp b/layout/svg/SVGViewFrame.cpp index ecaa6f1af7e7..31833613a6e2 100644 --- a/layout/svg/SVGViewFrame.cpp +++ b/layout/svg/SVGViewFrame.cpp @@ -40,8 +40,8 @@ class SVGViewFrame final : public nsIFrame { NS_DECL_FRAMEARENA_HELPERS(SVGViewFrame) #ifdef DEBUG - virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, - nsIFrame* aPrevInFlow) override; + void Init(nsIContent* aContent, nsContainerFrame* aParent, + nsIFrame* aPrevInFlow) override; #endif bool IsFrameOfType(uint32_t aFlags) const override { @@ -58,8 +58,8 @@ class SVGViewFrame final : public nsIFrame { } #endif - virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, - int32_t aModType) override; + nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, + int32_t aModType) override; bool ComputeCustomOverflow(OverflowAreas& aOverflowAreas) override { // We don't maintain a ink overflow rect