Back out cset c3bf76213a6c (bug 665392) for breaking a testcase from the w3c svg testsuite, 'full-animate-elem-24-t.html'.

This commit is contained in:
Daniel Holbert 2011-09-17 09:18:13 -07:00
parent 3b89aa779a
commit 83154c3b65
3 changed files with 7 additions and 38 deletions

View File

@ -189,6 +189,13 @@ nsSVGGraphicElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
{
gfxMatrix result(aMatrix);
// animateMotion's resulting transform is supposed to apply *on top of*
// any transformations from the |transform| attribute. So since we're
// PRE-multiplying, we need to apply the animateMotion transform *first*.
if (mAnimateMotionTransform) {
result.PreMultiply(*mAnimateMotionTransform);
}
if (mTransforms) {
nsresult rv;
nsCOMPtr<nsIDOMSVGTransformList> transforms;
@ -203,13 +210,6 @@ nsSVGGraphicElement::PrependLocalTransformTo(const gfxMatrix &aMatrix) const
}
}
// <animateMotion>'s transformation is *supplemental* to the |transform|
// attribute and any transformations on ancestors. So, we apply it
// (pre-multiply it) last.
if (mAnimateMotionTransform) {
result.PreMultiply(*mAnimateMotionTransform);
}
return result;
}

View File

@ -1,30 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="reftest-wait">
<!-- Tests for "rotate" interacting with the transform attribute. -->
<script xlink:href="../smil-util.js" type="text/javascript"/>
<script type="text/javascript">
function doTest() {
setTimeAndSnapshot(1, false);
}
window.addEventListener("MozReftestInvalidate", doTest, false);
</script>
<!-- Big green background to match lime.svg -->
<rect height="100%" width="100%" fill="lime"/>
<!-- A "shadow" rect (should be covered up by green rect). The only difference
between this rect and the other one is that this rect has the
|transform| attr set on its <g> parent instead of on it directly. -->
<g transform="translate(0, 50)">
<rect width="50" height="50" fill="red">
<animateMotion begin="0s" dur="1s" fill="freeze" rotate="90"
path="M50 0 h50"/>
</rect>
</g>
<rect width="50" height="50" fill="lime" transform="translate(0, 50)">
<animateMotion begin="0s" dur="1s" fill="freeze" rotate="90"
path="M50 0 h50"/>
</rect>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -8,7 +8,6 @@
== animateMotion-rotate-1a.svg lime.svg
== animateMotion-rotate-1b.svg lime.svg
== animateMotion-rotate-2.svg lime.svg
== animateMotion-rotate-3.svg lime.svg
== animateMotion-to-overridden-1.svg lime.svg
== animateMotion-values-linear-1.svg animateMotion-values-linear-1-ref.svg
== animateMotion-values-paced-1a.svg animateMotion-values-paced-1-ref.svg