mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 699325: Make calcMode="paced" smil animation fall back to calcMode="discrete" when its values have 0 distance between them. r=birtles
This commit is contained in:
parent
f0db867bef
commit
d08be04b58
5
content/smil/crashtests/699325-1.svg
Normal file
5
content/smil/crashtests/699325-1.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<rect fill="blue" height="100" width="100">
|
||||
<animate id="a" attributeName="x" calcMode="paced" values="50; 50; 50"/>
|
||||
</rect>
|
||||
</svg>
|
After Width: | Height: | Size: 182 B |
@ -42,3 +42,4 @@ load 670313-1.svg
|
||||
load 678822-1.svg
|
||||
load 678847-1.svg
|
||||
load 678938-1.svg
|
||||
load 699325-1.svg
|
||||
|
@ -561,6 +561,13 @@ nsSMILAnimationFunction::ComputePacedPosition(const nsSMILValueArray& aValues,
|
||||
if (totalDistance == COMPUTE_DISTANCE_ERROR)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// If we have 0 total distance, then it's unclear where our "paced" position
|
||||
// should be. We can just fail, which drops us into discrete animation mode.
|
||||
// (That's fine, since our values are apparently indistinguishable anyway.)
|
||||
if (totalDistance == 0.0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// total distance we should have moved at this point in time.
|
||||
// (called 'remainingDist' due to how it's used in loop below)
|
||||
double remainingDist = aSimpleProgress * totalDistance;
|
||||
|
Loading…
Reference in New Issue
Block a user