From 099f57cecad9103f2340576ccf684991cf9aa9c9 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Mon, 23 Jul 2012 12:00:43 +0100 Subject: [PATCH] Bug 767726 - Kill nsISVGChildFrame::DO_NOT_NOTIFY_RENDERING_OBSERVERS. r=longsonr. --HG-- extra : rebase_source : 3242d29a2251c767dc055a9a7d15ce76e27ac2f2 --- layout/svg/base/src/nsISVGChildFrame.h | 7 +++---- layout/svg/base/src/nsSVGAFrame.cpp | 4 ---- layout/svg/base/src/nsSVGClipPathFrame.cpp | 5 +---- layout/svg/base/src/nsSVGContainerFrame.cpp | 4 ---- layout/svg/base/src/nsSVGForeignObjectFrame.cpp | 4 ---- layout/svg/base/src/nsSVGGFrame.cpp | 4 ---- layout/svg/base/src/nsSVGGlyphFrame.cpp | 4 ---- layout/svg/base/src/nsSVGInnerSVGFrame.cpp | 6 +----- layout/svg/base/src/nsSVGMarkerFrame.cpp | 4 +--- layout/svg/base/src/nsSVGMaskFrame.cpp | 4 +--- layout/svg/base/src/nsSVGPathGeometryFrame.cpp | 4 ---- layout/svg/base/src/nsSVGPatternFrame.cpp | 4 +--- layout/svg/base/src/nsSVGTextFrame.cpp | 4 ---- 13 files changed, 8 insertions(+), 50 deletions(-) diff --git a/layout/svg/base/src/nsISVGChildFrame.h b/layout/svg/base/src/nsISVGChildFrame.h index 9c63ebdaacaf..91f5ae42a691 100644 --- a/layout/svg/base/src/nsISVGChildFrame.h +++ b/layout/svg/base/src/nsISVGChildFrame.h @@ -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 diff --git a/layout/svg/base/src/nsSVGAFrame.cpp b/layout/svg/base/src/nsSVGAFrame.cpp index ee6118444335..da0bea4c9d4a 100644 --- a/layout/svg/base/src/nsSVGAFrame.cpp +++ b/layout/svg/base/src/nsSVGAFrame.cpp @@ -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"); diff --git a/layout/svg/base/src/nsSVGClipPathFrame.cpp b/layout/svg/base/src/nsSVGClipPathFrame.cpp index 4c857fec9088..8cfc2377ca1c 100644 --- a/layout/svg/base/src/nsSVGClipPathFrame.cpp +++ b/layout/svg/base/src/nsSVGClipPathFrame.cpp @@ -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 = diff --git a/layout/svg/base/src/nsSVGContainerFrame.cpp b/layout/svg/base/src/nsSVGContainerFrame.cpp index fd9fd8a083b5..a4761d8406bd 100644 --- a/layout/svg/base/src/nsSVGContainerFrame.cpp +++ b/layout/svg/base/src/nsSVGContainerFrame.cpp @@ -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"); diff --git a/layout/svg/base/src/nsSVGForeignObjectFrame.cpp b/layout/svg/base/src/nsSVGForeignObjectFrame.cpp index 45a50c732106..9a4c01602482 100644 --- a/layout/svg/base/src/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/base/src/nsSVGForeignObjectFrame.cpp @@ -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"); diff --git a/layout/svg/base/src/nsSVGGFrame.cpp b/layout/svg/base/src/nsSVGGFrame.cpp index eeb5dca0566b..979f22260914 100644 --- a/layout/svg/base/src/nsSVGGFrame.cpp +++ b/layout/svg/base/src/nsSVGGFrame.cpp @@ -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"); diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp index 7419bf254e4b..c4de07ac898f 100644 --- a/layout/svg/base/src/nsSVGGlyphFrame.cpp +++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp @@ -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"); diff --git a/layout/svg/base/src/nsSVGInnerSVGFrame.cpp b/layout/svg/base/src/nsSVGInnerSVGFrame.cpp index 2c2c6858429f..71dfa2c7bc3a 100644 --- a/layout/svg/base/src/nsSVGInnerSVGFrame.cpp +++ b/layout/svg/base/src/nsSVGInnerSVGFrame.cpp @@ -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 } } diff --git a/layout/svg/base/src/nsSVGMarkerFrame.cpp b/layout/svg/base/src/nsSVGMarkerFrame.cpp index 8575b4a7941a..0e754719635d 100644 --- a/layout/svg/base/src/nsSVGMarkerFrame.cpp +++ b/layout/svg/base/src/nsSVGMarkerFrame.cpp @@ -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); } } diff --git a/layout/svg/base/src/nsSVGMaskFrame.cpp b/layout/svg/base/src/nsSVGMaskFrame.cpp index f8c6efd3f949..21e34f5ad408 100644 --- a/layout/svg/base/src/nsSVGMaskFrame.cpp +++ b/layout/svg/base/src/nsSVGMaskFrame.cpp @@ -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); } diff --git a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp index 1356aaa5f226..b0b555c7b1fd 100644 --- a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp @@ -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"); diff --git a/layout/svg/base/src/nsSVGPatternFrame.cpp b/layout/svg/base/src/nsSVGPatternFrame.cpp index e8865e1f4747..6c6287d8b637 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.cpp +++ b/layout/svg/base/src/nsSVGPatternFrame.cpp @@ -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); } diff --git a/layout/svg/base/src/nsSVGTextFrame.cpp b/layout/svg/base/src/nsSVGTextFrame.cpp index ba68695479dc..ffc7cc7743d5 100644 --- a/layout/svg/base/src/nsSVGTextFrame.cpp +++ b/layout/svg/base/src/nsSVGTextFrame.cpp @@ -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");