mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 734732 - Rename nsISVGChildFrame::SUPPRESS_INVALIDATION so it's not misleading. r=longsonr.
--HG-- extra : rebase_source : e12bd28657acceec99b7dc723149a72be1b9b75f
This commit is contained in:
parent
d2d06bae65
commit
55a0c649a1
@ -98,13 +98,16 @@ public:
|
||||
|
||||
// Flags to pass to NotifySVGChange:
|
||||
//
|
||||
// SUPPRESS_INVALIDATION - do not invalidate rendered areas (only to be
|
||||
// used in conjunction with TRANSFORM_CHANGED)
|
||||
// DO_NOT_NOTIFY_RENDERING_OBSERVERS - this should only be used when
|
||||
// updating the descendant frames of a clipPath,
|
||||
// mask, pattern or marker frame (or other similar
|
||||
// NS_STATE_SVG_NONDISPLAY_CHILD frame) immediately
|
||||
// prior to painting that frame's descendants.
|
||||
// TRANSFORM_CHANGED - the current transform matrix for this frame has changed
|
||||
// COORD_CONTEXT_CHANGED - the dimensions of this frame's coordinate context has
|
||||
// changed (percentage lengths must be reevaluated)
|
||||
enum SVGChangedFlags {
|
||||
SUPPRESS_INVALIDATION = 0x01,
|
||||
DO_NOT_NOTIFY_RENDERING_OBSERVERS = 0x01,
|
||||
TRANSFORM_CHANGED = 0x02,
|
||||
COORD_CONTEXT_CHANGED = 0x04
|
||||
};
|
||||
|
@ -159,6 +159,13 @@ 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");
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nsnull;
|
||||
|
@ -102,8 +102,9 @@ nsSVGClipPathFrame::ClipPaint(nsRenderingContext* aContext,
|
||||
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
|
||||
if (SVGFrame) {
|
||||
// The CTM of each frame referencing us can be different.
|
||||
SVGFrame->NotifySVGChanged(nsISVGChildFrame::SUPPRESS_INVALIDATION |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
SVGFrame->NotifySVGChanged(
|
||||
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
|
||||
bool isOK = true;
|
||||
nsSVGClipPathFrame *clipPathFrame =
|
||||
|
@ -227,8 +227,12 @@ nsSVGDisplayContainerFrame::InitialUpdate()
|
||||
void
|
||||
nsSVGDisplayContainerFrame::NotifySVGChanged(PRUint32 aFlags)
|
||||
{
|
||||
NS_ASSERTION(aFlags & (TRANSFORM_CHANGED | COORD_CONTEXT_CHANGED),
|
||||
"Invalidation logic may need adjusting");
|
||||
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");
|
||||
|
||||
nsSVGUtils::NotifyChildrenOfSVGChange(this, aFlags);
|
||||
}
|
||||
|
@ -394,6 +394,13 @@ nsSVGForeignObjectFrame::InitialUpdate()
|
||||
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");
|
||||
|
||||
bool reflow = false;
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
@ -405,7 +412,7 @@ nsSVGForeignObjectFrame::NotifySVGChanged(PRUint32 aFlags)
|
||||
// We also seem to get some sort of infinite loop post bug 421584 if we
|
||||
// reflow.
|
||||
mCanvasTM = nsnull;
|
||||
if (!(aFlags & SUPPRESS_INVALIDATION)) {
|
||||
if (!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS)) {
|
||||
UpdateGraphic();
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,13 @@ 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");
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
// make sure our cached transform matrix gets (lazily) updated
|
||||
mCanvasTM = nsnull;
|
||||
|
@ -521,10 +521,17 @@ nsSVGGlyphFrame::InitialUpdate()
|
||||
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");
|
||||
|
||||
if (aFlags & TRANSFORM_CHANGED) {
|
||||
ClearTextRun();
|
||||
}
|
||||
if (!(aFlags & SUPPRESS_INVALIDATION)) {
|
||||
if (!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS)) {
|
||||
nsSVGUtils::UpdateGraphic(this);
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +113,13 @@ nsSVGInnerSVGFrame::PaintSVG(nsRenderingContext *aContext,
|
||||
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");
|
||||
|
||||
if (aFlags & COORD_CONTEXT_CHANGED) {
|
||||
|
||||
nsSVGSVGElement *svg = static_cast<nsSVGSVGElement*>(mContent);
|
||||
|
@ -163,8 +163,9 @@ nsSVGMarkerFrame::PaintMark(nsRenderingContext *aContext,
|
||||
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
|
||||
if (SVGFrame) {
|
||||
// The CTM of each frame referencing us may be different.
|
||||
SVGFrame->NotifySVGChanged(nsISVGChildFrame::SUPPRESS_INVALIDATION |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
SVGFrame->NotifySVGChanged(
|
||||
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
nsSVGUtils::PaintFrameWithEffects(aContext, nsnull, kid);
|
||||
}
|
||||
}
|
||||
|
@ -128,8 +128,9 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsRenderingContext *aContext,
|
||||
// The CTM of each frame referencing us can be different
|
||||
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
|
||||
if (SVGFrame) {
|
||||
SVGFrame->NotifySVGChanged(nsISVGChildFrame::SUPPRESS_INVALIDATION |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
SVGFrame->NotifySVGChanged(
|
||||
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
}
|
||||
nsSVGUtils::PaintFrameWithEffects(&tmpCtx, nsnull, kid);
|
||||
}
|
||||
|
@ -247,7 +247,14 @@ nsSVGPathGeometryFrame::InitialUpdate()
|
||||
void
|
||||
nsSVGPathGeometryFrame::NotifySVGChanged(PRUint32 aFlags)
|
||||
{
|
||||
if (!(aFlags & SUPPRESS_INVALIDATION)) {
|
||||
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");
|
||||
|
||||
if (!(aFlags & DO_NOT_NOTIFY_RENDERING_OBSERVERS)) {
|
||||
nsSVGUtils::UpdateGraphic(this);
|
||||
}
|
||||
}
|
||||
|
@ -327,8 +327,9 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface,
|
||||
// The CTM of each frame referencing us can be different
|
||||
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
|
||||
if (SVGFrame) {
|
||||
SVGFrame->NotifySVGChanged(nsISVGChildFrame::SUPPRESS_INVALIDATION |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
SVGFrame->NotifySVGChanged(
|
||||
nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS |
|
||||
nsISVGChildFrame::TRANSFORM_CHANGED);
|
||||
}
|
||||
nsSVGUtils::PaintFrameWithEffects(&context, nsnull, kid);
|
||||
}
|
||||
|
@ -181,6 +181,13 @@ 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");
|
||||
|
||||
bool updateGlyphMetrics = false;
|
||||
|
||||
if (aFlags & COORD_CONTEXT_CHANGED) {
|
||||
|
Loading…
Reference in New Issue
Block a user