Implement canvas getTransform() and setTransform(DOMMatrixInit)
Categories
(Core :: Graphics: Canvas2D, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: tschneider, Assigned: saschanaz)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete, parity-chrome, Whiteboard: [DocArea=Canvas])
Attachments
(4 files, 5 obsolete files)
Comment 2•11 years ago
|
||
Updated•11 years ago
|
Reporter | ||
Comment 4•11 years ago
|
||
Updated•11 years ago
|
Updated•10 years ago
|
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Updated•8 years ago
|
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Comment 14•8 years ago
|
||
Comment 15•8 years ago
|
||
Comment 16•8 years ago
|
||
Comment 17•8 years ago
|
||
Comment 18•8 years ago
|
||
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
Comment 21•8 years ago
|
||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
Comment 24•7 years ago
|
||
Comment 25•7 years ago
|
||
Comment 26•7 years ago
|
||
Comment 27•7 years ago
|
||
Comment 28•7 years ago
|
||
Comment 29•7 years ago
|
||
Comment 30•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 33•7 years ago
|
||
Comment 34•7 years ago
|
||
mozreview-review |
Comment 35•7 years ago
|
||
mozreview-review |
Comment 36•7 years ago
|
||
mozreview-review-reply |
Comment 37•7 years ago
|
||
mozreview-review-reply |
Comment 38•7 years ago
|
||
mozreview-review-reply |
Comment 39•7 years ago
|
||
Assignee | ||
Comment 40•5 years ago
|
||
What made this stale? Mozilla now requires patches be on Phabricator, do you mind try this again there?
Updated•5 years ago
|
Comment 41•5 years ago
|
||
It's nothing mysterious, I've simply been too busy with other tasks to revisit this. I'll try to get it across the finish line as soon as possible, but if someone else wants to beat me to it, that's fine too.
Assignee | ||
Comment 42•5 years ago
•
|
||
Hmm, so I just took a look and it seems LenientFloat makes things complicated. It seems only four methods in the whole IDL are using this, can we just remove them (and do things manually...) to make things simple?
Comment 43•5 years ago
|
||
I'm not sure what the "four methods" are here; there's a bunch of stuff on canvas using [LenientFloat]
.
We _could just change setTransform to do things manually. Then we should probably also wontfix bug 1020975 and remove the comment mentioning it in CanvasPattern
(especially because afaict the spec doesn't have an overload of setTransform using doubles there anyway).
If we end up having multiple things we need to remove [LenientFloat]
from, we may want to just fix bug 1020975 instead.
Assignee | ||
Comment 44•5 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #43)
I'm not sure what the "four methods" are here; there's a bunch of stuff on canvas using
[LenientFloat]
.
Ah... sorry, didn't made my search right.
remove the comment mentioning it in CanvasPattern
I think that comment was to be in CanvasTransform instead...
we may want to just fix bug 1020975 instead.
Is there another extended attribute that would be helped by the fix?
Comment 45•5 years ago
|
||
The fix would be specific to LenientFloat; bug 1020975 as filed is very generic, but all the discussion in there is about LenientFloat.
Assignee | ||
Comment 46•5 years ago
|
||
Hmm, not feeling very great about a fix only for a specific gecko-only attribute...
Assignee | ||
Comment 47•5 years ago
|
||
Adds getTransform() and setTransform() to CanvasRenderingContext2D.
Comment 48•5 years ago
|
||
Thanks for the assist! Note that we still also have to consider performance, as mentioned in comment #37:
What we should do is see whether we have testcases around for setTransform performance. If not, it's worth writing a testcase to get some idea of what the before and after numbers look like, at least in a worst-case microbenchmark.
Assignee | ||
Comment 49•5 years ago
|
||
Should the benchmark thing be filed as another bug?
Comment 50•5 years ago
|
||
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0aea246d01bb
Implement canvas getTransform() and setTransform() r=bzbarsky
Comment 51•5 years ago
|
||
Backed out changeset 0aea246d01bb (bug 928150) for causing build bustages on DOMMatrix.h CLOSED TREEE
Backout revision https://hg.mozilla.org/integration/autoland/rev/9a1a330266a857767b22c8146a3944eb220cdd43
Failure log https://treeherder.mozilla.org/logviewer.html#?job_id=255864377&repo=autoland
saschanaz can you please take a look?
Assignee | ||
Updated•5 years ago
|
Comment 52•5 years ago
|
||
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/3795b8a53b2b
Implement canvas getTransform() and setTransform() r=bzbarsky
Comment 53•5 years ago
|
||
bugherder |
Comment 54•5 years ago
|
||
I've documented the new method and new parameter type for the existing method. See https://github.com/mdn/sprints/issues/2118#issuecomment-531245964 for the full defailts of what I did.
Please can I have a review of the new docs? Thanks!
Comment 55•5 years ago
|
||
Chris, thank you!
One nit: at https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform the text talks about the "matrix" argument "representing a DOMMatrix" object, but that argument is really a "DOMMatrixInit" object. It could be an actual DOMMatrix object, or any object that has the right property names.
The rest looks great.
Comment 56•5 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #55)
Chris, thank you!
One nit: at https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform the text talks about the "matrix" argument "representing a DOMMatrix" object, but that argument is really a "DOMMatrixInit" object. It could be an actual DOMMatrix object, or any object that has the right property names.
The rest looks great.
Thanks Boris, good catch. I've updated the text to reflect this.
Comment 57•5 years ago
|
||
Thank you!
Description
•