Closed Bug 1864378 Opened 11 months ago Closed 11 months ago

SMIL animateMotion along path with repeatCount="indefinite" wrong behavior

Categories

(Core :: SVG, defect)

Firefox 119
defect

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox119 --- wontfix
firefox120 --- wontfix
firefox121 --- fixed

People

(Reporter: thomas.zwick, Assigned: longsonr)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15

Steps to reproduce:

Load the following HTML page into FireFox:

<!DOCTYPE html>
<html>
<body>
<svg viewBox="0 0 1200 600">
<path id="route" fill="none" stroke="#666" d="M0,300 q100,-100 200,0 t200,0 t200,0 t200,0 t200,-50"/>
<g>
<path id="body" d="M0,20 v-7 h7 l7,-7 h14 l7,7 h7 v7z" />
<circle class="tire" cx="10" cy="20" r="5" />
<circle class="tire" cx="32" cy="20" r="5" />
<animateMotion dur="4s" repeatCount="indefinite" fill="remove">
<mpath href="#route" />
</animateMotion>
</g>
</svg>
</body>
</html>

Actual results:

The car moves in 2s from left to right along the path, and waits two seconds at the end. Then it restarts.

Expected results:

The car moves in 4s from left to right along the path, and restarts immediately. This is the behavior in all other actual SMIL renderer and is supposed to be the correct behavior.

Attached file reporter's testcase

would be useful to know if this is a regression.

I'm finding two behavior-changes with mozregression.
CHANGE #1
before: expected results (animation repeats immediately as-expected)
after: car jumps straight to end, no animation.

Pushlog for this change:
Last "before" revision: 578715b6d3fcb21c0b61996347260ef9b119d0d2 (2021-06-09)
First "after" revision: 8508c35e49793fbe402ad2a706a57fabd1c2b0c4 (2021-06-10)
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=578715b6d3fcb21c0b61996347260ef9b119d0d2&tochange=8508c35e49793fbe402ad2a706a57fabd1c2b0c4
(The related change in there would almost certainly be Bug 1340422 since that was an animateMotion-related change)

CHANGE #2:
before: same as "after" for change#1 -- car jumps straight to end, no animation. (Very occasionally, it matches actual-results as described in comment 0)
after: actual results from comment 0 -- animation plays over 2s, and then car pauses for 2s at the end before repeating the animation.

Pushlog for this change:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=538dd2bb87a21d37b945cfac37c738ae3f47a256&tochange=57ecc62058cc468c13c25a616fca43fde36b3e4a
This just contains bug 1803377 which looks like it was intended as a no-behavior-change commit, which makes this quite strange. (I validated the pushlog with targeted mozregression --repo autoland --launch [rev] commands for the before/after revision in the pushlog URL above...

Anyway, it looks like this is mostly a regression from bug 1340422 which maybe has some sort of race-condition component that bug 1803377 tickled somehow.

Regressed by: 1340422

:boris, since you are the author of the regressor, bug 1340422, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(boris.chiou)

If I manually revert bug 1824426 and set layout.css.d-property.enabled to false again then the animation works as expected. So somehow the style vs the attribute values work differently.

Severity: -- → S3
Assignee: nobody → longsonr
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: SMIL animateMotion along path with repeatCount="indefinite" wrong behavior, *not* using 'use' → SMIL animateMotion along path with repeatCount="indefinite" wrong behavior

Set release status flags based on info from the regressing bug 1340422

Looks like Robert is working on this. Thanks. :)

Flags: needinfo?(boris.chiou)
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f270cb9406c7 correct pathSeg traversal for bezier curves r=boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43176 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Upstream PR merged by moz-wptsync-bot

Thanks for the testcase Thomas.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: