Bug 1348430 - Part 1. (Main) Correct value pass to nsFilterInstance::PaintFilteredFrame in nsSVGUtil. r=mstange

There are two places that use nsFilterInstance::PaintFilteredFrame. One is
nsSVGIntegrationUtil::PaintFilter, we do take care of it in bug 1224207.
Another path is at nsSVGUtils::PaintFrameWithEffects, apparently I missed that
path while working on bug 1224207.

MozReview-Commit-ID: K4MjKa4ZpCR

--HG--
extra : rebase_source : 46696b620b210348052fe554b15abf0c3adedc72
This commit is contained in:
cku 2017-03-20 01:30:32 +08:00
parent c2cd68a689
commit 21d49e1368

View File

@ -482,7 +482,9 @@ public:
}
}
return svgFrame->PaintSVG(aContext, aTransform, dirtyRect);
return svgFrame->PaintSVG(aContext,
nsSVGUtils::GetCSSPxToDevPxMatrix(aTarget),
dirtyRect);
}
};
@ -858,6 +860,13 @@ nsSVGUtils::PaintFrameWithEffects(nsIFrame *aFrame,
aFrame->GetPosition();
dirtyRegion = &tmpDirtyRegion;
}
gfxContextMatrixAutoSaveRestore saver(target);
gfxMatrix devPxToCssPxTM = nsSVGUtils::GetCSSPxToDevPxMatrix(aFrame);
DebugOnly<bool> invertible = devPxToCssPxTM.Invert();
MOZ_ASSERT(invertible);
target->SetMatrix(aTransform * devPxToCssPxTM);
SVGPaintCallback paintCallback;
result =
nsFilterInstance::PaintFilteredFrame(aFrame, target->GetDrawTarget(),