Bug 769238 - Rename aEffectsFrame to just aFrame in nsSVGIntegrationUtils. r=dholbert.

This commit is contained in:
Jonathan Watt 2012-06-28 20:51:09 +01:00
parent 7f1bc8526f
commit fca108d98c
2 changed files with 14 additions and 16 deletions

View File

@ -363,13 +363,13 @@ private:
void
nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
nsIFrame* aEffectsFrame,
nsIFrame* aFrame,
const nsRect& aDirtyRect,
nsDisplayListBuilder* aBuilder,
nsDisplayList* aInnerList)
{
#ifdef DEBUG
nsISVGChildFrame *svgChildFrame = do_QueryFrame(aEffectsFrame);
nsISVGChildFrame *svgChildFrame = do_QueryFrame(aFrame);
NS_ASSERTION(!svgChildFrame, "Should never be called on an SVG frame");
#endif
@ -387,7 +387,7 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
* + Merge opacity and masking if both used together.
*/
float opacity = aEffectsFrame->GetStyleDisplay()->mOpacity;
float opacity = aFrame->GetStyleDisplay()->mOpacity;
if (opacity == 0.0f) {
return;
}
@ -395,7 +395,7 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
/* Properties are added lazily and may have been removed by a restyle,
so make sure all applicable ones are set again. */
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aEffectsFrame);
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aFrame);
nsSVGEffects::EffectProperties effectProperties =
nsSVGEffects::GetEffectProperties(firstFrame);
@ -413,14 +413,14 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
gfxContextMatrixAutoSaveRestore matrixAutoSaveRestore(gfx);
PRInt32 appUnitsPerDevPixel =
aEffectsFrame->PresContext()->AppUnitsPerDevPixel();
aFrame->PresContext()->AppUnitsPerDevPixel();
nsPoint firstFrameOffset = GetOffsetToUserSpace(firstFrame);
nsPoint offset = (aBuilder->ToReferenceFrame(firstFrame) - firstFrameOffset).
ToNearestPixels(appUnitsPerDevPixel).
ToAppUnits(appUnitsPerDevPixel);
aCtx->Translate(offset);
gfxMatrix cssPxToDevPxMatrix = GetCSSPxToDevPxMatrix(aEffectsFrame);
gfxMatrix cssPxToDevPxMatrix = GetCSSPxToDevPxMatrix(aFrame);
bool complexEffects = false;
/* Check if we need to do additional operations on this child's
@ -428,7 +428,7 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
if (opacity != 1.0f || maskFrame || (clipPathFrame && !isTrivialClip)) {
complexEffects = true;
gfx->Save();
aCtx->IntersectClip(aEffectsFrame->GetVisualOverflowRect());
aCtx->IntersectClip(aFrame->GetVisualOverflowRect());
gfx->PushGroup(gfxASurface::CONTENT_COLOR_ALPHA);
}
@ -437,18 +437,18 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
*/
if (clipPathFrame && isTrivialClip) {
gfx->Save();
clipPathFrame->ClipPaint(aCtx, aEffectsFrame, cssPxToDevPxMatrix);
clipPathFrame->ClipPaint(aCtx, aFrame, cssPxToDevPxMatrix);
}
/* Paint the child */
if (filterFrame) {
RegularFramePaintCallback callback(aBuilder, aInnerList, aEffectsFrame,
RegularFramePaintCallback callback(aBuilder, aInnerList, aFrame,
offset);
nsRect dirtyRect = aDirtyRect - offset;
filterFrame->PaintFilteredFrame(aCtx, aEffectsFrame, &callback, &dirtyRect);
filterFrame->PaintFilteredFrame(aCtx, aFrame, &callback, &dirtyRect);
} else {
gfx->SetMatrix(matrixAutoSaveRestore.Matrix());
aInnerList->PaintForFrame(aBuilder, aCtx, aEffectsFrame,
aInnerList->PaintForFrame(aBuilder, aCtx, aFrame,
nsDisplayList::PAINT_DEFAULT);
aCtx->Translate(offset);
}
@ -465,14 +465,14 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
gfx->PopGroupToSource();
nsRefPtr<gfxPattern> maskSurface =
maskFrame ? maskFrame->ComputeMaskAlpha(aCtx, aEffectsFrame,
maskFrame ? maskFrame->ComputeMaskAlpha(aCtx, aFrame,
cssPxToDevPxMatrix, opacity) : nsnull;
nsRefPtr<gfxPattern> clipMaskSurface;
if (clipPathFrame && !isTrivialClip) {
gfx->PushGroup(gfxASurface::CONTENT_COLOR_ALPHA);
nsresult rv = clipPathFrame->ClipPaint(aCtx, aEffectsFrame, cssPxToDevPxMatrix);
nsresult rv = clipPathFrame->ClipPaint(aCtx, aFrame, cssPxToDevPxMatrix);
clipMaskSurface = gfx->PopGroup();
if (NS_SUCCEEDED(rv) && clipMaskSurface) {

View File

@ -129,12 +129,10 @@ public:
/**
* Paint non-SVG frame with SVG effects.
* @param aOffset the offset in appunits where aFrame should be positioned
* in aCtx's coordinate system
*/
static void
PaintFramesWithEffects(nsRenderingContext* aCtx,
nsIFrame* aEffectsFrame, const nsRect& aDirtyRect,
nsIFrame* aFrame, const nsRect& aDirtyRect,
nsDisplayListBuilder* aBuilder,
nsDisplayList* aInnerList);