Bug 1803917 - Remove virtual keyword from override methods in SVG layout r=emilio

Depends on D163775

Differential Revision: https://phabricator.services.mozilla.com/D163776
This commit is contained in:
Robert Longson 2022-12-03 19:18:26 +00:00
Родитель 8ef190fc79
Коммит b4812f4d4b
17 изменённых файлов: 226 добавлений и 228 удалений

Просмотреть файл

@ -42,11 +42,11 @@ class SVGClipPathFrame final : public SVGContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGClipPathFrame)
// nsIFrame methods:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
virtual bool IsSVGTransformed(Matrix* aOwnTransforms,
Matrix* aFromParentTransforms) const override;
bool IsSVGTransformed(Matrix* aOwnTransforms,
Matrix* aFromParentTransforms) const override;
// SVGClipPathFrame methods:
@ -112,14 +112,14 @@ class SVGClipPathFrame final : public SVGContainerFrame {
bool IsValid();
// nsIFrame interface:
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGClipPath"_ns, aResult);
}
#endif
@ -137,7 +137,7 @@ class SVGClipPathFrame final : public SVGContainerFrame {
private:
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override;
gfxMatrix GetCanvasTM() override;
already_AddRefed<DrawTarget> CreateClipMask(gfxContext& aReferenceContext,
gfx::IntPoint& aOffset);

Просмотреть файл

@ -76,9 +76,9 @@ class SVGContainerFrame : public nsContainerFrame {
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
const nsLineList::iterator* aPrevFrameLine,
nsFrameList&& aFrameList) override;
virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override {
bool IsFrameOfType(uint32_t aFlags) const override {
if (aFlags & eSupportsContainLayoutAndPaint) {
return false;
}
@ -87,8 +87,8 @@ class SVGContainerFrame : public nsContainerFrame {
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
bool ComputeCustomOverflow(mozilla::OverflowAreas& aOverflowAreas) override;
@ -129,28 +129,27 @@ class SVGDisplayContainerFrame : public SVGContainerFrame,
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
const nsLineList::iterator* aPrevFrameLine,
nsFrameList&& aFrameList) override;
virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
virtual bool IsSVGTransformed(
Matrix* aOwnTransform = nullptr,
Matrix* aFromParentTransform = nullptr) const override;
bool IsSVGTransformed(Matrix* aOwnTransform = nullptr,
Matrix* aFromParentTransform = nullptr) const override;
// ISVGDisplayableFrame interface:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
virtual void ReflowSVG() override;
virtual void NotifySVGChanged(uint32_t aFlags) override;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
virtual bool IsDisplayContainer() override { return true; }
virtual gfxMatrix GetCanvasTM() override;
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
void ReflowSVG() override;
void NotifySVGChanged(uint32_t aFlags) override;
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
bool IsDisplayContainer() override { return true; }
gfxMatrix GetCanvasTM() override;
protected:
/**

Просмотреть файл

@ -48,15 +48,15 @@ class SVGFilterFrame final : public SVGContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGFilterFrame)
// nsIFrame methods:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
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;
#ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
private:

Просмотреть файл

@ -35,25 +35,25 @@ class SVGForeignObjectFrame final : public nsContainerFrame,
NS_DECL_FRAMEARENA_HELPERS(SVGForeignObjectFrame)
// nsIFrame:
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) override;
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
virtual nsContainerFrame* GetContentInsertionFrame() override {
nsContainerFrame* GetContentInsertionFrame() override {
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
}
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override {
bool IsFrameOfType(uint32_t aFlags) const override {
if (aFlags & eSupportsContainLayoutAndPaint) {
return false;
}
@ -61,25 +61,25 @@ class SVGForeignObjectFrame final : public nsContainerFrame,
return nsContainerFrame::IsFrameOfType(aFlags & ~nsIFrame::eSVG);
}
virtual bool IsSVGTransformed(Matrix* aOwnTransform,
Matrix* aFromParentTransform) const override;
bool IsSVGTransformed(Matrix* aOwnTransform,
Matrix* aFromParentTransform) const override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGForeignObject"_ns, aResult);
}
#endif
// ISVGDisplayableFrame interface:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
virtual void ReflowSVG() override;
virtual void NotifySVGChanged(uint32_t aFlags) override;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
virtual bool IsDisplayContainer() override { return true; }
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
void ReflowSVG() override;
void NotifySVGChanged(uint32_t aFlags) override;
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
bool IsDisplayContainer() override { return true; }
gfxMatrix GetCanvasTM();
@ -88,7 +88,7 @@ class SVGForeignObjectFrame final : public nsContainerFrame,
// Return our ::-moz-svg-foreign-content anonymous box.
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
protected:
// implementation helpers:

Просмотреть файл

@ -35,19 +35,19 @@ class SVGGFrame : public SVGDisplayContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGGFrame)
#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
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGG"_ns, aResult);
}
#endif
// nsIFrame interface:
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
};
} // namespace mozilla

Просмотреть файл

@ -64,10 +64,10 @@ class SVGGeometryFrame : public nsIFrame, public ISVGDisplayableFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGGeometryFrame)
// nsIFrame interface:
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual bool IsFrameOfType(uint32_t aFlags) const override {
bool IsFrameOfType(uint32_t aFlags) const override {
if (aFlags & eSupportsContainLayoutAndPaint) {
return false;
}
@ -75,23 +75,22 @@ class SVGGeometryFrame : public nsIFrame, public ISVGDisplayableFrame {
return nsIFrame::IsFrameOfType(aFlags & ~nsIFrame::eSVG);
}
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
virtual bool IsSVGTransformed(
Matrix* aOwnTransforms = nullptr,
Matrix* aFromParentTransforms = nullptr) const override;
bool IsSVGTransformed(Matrix* aOwnTransforms = nullptr,
Matrix* aFromParentTransforms = nullptr) const override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGGeometry"_ns, aResult);
}
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
// SVGGeometryFrame methods
gfxMatrix GetCanvasTM();
@ -100,15 +99,15 @@ class SVGGeometryFrame : public nsIFrame, public ISVGDisplayableFrame {
protected:
// ISVGDisplayableFrame interface:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
virtual void ReflowSVG() override;
virtual void NotifySVGChanged(uint32_t aFlags) override;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
virtual bool IsDisplayContainer() override { return false; }
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
void ReflowSVG() override;
void NotifySVGChanged(uint32_t aFlags) override;
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
bool IsDisplayContainer() override { return false; }
/**
* This function returns a set of bit flags indicating which parts of the
@ -161,10 +160,9 @@ class DisplaySVGGeometry final : public nsPaintedDisplayItem {
NS_DISPLAY_DECL_NAME("DisplaySVGGeometry", TYPE_SVG_GEOMETRY)
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
HitTestState* aState,
nsTArray<nsIFrame*>* aOutFrames) override;
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
HitTestState* aState, nsTArray<nsIFrame*>* aOutFrames) override;
void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
// Whether this part of the SVG should be natively handled by webrender,
// potentially becoming an "active layer" inside a blob image.

Просмотреть файл

@ -49,18 +49,18 @@ class SVGGradientFrame : public SVGPaintServerFrame {
NS_DECL_QUERYFRAME_TARGET(SVGGradientFrame)
// SVGPaintServerFrame methods:
virtual already_AddRefed<gfxPattern> GetPaintServerPattern(
already_AddRefed<gfxPattern> GetPaintServerPattern(
nsIFrame* aSource, const DrawTarget* aDrawTarget,
const gfxMatrix& aContextMatrix, StyleSVGPaint nsStyleSVG::*aFillOrStroke,
float aGraphicOpacity, imgDrawingParams& aImgParams,
const gfxRect* aOverrideBounds) override;
// nsIFrame interface:
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
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGGradient"_ns, aResult);
}
#endif // DEBUG
@ -132,26 +132,26 @@ class SVGLinearGradientFrame final : public SVGGradientFrame {
// nsIFrame interface:
#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;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGLinearGradient"_ns, aResult);
}
#endif // DEBUG
protected:
float GetLengthValue(uint32_t aIndex);
virtual mozilla::dom::SVGLinearGradientElement* GetLinearGradientWithLength(
mozilla::dom::SVGLinearGradientElement* GetLinearGradientWithLength(
uint32_t aIndex,
mozilla::dom::SVGLinearGradientElement* aDefault) override;
virtual bool GradientVectorLengthIsZero() override;
virtual already_AddRefed<gfxPattern> CreateGradient() override;
bool GradientVectorLengthIsZero() override;
already_AddRefed<gfxPattern> CreateGradient() override;
};
// -------------------------------------------------------------------------
@ -173,15 +173,15 @@ class SVGRadialGradientFrame final : public SVGGradientFrame {
// nsIFrame interface:
#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;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGRadialGradient"_ns, aResult);
}
#endif // DEBUG
@ -191,11 +191,11 @@ class SVGRadialGradientFrame final : public SVGGradientFrame {
float GetLengthValue(uint32_t aIndex, float aDefaultValue);
float GetLengthValueFromElement(
uint32_t aIndex, mozilla::dom::SVGRadialGradientElement& aElement);
virtual mozilla::dom::SVGRadialGradientElement* GetRadialGradientWithLength(
mozilla::dom::SVGRadialGradientElement* GetRadialGradientWithLength(
uint32_t aIndex,
mozilla::dom::SVGRadialGradientElement* aDefault) override;
virtual bool GradientVectorLengthIsZero() override;
virtual already_AddRefed<gfxPattern> CreateGradient() override;
bool GradientVectorLengthIsZero() override;
already_AddRefed<gfxPattern> CreateGradient() override;
};
} // namespace mozilla

Просмотреть файл

@ -31,12 +31,13 @@ class SVGImageFrame final : public SVGGeometryFrame, public nsIReflowCallback {
friend nsIFrame* ::NS_NewSVGImageFrame(mozilla::PresShell* aPresShell,
ComputedStyle* aStyle);
virtual bool CreateWebRenderCommands(
wr::DisplayListBuilder& aBuilder, wr::IpcResourceUpdateQueue& aResources,
const layers::StackingContextHelper& aSc,
layers::RenderRootStateManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder, DisplaySVGGeometry* aItem,
bool aDryRun) override;
bool CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder,
wr::IpcResourceUpdateQueue& aResources,
const layers::StackingContextHelper& aSc,
layers::RenderRootStateManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder,
DisplaySVGGeometry* aItem,
bool aDryRun) override;
protected:
explicit SVGImageFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
@ -53,41 +54,41 @@ class SVGImageFrame final : public SVGGeometryFrame, public nsIReflowCallback {
NS_DECL_FRAMEARENA_HELPERS(SVGImageFrame)
// ISVGDisplayableFrame interface:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
virtual void ReflowSVG() override;
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
void ReflowSVG() override;
// SVGGeometryFrame methods:
virtual uint16_t GetHitTestFlags() override;
uint16_t GetHitTestFlags() override;
// nsIFrame interface:
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,
const Maybe<OnNonvisible>& aNonvisibleAction = Nothing()) override;
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) override;
void DidSetComputedStyle(ComputedStyle* aOldStyle) final;
bool GetIntrinsicImageDimensions(gfx::Size& aSize,
AspectRatio& aAspectRatio) const;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGImage"_ns, aResult);
}
#endif
// nsIReflowCallback
virtual bool ReflowFinished() override;
virtual void ReflowCallbackCanceled() override;
bool ReflowFinished() override;
void ReflowCallbackCanceled() override;
/// Always sync decode our image when painting if @aForce is true.
void SetForceSyncDecoding(bool aForce) { mForceSyncDecoding = aForce; }

Просмотреть файл

@ -31,12 +31,12 @@ class SVGInnerSVGFrame final : public SVGViewportFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGInnerSVGFrame)
#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
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGInnerSVG"_ns, aResult);
}
#endif

Просмотреть файл

@ -57,23 +57,23 @@ class SVGMarkerFrame final : public SVGContainerFrame {
// nsIFrame interface:
#ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
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;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGMarker"_ns, aResult);
}
#endif
virtual nsContainerFrame* GetContentInsertionFrame() override {
nsContainerFrame* GetContentInsertionFrame() override {
// Any children must be added to our single anonymous inner frame kid.
MOZ_ASSERT(
PrincipalChildList().FirstChild() &&
@ -101,7 +101,7 @@ class SVGMarkerFrame final : public SVGContainerFrame {
Matrix mMarkerTM;
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override;
gfxMatrix GetCanvasTM() override;
// A helper class to allow us to paint markers safely. The helper
// automatically sets and clears the mInUse flag on the marker frame (to
@ -143,18 +143,18 @@ class SVGMarkerAnonChildFrame final : public SVGDisplayContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGMarkerAnonChildFrame)
#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
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGMarkerAnonChild"_ns, aResult);
}
#endif
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override {
gfxMatrix GetCanvasTM() override {
return static_cast<SVGMarkerFrame*>(GetParent())->GetCanvasTM();
}
};

Просмотреть файл

@ -73,19 +73,19 @@ class SVGMaskFrame final : public SVGContainerFrame {
gfxRect GetMaskArea(nsIFrame* aMaskedFrame);
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
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGMask"_ns, aResult);
}
#endif
@ -103,7 +103,7 @@ class SVGMaskFrame final : public SVGContainerFrame {
bool mInUse;
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override;
gfxMatrix GetCanvasTM() override;
};
} // namespace mozilla

Просмотреть файл

@ -57,10 +57,10 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
#endif
// nsIFrame:
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
nscoord GetMinISize(gfxContext* aRenderingContext) override;
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
virtual IntrinsicSize GetIntrinsicSize() override;
IntrinsicSize GetIntrinsicSize() override;
AspectRatio GetIntrinsicRatio() const override;
SizeComputationResult ComputeSize(
@ -70,20 +70,20 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
const mozilla::StyleSizeOverrides& aSizeOverrides,
ComputeSizeFlags aFlags) override;
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
const ReflowInput& aReflowInput,
nsReflowStatus& aStatus) override;
virtual void DidReflow(nsPresContext* aPresContext,
const ReflowInput* aReflowInput) override;
void DidReflow(nsPresContext* aPresContext,
const ReflowInput* aReflowInput) override;
void UnionChildOverflow(mozilla::OverflowAreas& aOverflowAreas) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
bool IsFrameOfType(uint32_t aFlags) const override {
return SVGDisplayContainerFrame::IsFrameOfType(
@ -92,7 +92,7 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
}
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGOuterSVG"_ns, aResult);
}
#endif
@ -102,10 +102,10 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
void DestroyFrom(nsIFrame* aDestructRoot,
PostDestroyData& aPostDestroyData) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
virtual nsContainerFrame* GetContentInsertionFrame() override {
nsContainerFrame* GetContentInsertionFrame() override {
// Any children must be added to our single anonymous inner frame kid.
MOZ_ASSERT(
PrincipalChildList().FirstChild() &&
@ -121,17 +121,17 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
// ISVGSVGFrame interface:
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
// ISVGDisplayableFrame methods:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override;
gfxMatrix GetCanvasTM() override;
/* Methods to allow descendant SVGForeignObjectFrame frames to register and
* unregister themselves with their nearest SVGOuterSVGFrame ancestor. This
@ -145,7 +145,7 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
void RegisterForeignObject(SVGForeignObjectFrame* aFrame);
void UnregisterForeignObject(SVGForeignObjectFrame* aFrame);
virtual bool HasChildrenOnlyTransform(Matrix* aTransform) const override {
bool HasChildrenOnlyTransform(Matrix* aTransform) const override {
// Our anonymous wrapper child must claim our children-only transforms as
// its own so that our real children (the frames it wraps) are transformed
// by them, and we must pretend we don't have any children-only transforms
@ -247,15 +247,15 @@ class SVGOuterSVGAnonChildFrame final : public SVGDisplayContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGOuterSVGAnonChildFrame)
#ifdef DEBUG
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGOuterSVGAnonChild"_ns, aResult);
}
#endif
@ -264,7 +264,7 @@ class SVGOuterSVGAnonChildFrame final : public SVGDisplayContainerFrame {
Matrix* aFromParentTransform) const override;
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override {
gfxMatrix GetCanvasTM() override {
// GetCanvasTM returns the transform from an SVG frame to the frame's
// SVGOuterSVGFrame's content box, so we do not include any x/y offset
// set on us for any CSS border or padding on our SVGOuterSVGFrame.

Просмотреть файл

@ -73,8 +73,8 @@ class SVGPaintServerFrame : public SVGContainerFrame {
const gfxRect* aOverrideBounds = nullptr) = 0;
// nsIFrame methods:
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override {}
};
} // namespace mozilla

Просмотреть файл

@ -43,7 +43,7 @@ class SVGPatternFrame final : public SVGPaintServerFrame {
explicit SVGPatternFrame(ComputedStyle* aStyle, nsPresContext* aPresContext);
// SVGPaintServerFrame methods:
virtual already_AddRefed<gfxPattern> GetPaintServerPattern(
already_AddRefed<gfxPattern> GetPaintServerPattern(
nsIFrame* aSource, const DrawTarget* aDrawTarget,
const gfxMatrix& aContextMatrix, StyleSVGPaint nsStyleSVG::*aFillOrStroke,
float aGraphicOpacity, imgDrawingParams& aImgParams,
@ -51,19 +51,19 @@ class SVGPatternFrame final : public SVGPaintServerFrame {
public:
// SVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM() override;
gfxMatrix GetCanvasTM() override;
// nsIFrame interface:
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
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
#endif
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGPattern"_ns, aResult);
}
#endif // DEBUG

Просмотреть файл

@ -31,12 +31,12 @@ class SVGSymbolFrame final : public SVGViewportFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGSymbolFrame)
#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
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGSymbol"_ns, aResult);
}
#endif

Просмотреть файл

@ -199,21 +199,21 @@ class SVGTextFrame final : public SVGDisplayContainerFrame {
NS_DECL_FRAMEARENA_HELPERS(SVGTextFrame)
// nsIFrame:
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void Init(nsIContent* aContent, nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
virtual nsresult AttributeChanged(int32_t aNamespaceID, nsAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNamespaceID, nsAtom* aAttribute,
int32_t aModType) override;
virtual nsContainerFrame* GetContentInsertionFrame() override {
nsContainerFrame* GetContentInsertionFrame() override {
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
}
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aLists) override;
#ifdef DEBUG_FRAME_DUMP
virtual nsresult GetFrameName(nsAString& aResult) const override {
nsresult GetFrameName(nsAString& aResult) const override {
return MakeFrameName(u"SVGText"_ns, aResult);
}
#endif
@ -221,18 +221,18 @@ class SVGTextFrame final : public SVGDisplayContainerFrame {
/**
* Finds the nsTextFrame for the closest rendered run to the specified point.
*/
virtual void FindCloserFrameForSelection(
void FindCloserFrameForSelection(
const nsPoint& aPoint, FrameWithDistance* aCurrentBestFrame) override;
// ISVGDisplayableFrame interface:
virtual void NotifySVGChanged(uint32_t aFlags) override;
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
virtual void ReflowSVG() override;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
void NotifySVGChanged(uint32_t aFlags) override;
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
void ReflowSVG() override;
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
// SVG DOM text methods:
uint32_t GetNumberOfChars(nsIContent* aContent);

Просмотреть файл

@ -27,24 +27,24 @@ class SVGViewportFrame : public SVGDisplayContainerFrame, public ISVGSVGFrame {
public:
NS_DECL_ABSTRACT_FRAME(SVGViewportFrame)
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
int32_t aModType) override;
// ISVGDisplayableFrame interface:
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
virtual void ReflowSVG() override;
virtual void NotifySVGChanged(uint32_t aFlags) override;
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
imgDrawingParams& aImgParams,
const nsIntRect* aDirtyRect = nullptr) override;
void ReflowSVG() override;
void NotifySVGChanged(uint32_t aFlags) override;
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) override;
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
// SVGContainerFrame methods:
virtual bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
// ISVGSVGFrame interface:
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
};
} // namespace mozilla