зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8ef190fc79
Коммит
b4812f4d4b
|
@ -42,11 +42,11 @@ class SVGClipPathFrame final : public SVGContainerFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGClipPathFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGClipPathFrame)
|
||||||
|
|
||||||
// nsIFrame methods:
|
// nsIFrame methods:
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override {}
|
const nsDisplayListSet& aLists) override {}
|
||||||
|
|
||||||
virtual bool IsSVGTransformed(Matrix* aOwnTransforms,
|
bool IsSVGTransformed(Matrix* aOwnTransforms,
|
||||||
Matrix* aFromParentTransforms) const override;
|
Matrix* aFromParentTransforms) const override;
|
||||||
|
|
||||||
// SVGClipPathFrame methods:
|
// SVGClipPathFrame methods:
|
||||||
|
|
||||||
|
@ -112,14 +112,14 @@ class SVGClipPathFrame final : public SVGContainerFrame {
|
||||||
bool IsValid();
|
bool IsValid();
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
|
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGClipPath"_ns, aResult);
|
return MakeFrameName(u"SVGClipPath"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -137,7 +137,7 @@ class SVGClipPathFrame final : public SVGContainerFrame {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override;
|
gfxMatrix GetCanvasTM() override;
|
||||||
|
|
||||||
already_AddRefed<DrawTarget> CreateClipMask(gfxContext& aReferenceContext,
|
already_AddRefed<DrawTarget> CreateClipMask(gfxContext& aReferenceContext,
|
||||||
gfx::IntPoint& aOffset);
|
gfx::IntPoint& aOffset);
|
||||||
|
|
|
@ -76,9 +76,9 @@ class SVGContainerFrame : public nsContainerFrame {
|
||||||
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
|
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
|
||||||
const nsLineList::iterator* aPrevFrameLine,
|
const nsLineList::iterator* aPrevFrameLine,
|
||||||
nsFrameList&& aFrameList) override;
|
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) {
|
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -87,8 +87,8 @@ class SVGContainerFrame : public nsContainerFrame {
|
||||||
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
|
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override {}
|
const nsDisplayListSet& aLists) override {}
|
||||||
|
|
||||||
bool ComputeCustomOverflow(mozilla::OverflowAreas& aOverflowAreas) override;
|
bool ComputeCustomOverflow(mozilla::OverflowAreas& aOverflowAreas) override;
|
||||||
|
|
||||||
|
@ -129,28 +129,27 @@ class SVGDisplayContainerFrame : public SVGContainerFrame,
|
||||||
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
|
void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
|
||||||
const nsLineList::iterator* aPrevFrameLine,
|
const nsLineList::iterator* aPrevFrameLine,
|
||||||
nsFrameList&& aFrameList) override;
|
nsFrameList&& aFrameList) override;
|
||||||
virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
|
void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual bool IsSVGTransformed(
|
bool IsSVGTransformed(Matrix* aOwnTransform = nullptr,
|
||||||
Matrix* aOwnTransform = nullptr,
|
Matrix* aFromParentTransform = nullptr) const override;
|
||||||
Matrix* aFromParentTransform = nullptr) const override;
|
|
||||||
|
|
||||||
// ISVGDisplayableFrame interface:
|
// ISVGDisplayableFrame interface:
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||||
virtual void ReflowSVG() override;
|
void ReflowSVG() override;
|
||||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
void NotifySVGChanged(uint32_t aFlags) override;
|
||||||
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||||
uint32_t aFlags) override;
|
uint32_t aFlags) override;
|
||||||
virtual bool IsDisplayContainer() override { return true; }
|
bool IsDisplayContainer() override { return true; }
|
||||||
virtual gfxMatrix GetCanvasTM() override;
|
gfxMatrix GetCanvasTM() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,15 +48,15 @@ class SVGFilterFrame final : public SVGContainerFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGFilterFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGFilterFrame)
|
||||||
|
|
||||||
// nsIFrame methods:
|
// nsIFrame methods:
|
||||||
virtual 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;
|
||||||
|
|
||||||
#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
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -35,25 +35,25 @@ class SVGForeignObjectFrame final : public nsContainerFrame,
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGForeignObjectFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGForeignObjectFrame)
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot,
|
void DestroyFrom(nsIFrame* aDestructRoot,
|
||||||
PostDestroyData& aPostDestroyData) override;
|
PostDestroyData& aPostDestroyData) override;
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
|
|
||||||
virtual nsContainerFrame* GetContentInsertionFrame() override {
|
nsContainerFrame* GetContentInsertionFrame() override {
|
||||||
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
|
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
|
void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
|
||||||
const ReflowInput& aReflowInput,
|
const ReflowInput& aReflowInput,
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const override {
|
bool IsFrameOfType(uint32_t aFlags) const override {
|
||||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -61,25 +61,25 @@ class SVGForeignObjectFrame final : public nsContainerFrame,
|
||||||
return nsContainerFrame::IsFrameOfType(aFlags & ~nsIFrame::eSVG);
|
return nsContainerFrame::IsFrameOfType(aFlags & ~nsIFrame::eSVG);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool IsSVGTransformed(Matrix* aOwnTransform,
|
bool IsSVGTransformed(Matrix* aOwnTransform,
|
||||||
Matrix* aFromParentTransform) const override;
|
Matrix* aFromParentTransform) const override;
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGForeignObject"_ns, aResult);
|
return MakeFrameName(u"SVGForeignObject"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ISVGDisplayableFrame interface:
|
// ISVGDisplayableFrame interface:
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||||
virtual void ReflowSVG() override;
|
void ReflowSVG() override;
|
||||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
void NotifySVGChanged(uint32_t aFlags) override;
|
||||||
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||||
uint32_t aFlags) override;
|
uint32_t aFlags) override;
|
||||||
virtual bool IsDisplayContainer() override { return true; }
|
bool IsDisplayContainer() override { return true; }
|
||||||
|
|
||||||
gfxMatrix GetCanvasTM();
|
gfxMatrix GetCanvasTM();
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class SVGForeignObjectFrame final : public nsContainerFrame,
|
||||||
// Return our ::-moz-svg-foreign-content anonymous box.
|
// Return our ::-moz-svg-foreign-content anonymous box.
|
||||||
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
|
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
|
||||||
|
|
||||||
virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
|
void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// implementation helpers:
|
// implementation helpers:
|
||||||
|
|
|
@ -35,19 +35,19 @@ class SVGGFrame : public SVGDisplayContainerFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGGFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGGFrame)
|
||||||
|
|
||||||
#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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGG"_ns, aResult);
|
return MakeFrameName(u"SVGG"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -64,10 +64,10 @@ class SVGGeometryFrame : public nsIFrame, public ISVGDisplayableFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGGeometryFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGGeometryFrame)
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
virtual bool IsFrameOfType(uint32_t aFlags) const override {
|
bool IsFrameOfType(uint32_t aFlags) const override {
|
||||||
if (aFlags & eSupportsContainLayoutAndPaint) {
|
if (aFlags & eSupportsContainLayoutAndPaint) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -75,23 +75,22 @@ class SVGGeometryFrame : public nsIFrame, public ISVGDisplayableFrame {
|
||||||
return nsIFrame::IsFrameOfType(aFlags & ~nsIFrame::eSVG);
|
return nsIFrame::IsFrameOfType(aFlags & ~nsIFrame::eSVG);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
|
|
||||||
virtual void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
|
void DidSetComputedStyle(ComputedStyle* aOldComputedStyle) override;
|
||||||
|
|
||||||
virtual bool IsSVGTransformed(
|
bool IsSVGTransformed(Matrix* aOwnTransforms = nullptr,
|
||||||
Matrix* aOwnTransforms = nullptr,
|
Matrix* aFromParentTransforms = nullptr) const override;
|
||||||
Matrix* aFromParentTransforms = nullptr) const override;
|
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGGeometry"_ns, aResult);
|
return MakeFrameName(u"SVGGeometry"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
// SVGGeometryFrame methods
|
// SVGGeometryFrame methods
|
||||||
gfxMatrix GetCanvasTM();
|
gfxMatrix GetCanvasTM();
|
||||||
|
@ -100,15 +99,15 @@ class SVGGeometryFrame : public nsIFrame, public ISVGDisplayableFrame {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// ISVGDisplayableFrame interface:
|
// ISVGDisplayableFrame interface:
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||||
virtual void ReflowSVG() override;
|
void ReflowSVG() override;
|
||||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
void NotifySVGChanged(uint32_t aFlags) override;
|
||||||
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||||
uint32_t aFlags) override;
|
uint32_t aFlags) override;
|
||||||
virtual bool IsDisplayContainer() override { return false; }
|
bool IsDisplayContainer() override { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function returns a set of bit flags indicating which parts of the
|
* 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)
|
NS_DISPLAY_DECL_NAME("DisplaySVGGeometry", TYPE_SVG_GEOMETRY)
|
||||||
|
|
||||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||||
HitTestState* aState,
|
HitTestState* aState, nsTArray<nsIFrame*>* aOutFrames) override;
|
||||||
nsTArray<nsIFrame*>* aOutFrames) override;
|
void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
|
||||||
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
|
|
||||||
|
|
||||||
// Whether this part of the SVG should be natively handled by webrender,
|
// Whether this part of the SVG should be natively handled by webrender,
|
||||||
// potentially becoming an "active layer" inside a blob image.
|
// potentially becoming an "active layer" inside a blob image.
|
||||||
|
|
|
@ -49,18 +49,18 @@ class SVGGradientFrame : public SVGPaintServerFrame {
|
||||||
NS_DECL_QUERYFRAME_TARGET(SVGGradientFrame)
|
NS_DECL_QUERYFRAME_TARGET(SVGGradientFrame)
|
||||||
|
|
||||||
// SVGPaintServerFrame methods:
|
// SVGPaintServerFrame methods:
|
||||||
virtual already_AddRefed<gfxPattern> GetPaintServerPattern(
|
already_AddRefed<gfxPattern> GetPaintServerPattern(
|
||||||
nsIFrame* aSource, const DrawTarget* aDrawTarget,
|
nsIFrame* aSource, const DrawTarget* aDrawTarget,
|
||||||
const gfxMatrix& aContextMatrix, StyleSVGPaint nsStyleSVG::*aFillOrStroke,
|
const gfxMatrix& aContextMatrix, StyleSVGPaint nsStyleSVG::*aFillOrStroke,
|
||||||
float aGraphicOpacity, imgDrawingParams& aImgParams,
|
float aGraphicOpacity, imgDrawingParams& aImgParams,
|
||||||
const gfxRect* aOverrideBounds) override;
|
const gfxRect* aOverrideBounds) override;
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGGradient"_ns, aResult);
|
return MakeFrameName(u"SVGGradient"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
@ -132,26 +132,26 @@ class SVGLinearGradientFrame final : public SVGGradientFrame {
|
||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGLinearGradient"_ns, aResult);
|
return MakeFrameName(u"SVGLinearGradient"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float GetLengthValue(uint32_t aIndex);
|
float GetLengthValue(uint32_t aIndex);
|
||||||
virtual mozilla::dom::SVGLinearGradientElement* GetLinearGradientWithLength(
|
mozilla::dom::SVGLinearGradientElement* GetLinearGradientWithLength(
|
||||||
uint32_t aIndex,
|
uint32_t aIndex,
|
||||||
mozilla::dom::SVGLinearGradientElement* aDefault) override;
|
mozilla::dom::SVGLinearGradientElement* aDefault) override;
|
||||||
virtual bool GradientVectorLengthIsZero() override;
|
bool GradientVectorLengthIsZero() override;
|
||||||
virtual already_AddRefed<gfxPattern> CreateGradient() override;
|
already_AddRefed<gfxPattern> CreateGradient() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
@ -173,15 +173,15 @@ class SVGRadialGradientFrame final : public SVGGradientFrame {
|
||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGRadialGradient"_ns, aResult);
|
return MakeFrameName(u"SVGRadialGradient"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
@ -191,11 +191,11 @@ class SVGRadialGradientFrame final : public SVGGradientFrame {
|
||||||
float GetLengthValue(uint32_t aIndex, float aDefaultValue);
|
float GetLengthValue(uint32_t aIndex, float aDefaultValue);
|
||||||
float GetLengthValueFromElement(
|
float GetLengthValueFromElement(
|
||||||
uint32_t aIndex, mozilla::dom::SVGRadialGradientElement& aElement);
|
uint32_t aIndex, mozilla::dom::SVGRadialGradientElement& aElement);
|
||||||
virtual mozilla::dom::SVGRadialGradientElement* GetRadialGradientWithLength(
|
mozilla::dom::SVGRadialGradientElement* GetRadialGradientWithLength(
|
||||||
uint32_t aIndex,
|
uint32_t aIndex,
|
||||||
mozilla::dom::SVGRadialGradientElement* aDefault) override;
|
mozilla::dom::SVGRadialGradientElement* aDefault) override;
|
||||||
virtual bool GradientVectorLengthIsZero() override;
|
bool GradientVectorLengthIsZero() override;
|
||||||
virtual already_AddRefed<gfxPattern> CreateGradient() override;
|
already_AddRefed<gfxPattern> CreateGradient() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -31,12 +31,13 @@ class SVGImageFrame final : public SVGGeometryFrame, public nsIReflowCallback {
|
||||||
friend nsIFrame* ::NS_NewSVGImageFrame(mozilla::PresShell* aPresShell,
|
friend nsIFrame* ::NS_NewSVGImageFrame(mozilla::PresShell* aPresShell,
|
||||||
ComputedStyle* aStyle);
|
ComputedStyle* aStyle);
|
||||||
|
|
||||||
virtual bool CreateWebRenderCommands(
|
bool CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder,
|
||||||
wr::DisplayListBuilder& aBuilder, wr::IpcResourceUpdateQueue& aResources,
|
wr::IpcResourceUpdateQueue& aResources,
|
||||||
const layers::StackingContextHelper& aSc,
|
const layers::StackingContextHelper& aSc,
|
||||||
layers::RenderRootStateManager* aManager,
|
layers::RenderRootStateManager* aManager,
|
||||||
nsDisplayListBuilder* aDisplayListBuilder, DisplaySVGGeometry* aItem,
|
nsDisplayListBuilder* aDisplayListBuilder,
|
||||||
bool aDryRun) override;
|
DisplaySVGGeometry* aItem,
|
||||||
|
bool aDryRun) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit SVGImageFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
|
explicit SVGImageFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
|
||||||
|
@ -53,41 +54,41 @@ class SVGImageFrame final : public SVGGeometryFrame, public nsIReflowCallback {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGImageFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGImageFrame)
|
||||||
|
|
||||||
// ISVGDisplayableFrame interface:
|
// ISVGDisplayableFrame interface:
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||||
virtual void ReflowSVG() override;
|
void ReflowSVG() override;
|
||||||
|
|
||||||
// SVGGeometryFrame methods:
|
// SVGGeometryFrame methods:
|
||||||
virtual uint16_t GetHitTestFlags() override;
|
uint16_t GetHitTestFlags() override;
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
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,
|
||||||
const Maybe<OnNonvisible>& aNonvisibleAction = Nothing()) override;
|
const Maybe<OnNonvisible>& aNonvisibleAction = Nothing()) override;
|
||||||
|
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
virtual void DestroyFrom(nsIFrame* aDestructRoot,
|
void DestroyFrom(nsIFrame* aDestructRoot,
|
||||||
PostDestroyData& aPostDestroyData) override;
|
PostDestroyData& aPostDestroyData) override;
|
||||||
void DidSetComputedStyle(ComputedStyle* aOldStyle) final;
|
void DidSetComputedStyle(ComputedStyle* aOldStyle) final;
|
||||||
|
|
||||||
bool GetIntrinsicImageDimensions(gfx::Size& aSize,
|
bool GetIntrinsicImageDimensions(gfx::Size& aSize,
|
||||||
AspectRatio& aAspectRatio) const;
|
AspectRatio& aAspectRatio) const;
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGImage"_ns, aResult);
|
return MakeFrameName(u"SVGImage"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// nsIReflowCallback
|
// nsIReflowCallback
|
||||||
virtual bool ReflowFinished() override;
|
bool ReflowFinished() override;
|
||||||
virtual void ReflowCallbackCanceled() override;
|
void ReflowCallbackCanceled() override;
|
||||||
|
|
||||||
/// Always sync decode our image when painting if @aForce is true.
|
/// Always sync decode our image when painting if @aForce is true.
|
||||||
void SetForceSyncDecoding(bool aForce) { mForceSyncDecoding = aForce; }
|
void SetForceSyncDecoding(bool aForce) { mForceSyncDecoding = aForce; }
|
||||||
|
|
|
@ -31,12 +31,12 @@ class SVGInnerSVGFrame final : public SVGViewportFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGInnerSVGFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGInnerSVGFrame)
|
||||||
|
|
||||||
#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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGInnerSVG"_ns, aResult);
|
return MakeFrameName(u"SVGInnerSVG"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,23 +57,23 @@ class SVGMarkerFrame final : public SVGContainerFrame {
|
||||||
|
|
||||||
// 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
|
||||||
|
|
||||||
virtual 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;
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGMarker"_ns, aResult);
|
return MakeFrameName(u"SVGMarker"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual nsContainerFrame* GetContentInsertionFrame() override {
|
nsContainerFrame* GetContentInsertionFrame() override {
|
||||||
// Any children must be added to our single anonymous inner frame kid.
|
// Any children must be added to our single anonymous inner frame kid.
|
||||||
MOZ_ASSERT(
|
MOZ_ASSERT(
|
||||||
PrincipalChildList().FirstChild() &&
|
PrincipalChildList().FirstChild() &&
|
||||||
|
@ -101,7 +101,7 @@ class SVGMarkerFrame final : public SVGContainerFrame {
|
||||||
Matrix mMarkerTM;
|
Matrix mMarkerTM;
|
||||||
|
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override;
|
gfxMatrix GetCanvasTM() override;
|
||||||
|
|
||||||
// A helper class to allow us to paint markers safely. The helper
|
// A helper class to allow us to paint markers safely. The helper
|
||||||
// automatically sets and clears the mInUse flag on the marker frame (to
|
// 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)
|
NS_DECL_FRAMEARENA_HELPERS(SVGMarkerAnonChildFrame)
|
||||||
|
|
||||||
#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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGMarkerAnonChild"_ns, aResult);
|
return MakeFrameName(u"SVGMarkerAnonChild"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override {
|
gfxMatrix GetCanvasTM() override {
|
||||||
return static_cast<SVGMarkerFrame*>(GetParent())->GetCanvasTM();
|
return static_cast<SVGMarkerFrame*>(GetParent())->GetCanvasTM();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -73,19 +73,19 @@ class SVGMaskFrame final : public SVGContainerFrame {
|
||||||
|
|
||||||
gfxRect GetMaskArea(nsIFrame* aMaskedFrame);
|
gfxRect GetMaskArea(nsIFrame* aMaskedFrame);
|
||||||
|
|
||||||
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
|
#ifdef DEBUG
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override {}
|
const nsDisplayListSet& aLists) override {}
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGMask"_ns, aResult);
|
return MakeFrameName(u"SVGMask"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -103,7 +103,7 @@ class SVGMaskFrame final : public SVGContainerFrame {
|
||||||
bool mInUse;
|
bool mInUse;
|
||||||
|
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override;
|
gfxMatrix GetCanvasTM() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -57,10 +57,10 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
virtual nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
nscoord GetMinISize(gfxContext* aRenderingContext) override;
|
||||||
virtual nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
nscoord GetPrefISize(gfxContext* aRenderingContext) override;
|
||||||
|
|
||||||
virtual IntrinsicSize GetIntrinsicSize() override;
|
IntrinsicSize GetIntrinsicSize() override;
|
||||||
AspectRatio GetIntrinsicRatio() const override;
|
AspectRatio GetIntrinsicRatio() const override;
|
||||||
|
|
||||||
SizeComputationResult ComputeSize(
|
SizeComputationResult ComputeSize(
|
||||||
|
@ -70,20 +70,20 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
|
||||||
const mozilla::StyleSizeOverrides& aSizeOverrides,
|
const mozilla::StyleSizeOverrides& aSizeOverrides,
|
||||||
ComputeSizeFlags aFlags) override;
|
ComputeSizeFlags aFlags) override;
|
||||||
|
|
||||||
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
|
void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
|
||||||
const ReflowInput& aReflowInput,
|
const ReflowInput& aReflowInput,
|
||||||
nsReflowStatus& aStatus) override;
|
nsReflowStatus& aStatus) override;
|
||||||
|
|
||||||
virtual void DidReflow(nsPresContext* aPresContext,
|
void DidReflow(nsPresContext* aPresContext,
|
||||||
const ReflowInput* aReflowInput) override;
|
const ReflowInput* aReflowInput) override;
|
||||||
|
|
||||||
void UnionChildOverflow(mozilla::OverflowAreas& aOverflowAreas) override;
|
void UnionChildOverflow(mozilla::OverflowAreas& aOverflowAreas) override;
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
bool IsFrameOfType(uint32_t aFlags) const override {
|
bool IsFrameOfType(uint32_t aFlags) const override {
|
||||||
return SVGDisplayContainerFrame::IsFrameOfType(
|
return SVGDisplayContainerFrame::IsFrameOfType(
|
||||||
|
@ -92,7 +92,7 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGOuterSVG"_ns, aResult);
|
return MakeFrameName(u"SVGOuterSVG"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,10 +102,10 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
|
||||||
void DestroyFrom(nsIFrame* aDestructRoot,
|
void DestroyFrom(nsIFrame* aDestructRoot,
|
||||||
PostDestroyData& aPostDestroyData) override;
|
PostDestroyData& aPostDestroyData) override;
|
||||||
|
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
|
|
||||||
virtual nsContainerFrame* GetContentInsertionFrame() override {
|
nsContainerFrame* GetContentInsertionFrame() override {
|
||||||
// Any children must be added to our single anonymous inner frame kid.
|
// Any children must be added to our single anonymous inner frame kid.
|
||||||
MOZ_ASSERT(
|
MOZ_ASSERT(
|
||||||
PrincipalChildList().FirstChild() &&
|
PrincipalChildList().FirstChild() &&
|
||||||
|
@ -121,17 +121,17 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
|
||||||
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
|
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
|
||||||
|
|
||||||
// ISVGSVGFrame interface:
|
// ISVGSVGFrame interface:
|
||||||
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
|
void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
|
||||||
|
|
||||||
// ISVGDisplayableFrame methods:
|
// ISVGDisplayableFrame methods:
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||||
uint32_t aFlags) override;
|
uint32_t aFlags) override;
|
||||||
|
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override;
|
gfxMatrix GetCanvasTM() override;
|
||||||
|
|
||||||
/* Methods to allow descendant SVGForeignObjectFrame frames to register and
|
/* Methods to allow descendant SVGForeignObjectFrame frames to register and
|
||||||
* unregister themselves with their nearest SVGOuterSVGFrame ancestor. This
|
* unregister themselves with their nearest SVGOuterSVGFrame ancestor. This
|
||||||
|
@ -145,7 +145,7 @@ class SVGOuterSVGFrame final : public SVGDisplayContainerFrame,
|
||||||
void RegisterForeignObject(SVGForeignObjectFrame* aFrame);
|
void RegisterForeignObject(SVGForeignObjectFrame* aFrame);
|
||||||
void UnregisterForeignObject(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
|
// Our anonymous wrapper child must claim our children-only transforms as
|
||||||
// its own so that our real children (the frames it wraps) are transformed
|
// 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
|
// 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)
|
NS_DECL_FRAMEARENA_HELPERS(SVGOuterSVGAnonChildFrame)
|
||||||
|
|
||||||
#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 void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGOuterSVGAnonChild"_ns, aResult);
|
return MakeFrameName(u"SVGOuterSVGAnonChild"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -264,7 +264,7 @@ class SVGOuterSVGAnonChildFrame final : public SVGDisplayContainerFrame {
|
||||||
Matrix* aFromParentTransform) const override;
|
Matrix* aFromParentTransform) const override;
|
||||||
|
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override {
|
gfxMatrix GetCanvasTM() override {
|
||||||
// GetCanvasTM returns the transform from an SVG frame to the frame's
|
// 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
|
// 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.
|
// 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;
|
const gfxRect* aOverrideBounds = nullptr) = 0;
|
||||||
|
|
||||||
// nsIFrame methods:
|
// nsIFrame methods:
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override {}
|
const nsDisplayListSet& aLists) override {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SVGPatternFrame final : public SVGPaintServerFrame {
|
||||||
explicit SVGPatternFrame(ComputedStyle* aStyle, nsPresContext* aPresContext);
|
explicit SVGPatternFrame(ComputedStyle* aStyle, nsPresContext* aPresContext);
|
||||||
|
|
||||||
// SVGPaintServerFrame methods:
|
// SVGPaintServerFrame methods:
|
||||||
virtual already_AddRefed<gfxPattern> GetPaintServerPattern(
|
already_AddRefed<gfxPattern> GetPaintServerPattern(
|
||||||
nsIFrame* aSource, const DrawTarget* aDrawTarget,
|
nsIFrame* aSource, const DrawTarget* aDrawTarget,
|
||||||
const gfxMatrix& aContextMatrix, StyleSVGPaint nsStyleSVG::*aFillOrStroke,
|
const gfxMatrix& aContextMatrix, StyleSVGPaint nsStyleSVG::*aFillOrStroke,
|
||||||
float aGraphicOpacity, imgDrawingParams& aImgParams,
|
float aGraphicOpacity, imgDrawingParams& aImgParams,
|
||||||
|
@ -51,19 +51,19 @@ class SVGPatternFrame final : public SVGPaintServerFrame {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual gfxMatrix GetCanvasTM() override;
|
gfxMatrix GetCanvasTM() override;
|
||||||
|
|
||||||
// nsIFrame interface:
|
// nsIFrame interface:
|
||||||
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
|
#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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGPattern"_ns, aResult);
|
return MakeFrameName(u"SVGPattern"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
|
@ -31,12 +31,12 @@ class SVGSymbolFrame final : public SVGViewportFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGSymbolFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGSymbolFrame)
|
||||||
|
|
||||||
#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
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGSymbol"_ns, aResult);
|
return MakeFrameName(u"SVGSymbol"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -199,21 +199,21 @@ class SVGTextFrame final : public SVGDisplayContainerFrame {
|
||||||
NS_DECL_FRAMEARENA_HELPERS(SVGTextFrame)
|
NS_DECL_FRAMEARENA_HELPERS(SVGTextFrame)
|
||||||
|
|
||||||
// nsIFrame:
|
// nsIFrame:
|
||||||
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
||||||
nsIFrame* aPrevInFlow) override;
|
nsIFrame* aPrevInFlow) override;
|
||||||
|
|
||||||
virtual nsresult AttributeChanged(int32_t aNamespaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNamespaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
|
|
||||||
virtual nsContainerFrame* GetContentInsertionFrame() override {
|
nsContainerFrame* GetContentInsertionFrame() override {
|
||||||
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
|
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) override;
|
const nsDisplayListSet& aLists) override;
|
||||||
|
|
||||||
#ifdef DEBUG_FRAME_DUMP
|
#ifdef DEBUG_FRAME_DUMP
|
||||||
virtual nsresult GetFrameName(nsAString& aResult) const override {
|
nsresult GetFrameName(nsAString& aResult) const override {
|
||||||
return MakeFrameName(u"SVGText"_ns, aResult);
|
return MakeFrameName(u"SVGText"_ns, aResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -221,18 +221,18 @@ class SVGTextFrame final : public SVGDisplayContainerFrame {
|
||||||
/**
|
/**
|
||||||
* Finds the nsTextFrame for the closest rendered run to the specified point.
|
* Finds the nsTextFrame for the closest rendered run to the specified point.
|
||||||
*/
|
*/
|
||||||
virtual void FindCloserFrameForSelection(
|
void FindCloserFrameForSelection(
|
||||||
const nsPoint& aPoint, FrameWithDistance* aCurrentBestFrame) override;
|
const nsPoint& aPoint, FrameWithDistance* aCurrentBestFrame) override;
|
||||||
|
|
||||||
// ISVGDisplayableFrame interface:
|
// ISVGDisplayableFrame interface:
|
||||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
void NotifySVGChanged(uint32_t aFlags) override;
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||||
virtual 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;
|
||||||
|
|
||||||
// SVG DOM text methods:
|
// SVG DOM text methods:
|
||||||
uint32_t GetNumberOfChars(nsIContent* aContent);
|
uint32_t GetNumberOfChars(nsIContent* aContent);
|
||||||
|
|
|
@ -27,24 +27,24 @@ class SVGViewportFrame : public SVGDisplayContainerFrame, public ISVGSVGFrame {
|
||||||
public:
|
public:
|
||||||
NS_DECL_ABSTRACT_FRAME(SVGViewportFrame)
|
NS_DECL_ABSTRACT_FRAME(SVGViewportFrame)
|
||||||
|
|
||||||
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||||
int32_t aModType) override;
|
int32_t aModType) override;
|
||||||
|
|
||||||
// ISVGDisplayableFrame interface:
|
// ISVGDisplayableFrame interface:
|
||||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||||
imgDrawingParams& aImgParams,
|
imgDrawingParams& aImgParams,
|
||||||
const nsIntRect* aDirtyRect = nullptr) override;
|
const nsIntRect* aDirtyRect = nullptr) override;
|
||||||
virtual void ReflowSVG() override;
|
void ReflowSVG() override;
|
||||||
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
void NotifySVGChanged(uint32_t aFlags) override;
|
||||||
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
||||||
uint32_t aFlags) override;
|
uint32_t aFlags) override;
|
||||||
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||||
|
|
||||||
// SVGContainerFrame methods:
|
// SVGContainerFrame methods:
|
||||||
virtual bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
|
bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
|
||||||
|
|
||||||
// ISVGSVGFrame interface:
|
// ISVGSVGFrame interface:
|
||||||
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
|
void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
Загрузка…
Ссылка в новой задаче