Closed Bug 1682307 Opened 3 years ago Closed 3 years ago

SVG animateMotion with mpath not working as expected in combination with <head><base href="/"><head/>

Categories

(Core :: SVG, defect)

Firefox 85
defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: arend.lapere, Assigned: longsonr)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Steps to reproduce:

I've created a very, very small example that shows how to break animations that use an mpath with a xlink:href to a path. If you uncomment the head, it will break, an a red dot will be seen in the top left corner. (Please, forgive my lack of giving it the proper boilerplate, I figured "less is more")

I've tested this on Manjaro Linux using KDE Plasma 5.20. The firefox versions tested where 84 and nightly (85 at the time of writing). I've also tested this on webkit browsers, there the issue does not seem to arise.

<!-- <head>
<base href="/">
</head> -->
<svg width="1000px" height="1000px" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<path fill="none" id="coolPath" cursor="pointer" stroke="black" stroke-linecap="round" joint-selector="wrapper" stroke-width="10" stroke-linejoin="round" d="M 1220 370 L 350 370 C 343.3333333333333 370 337.66666666666663 372.3333333333333 333 377 L 327 383 C 322.3333333333333 387.66666666666663 320 393.3333333333333 320 400 L 320 450"></path>
<circle r="8" fill="red"><animateMotion dur="4s" repeatCount="indefinite"><mpath xlink:href="#coolPath"></mpath></animateMotion></circle></g></svg>

Actual results:

The animation is not following the path referenced in the animateMotion tag. What is peculiarm, is that, in one of my other tests, it seems like the animation events are in fact being triggered (start and end was tested), yet no movement occurs. This seems to be triggered by the head>base tag.

Expected results:

I would've expected to see the red ball follow the referenced in combination with a set head>base tag.; as this is very common used in angular apps nowadays. (where this problem occurs).

The workaround is to simply remove it (and for angular users to inject APP_BASE_HREF instead)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → SVG
Product: Firefox → Core
Attached file reporter's testcase
Assignee: nobody → longsonr
Status: UNCONFIRMED → NEW
Ever confirmed: true
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/079ae6e08d0d
use document URI rather than baseURI for local references with SMIL r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26962 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: