Bug 544855 - Make discrete to-animation only visit to value, r=dholbert, a=blocking-betaN+
@ -464,8 +464,9 @@ nsSMILAnimationFunction::InterpolateResult(const nsSMILValueArray& aValues,
|
||||
// spec says to force discrete mode.
|
||||
if (GetCalcMode() == CALC_DISCRETE || NS_FAILED(rv)) {
|
||||
if (IsToAnimation()) {
|
||||
// Two discrete values: our base value, and the val in our array
|
||||
aResult = (simpleProgress < 0.5f) ? aBaseValue : aValues[0];
|
||||
// SMIL 3, 12.6.4: Since a to animation has only 1 value, a discrete to
|
||||
// animation will simply set the to value for the simple duration.
|
||||
aResult = aValues[0];
|
||||
} else {
|
||||
PRUint32 index = (PRUint32) floor(simpleProgress * (aValues.Length()));
|
||||
aResult = aValues[index];
|
||||
|
@ -3,8 +3,8 @@
|
||||
class="reftest-wait"
|
||||
onload="setTimeAndSnapshot(0.0, true)">
|
||||
<script xlink:href="smil-util.js" type="text/javascript"/>
|
||||
<rect x="15" y="15" width="200" height="200" fill="blue">
|
||||
<rect x="15" y="15" width="200" height="100" fill="blue">
|
||||
<animate attributeName="height" calcMode="discrete"
|
||||
to="100" dur="2s"/>
|
||||
to="200" dur="2s"/>
|
||||
</rect>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 386 B |
@ -3,8 +3,8 @@
|
||||
class="reftest-wait"
|
||||
onload="setTimeAndSnapshot(0.99, true)">
|
||||
<script xlink:href="smil-util.js" type="text/javascript"/>
|
||||
<rect x="15" y="15" width="200" height="200" fill="blue">
|
||||
<rect x="15" y="15" width="200" height="100" fill="blue">
|
||||
<animate attributeName="height" calcMode="discrete"
|
||||
to="100" dur="2s"/>
|
||||
to="200" dur="2s"/>
|
||||
</rect>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
@ -165,6 +165,7 @@
|
||||
<animate attributeName="numOctaves"
|
||||
calcMode="discrete"
|
||||
begin="0s" dur="10.1s"
|
||||
from="1"
|
||||
to="4"
|
||||
fill="freeze"/>
|
||||
</feTurbulence>
|
||||
@ -177,6 +178,7 @@
|
||||
<animate attributeName="numOctaves"
|
||||
calcMode="discrete"
|
||||
begin="0s" dur="10s"
|
||||
from="1"
|
||||
to="4"
|
||||
fill="freeze"/>
|
||||
</feTurbulence>
|
||||
@ -192,6 +194,7 @@
|
||||
<animate attributeName="numOctaves"
|
||||
calcMode="discrete"
|
||||
begin="0s" dur="10.1s"
|
||||
from="4"
|
||||
to="1"
|
||||
fill="freeze"/>
|
||||
</feTurbulence>
|
||||
@ -204,6 +207,7 @@
|
||||
<animate attributeName="numOctaves"
|
||||
calcMode="discrete"
|
||||
begin="0s" dur="10s"
|
||||
from="4"
|
||||
to="1"
|
||||
fill="freeze"/>
|
||||
</feTurbulence>
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.9 KiB |
@ -15,6 +15,7 @@
|
||||
<animate attributeName="preserveAspectRatio"
|
||||
calcMode="discrete"
|
||||
begin="0s" dur="2.5s"
|
||||
from="xMidYMid meet"
|
||||
to="xMidYMid slice"
|
||||
fill="freeze"/>
|
||||
<rect width="100%" height="100%" fill="red"/>
|
||||
@ -31,6 +32,7 @@
|
||||
<animate attributeName="preserveAspectRatio"
|
||||
calcMode="discrete"
|
||||
begin="0s" dur="2s"
|
||||
from="xMidYMid meet"
|
||||
to="xMidYMid slice"
|
||||
fill="freeze"/>
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |