Support six-parameter version of DOMMatrix scale method
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: bjornson, Assigned: saschanaz)
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: I think DOMMatrix.prototype.scale() is wrong in certain circumstances: (Correct values are per Chrome and my own implementation.) Example 1: > var x = new DOMMatrix() // identity matrix > x.scale(5,-1,2,1,3,2).toFloat64Array().join(",") "5,0,0,0,0,5,0,0,0,0,1,0,4,-8,0,1" // wrong "5,0,0,0,0,-1,0,0,0,0,2,0,-4,6,-2,1" // <-- correct Example 2: > x.scale(2, 3, 2, 0, 0, 0).toFloat64Array().join(",") "2,0,0,0,0,2,0,0,0,0,1,0,-3,-2,0,1" // wrong "2,0,0,0,0,3,0,0,0,0,2,0,0,0,0,1" // <-- correct Example 3: > x.scale(2,3).toFloat64Array().join(",") "2,0,0,0,0,2,0,0,0,0,1,0,-3,0,0,1" // wrong "2,0,0,0,0,3,0,0,0,0,1,0,0,0,0,1" // <-- correct Looks like the argument parsing is perhaps wrong.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Similar to bug 1397949, our scale() method only accepts 3 arguments, which is the reason behind this bug.
Comment 2•5 years ago
|
||
Looks like some people ran into this, so we're adding this to the MDN compat table per https://github.com/mdn/browser-compat-data/pull/3476 which will show up on https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrixReadOnly/scale#Browser_compatibility
Updated•5 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
WPT tests for scale() depends on .fromMatrix()
so I'd say this depends on Bug 1560462.
Assignee | ||
Comment 4•4 years ago
|
||
Adjusted scale() to receive six arguments, scale3d() to allow zero argument, and scaleNonUniform to support only two arguments. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e6484802f1961c7fe881b4d1d7f4309ec19110a7
Assignee | ||
Updated•4 years ago
|
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5084ca5c7896
Align DOMMatrix scale* operations to the spec r=bzbarsky
Comment 6•4 years ago
|
||
bugherder |
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17691 for changes under testing/web-platform/tests
Upstream PR merged
Comment 9•4 years ago
|
||
Documentation updated:
- Updated the DOMMatrix and DOMMatrixReadOnly pages accordingly.
- Submitted BCD PR 4823 to update the compatibility data for the affected methods.
Please advise if there are any remaining issues with the content affected here.
Comment hidden (spam) |
Comment hidden (spam) |
Description
•