Closed Bug 1915286 Opened 1 year ago Closed 1 year ago

Undefined direction angle if we cannot find a tangent angle in ComputePointAtLength()

Categories

(Core :: CSS Transitions and Animations, defect)

defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Attached file testcase (obsolete) —

It seems we may use an undefined direction angle if the path is just a point. e.g. see the yellow triangle in https://codepen.io/anon/pen/PrLYNw?editors=1100.

Attachment #9421159 - Attachment is obsolete: true
Attached file testcase

See the yellow triangle. It should use 0deg (i.e. toward right).

Attachment #9421160 - Attachment mime type: text/plain → text/html

When ths path length is zero, we may get (0, 0) as the tangent angle
from ComputePointAtLength(). Using (0, 0) to atan2() may get an
undefined result. We should avoid this, so use 0rad. This makes more
sense and match other browsers.

Assignee: nobody → boris.chiou
Pushed by bchiou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d8f66466c14 Use 0rad as the default value if the path length is zero. r=dholbert
Summary: Undefined direction angle if we cannot find a tangle angle in ComputePointAtLength() → Undefined direction angle if we cannot find a tangent angle in ComputePointAtLength()
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47830 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 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: