Bug 621210 - Clear cached ctm when painting mask children; r=jwatt; a=roc

This commit is contained in:
Robert Longson 2010-12-24 09:30:01 +00:00
parent 9c8cc5e239
commit 59503b5322
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,17 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=621210 -->
<svg xmlns="http://www.w3.org/2000/svg">
<title>Testcase for re-using an objectBoundingBox mask with a &lt;g&gt; child</title>
<mask id="mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
<g>
<rect width="1" height="1" fill="white"/>
</g>
</mask>
<rect width="100%" height="100%" fill="red"/>
<rect mask="url(#mask)" width="1" height="1" fill="red"/>
<rect mask="url(#mask)" width="100%" height="100%" fill="lime"/>
</svg>

After

Width:  |  Height:  |  Size: 657 B

View File

@ -135,6 +135,7 @@ fails == inline-in-xul-basic-01.xul pass.svg
# Bug 588684
random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-01.svg objectBoundingBox-and-fePointLight-01-ref.svg
== objectBoundingBox-and-mask.svg pass.svg
== objectBoundingBox-and-mask-02.svg pass.svg
== objectBoundingBox-and-pattern-01a.svg objectBoundingBox-and-pattern-01-ref.svg
== objectBoundingBox-and-pattern-01b.svg objectBoundingBox-and-pattern-01-ref.svg
== objectBoundingBox-and-pattern-01c.svg objectBoundingBox-and-pattern-01-ref.svg

View File

@ -121,6 +121,12 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsSVGRenderState *aContext,
for (nsIFrame* kid = mFrames.FirstChild(); kid;
kid = kid->GetNextSibling()) {
// 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);
}
nsSVGUtils::PaintFrameWithEffects(&tmpState, nsnull, kid);
}