зеркало из https://github.com/mozilla/gecko-dev.git
Bug 854765 - Get rid of the DidSetStyleContext overrides in SVG frame code to avoid some major perf hits. r=roc
This commit is contained in:
Родитель
7a225b3fd6
Коммит
cc76ea785a
|
@ -44,8 +44,6 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
|
@ -76,13 +74,6 @@ NS_NewSVGFEContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(SVGFEContainerFrame)
|
||||
|
||||
/* virtual */ void
|
||||
SVGFEContainerFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
SVGFEContainerFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
nsSVGEffects::InvalidateRenderingObservers(this);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
SVGFEContainerFrame::Init(nsIContent* aContent,
|
||||
|
|
|
@ -48,8 +48,6 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
|
@ -75,13 +73,6 @@ NS_NewSVGFEImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(SVGFEImageFrame)
|
||||
|
||||
/* virtual */ void
|
||||
SVGFEImageFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
SVGFEImageFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
nsSVGEffects::InvalidateRenderingObservers(this);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
SVGFEImageFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||
{
|
||||
|
|
|
@ -47,8 +47,6 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
|
@ -74,13 +72,6 @@ NS_NewSVGFELeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
|||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(SVGFELeafFrame)
|
||||
|
||||
/* virtual */ void
|
||||
SVGFELeafFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
SVGFELeafFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
nsSVGEffects::InvalidateRenderingObservers(this);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
SVGFELeafFrame::Init(nsIContent* aContent,
|
||||
|
|
|
@ -118,23 +118,6 @@ nsSVGForeignObjectFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsSVGForeignObjectFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsSVGForeignObjectFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
|
||||
// No need to invalidate before first reflow - that will happen elsewhere.
|
||||
// Moreover we haven't been initialised properly yet so we may not have the
|
||||
// right state bits.
|
||||
if (!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
// XXXperf: probably only need a bounds update if 'font-size' changed and
|
||||
// we have em unit width/height. Or, once we map 'transform' into style,
|
||||
// if some transform property changed.
|
||||
nsSVGEffects::InvalidateRenderingObservers(this);
|
||||
nsSVGUtils::ScheduleReflowSVG(this);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
|
|
|
@ -39,8 +39,6 @@ public:
|
|||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIFrame* GetContentInsertionFrame() {
|
||||
return GetFirstPrincipalChild()->GetContentInsertionFrame();
|
||||
}
|
||||
|
|
|
@ -57,13 +57,6 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGGradientFrame)
|
|||
//----------------------------------------------------------------------
|
||||
// nsIFrame methods:
|
||||
|
||||
/* virtual */ void
|
||||
nsSVGGradientFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsSVGEffects::InvalidateDirectRenderingObservers(this);
|
||||
nsSVGGradientFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSVGGradientFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -53,8 +53,6 @@ public:
|
|||
const gfxRect *aOverrideBounds);
|
||||
|
||||
// nsIFrame interface:
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
|
|
|
@ -131,13 +131,6 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsRenderingContext *aContext,
|
|||
return retval.forget();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsSVGMaskFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsSVGEffects::InvalidateDirectRenderingObservers(this);
|
||||
nsSVGMaskFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSVGMaskFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -37,8 +37,6 @@ public:
|
|||
const gfxMatrix &aMatrix,
|
||||
float aOpacity = 1.0f);
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
|
|
|
@ -120,21 +120,6 @@ nsSVGPathGeometryFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsSVGPathGeometryFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsSVGPathGeometryFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
|
||||
// XXX: we'd like to use the style_hint mechanism and the
|
||||
// ContentStateChanged/AttributeChanged functions for style changes
|
||||
// to get slightly finer granularity, but unfortunately the
|
||||
// style_hints don't map very well onto svg. Here seems to be the
|
||||
// best place to deal with style changes:
|
||||
|
||||
nsSVGEffects::InvalidateRenderingObservers(this);
|
||||
nsSVGUtils::ScheduleReflowSVG(this);
|
||||
}
|
||||
|
||||
nsIAtom *
|
||||
nsSVGPathGeometryFrame::GetType() const
|
||||
{
|
||||
|
|
|
@ -56,8 +56,6 @@ public:
|
|||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
|
|
|
@ -62,13 +62,6 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGPatternFrame)
|
|||
//----------------------------------------------------------------------
|
||||
// nsIFrame methods:
|
||||
|
||||
/* virtual */ void
|
||||
nsSVGPatternFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsSVGEffects::InvalidateDirectRenderingObservers(this);
|
||||
nsSVGPatternFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSVGPatternFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
|
|
|
@ -52,8 +52,6 @@ public:
|
|||
virtual gfxMatrix GetCanvasTM(uint32_t aFor);
|
||||
|
||||
// nsIFrame interface:
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
|
|
|
@ -40,8 +40,6 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE {}
|
||||
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
|
@ -86,13 +84,6 @@ nsSVGStopFrame::Init(nsIContent* aContent,
|
|||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* virtual */ void
|
||||
nsSVGStopFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
nsSVGStopFrameBase::DidSetStyleContext(aOldStyleContext);
|
||||
nsSVGEffects::InvalidateRenderingObservers(this);
|
||||
}
|
||||
|
||||
nsIAtom *
|
||||
nsSVGStopFrame::GetType() const
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче