Bug 767726 - Kill nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS. r=longsonr.

--HG--
extra : rebase_source : 3242d29a2251c767dc055a9a7d15ce76e27ac2f2
This commit is contained in:
Jonathan Watt 2012-07-23 12:00:43 +01:00
parent fcc7f9aa20
commit 099f57ceca
13 changed files with 8 additions and 50 deletions

View File

@ -87,10 +87,9 @@ public:
// COORD_CONTEXT_CHANGED - the dimensions of this frame's coordinate context has
// changed (percentage lengths must be reevaluated)
enum SVGChangedFlags {
DO_NOT_NOTIFY_RENDERING_OBSERVERS = 0x01,
TRANSFORM_CHANGED = 0x02,
COORD_CONTEXT_CHANGED = 0x04,
FULL_ZOOM_CHANGED = 0x08
TRANSFORM_CHANGED = 0x01,
COORD_CONTEXT_CHANGED = 0x02,
FULL_ZOOM_CHANGED = 0x04
};
/**
* This is called on a frame when there has been a change to one of its

View File

@ -126,10 +126,6 @@ nsSVGAFrame::GetType() const
void
nsSVGAFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");

View File

@ -61,7 +61,6 @@ nsSVGClipPathFrame::ClipPaint(nsRenderingContext* aContext,
gfx->Rectangle(gfxRect());
} else {
singleClipPathChild->NotifySVGChanged(
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
nsISVGChildFrame::TRANSFORM_CHANGED);
singleClipPathChild->PaintSVG(aContext, nsnull);
}
@ -94,9 +93,7 @@ nsSVGClipPathFrame::ClipPaint(nsRenderingContext* aContext,
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
if (SVGFrame) {
// The CTM of each frame referencing us can be different.
SVGFrame->NotifySVGChanged(
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
nsISVGChildFrame::TRANSFORM_CHANGED);
SVGFrame->NotifySVGChanged(nsISVGChildFrame::TRANSFORM_CHANGED);
bool isOK = true;
nsSVGClipPathFrame *clipPathFrame =

View File

@ -321,10 +321,6 @@ nsSVGDisplayContainerFrame::ReflowSVG()
void
nsSVGDisplayContainerFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");

View File

@ -473,10 +473,6 @@ nsSVGForeignObjectFrame::ReflowSVG()
void
nsSVGForeignObjectFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");

View File

@ -51,10 +51,6 @@ nsSVGGFrame::GetType() const
void
nsSVGGFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");

View File

@ -554,10 +554,6 @@ nsSVGGlyphFrame::ReflowSVG()
void
nsSVGGlyphFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");

View File

@ -103,10 +103,6 @@ nsSVGInnerSVGFrame::ReflowSVG()
void
nsSVGInnerSVGFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");
@ -147,7 +143,7 @@ nsSVGInnerSVGFrame::NotifySVGChanged(PRUint32 aFlags)
// dimensions:
aFlags &= ~COORD_CONTEXT_CHANGED;
if (!(aFlags & ~DO_NOT_NOTIFY_RENDERING_OBSERVERS)) {
if (!aFlags) {
return; // No notification flags left
}
}

View File

@ -134,9 +134,7 @@ nsSVGMarkerFrame::PaintMark(nsRenderingContext *aContext,
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
if (SVGFrame) {
// The CTM of each frame referencing us may be different.
SVGFrame->NotifySVGChanged(
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
nsISVGChildFrame::TRANSFORM_CHANGED);
SVGFrame->NotifySVGChanged(nsISVGChildFrame::TRANSFORM_CHANGED);
nsSVGUtils::PaintFrameWithEffects(aContext, nsnull, kid);
}
}

View File

@ -104,9 +104,7 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsRenderingContext *aContext,
// The CTM of each frame referencing us can be different
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
if (SVGFrame) {
SVGFrame->NotifySVGChanged(
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
nsISVGChildFrame::TRANSFORM_CHANGED);
SVGFrame->NotifySVGChanged(nsISVGChildFrame::TRANSFORM_CHANGED);
}
nsSVGUtils::PaintFrameWithEffects(&tmpCtx, nsnull, kid);
}

View File

@ -339,10 +339,6 @@ nsSVGPathGeometryFrame::ReflowSVG()
void
nsSVGPathGeometryFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");

View File

@ -299,9 +299,7 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface,
// The CTM of each frame referencing us can be different
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
if (SVGFrame) {
SVGFrame->NotifySVGChanged(
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
nsISVGChildFrame::TRANSFORM_CHANGED);
SVGFrame->NotifySVGChanged(nsISVGChildFrame::TRANSFORM_CHANGED);
}
nsSVGUtils::PaintFrameWithEffects(&context, nsnull, kid);
}

View File

@ -157,10 +157,6 @@ nsSVGTextFrame::GetRotationOfChar(PRUint32 charnum, float *_retval)
void
nsSVGTextFrame::NotifySVGChanged(PRUint32 aFlags)
{
NS_ABORT_IF_FALSE(!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS) ||
(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD),
"Must be NS_STATE_SVG_NONDISPLAY_CHILD!");
NS_ABORT_IF_FALSE(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
"Invalidation logic may need adjusting");