Closed Bug 1397949 Opened 7 years ago Closed 5 years ago

DOMMatrix.prototype.translate doesn't work with one argument

Categories

(Core :: DOM: Core & HTML, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: bjornson, Assigned: saschanaz, NeedInfo)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170904100131

Steps to reproduce:

> var x = new DOMMatrix()
> x.translate(1)
TypeError: Not enough arguments to DOMMatrixReadOnly.translate.

All arguments are optional; y and z should default to 0.
The operation is also incorrect for some overloads. For example:

> x.translate(2,3,4,5).toFloat64Array().join(",")
"1,0,0,0,0,1,0,0,0,0,1,0,2,3,4,1" // wrong
"2,0,0,0,0,3,0,0,0,0,4,0,-5,0,0,1" // <-- correct

---

Most of the DOMMatrix.prototype methods I'm testing have similar issues (e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1397945). Is it helpful if I continue open separate issues, or should Firefox's implementation just be reviewed as a whole?
Looks like the spec has changed at some point.
Yes, the spec here has changed: https://drafts.fxtf.org/geometry/#DOMMatrix

Chromium implements the new spec since https://codereview.chromium.org/2387003002.
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 1397945
Priority: -- → P2
Component: DOM → DOM: Core & HTML
Assignee: nobody → saschanaz
Keywords: checkin-needed

Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5c589c8bb562
Mark all arguments as optional on DOMMatrix translate*()/skew*() r=bzbarsky

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

Documentation updated:

Please advise if there are any remaining issues with the content affected here.

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

Attachment

General

Created:
Updated:
Size: