Closed Bug 1099148 Opened 10 years ago Closed 10 years ago

Implement Canvas2D resetTransform method

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: fs, Assigned: milan)

References

()

Details

(Keywords: dev-doc-complete, Whiteboard: [parity-blink][DocArea=Canvas])

Attachments

(1 file, 1 obsolete file)

void ctx.resetTransform()
Changes the transformation matrix to the identity matrix (default state).

Currently, ctx.setTransform(1, 0, 0, 1, 0, 0) can be used to achieve the same.

Implemented and enabled by default in Chrome: https://code.google.com/p/chromium/issues/detail?id=277110
WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=84006

MDN: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.resetTransform
Assignee: nobody → milan
Attachment #8523074 - Attachment description: 1099148.p1 → Add resetTransform() method and a simple test for it (the test does fail if resetTransform is removed)
Comment on attachment 8523074 [details] [diff] [review]
Add resetTransform() method and a simple test for it (the test does fail if resetTransform is removed)

Review of attachment 8523074 [details] [diff] [review]:
-----------------------------------------------------------------

There are web-platform tests that probably need to be updated now that this is implemented.

http://mxr.mozilla.org/mozilla-central/source/testing/web-platform/meta/html/dom/interfaces.html.ini#2217

Of course if we still don't pass that test we should figure out why.
Attachment #8523074 - Flags: review?(bzbarsky) → review+
Attachment #8523074 - Flags: review?(gwright) → review+
Thanks for the heads up Kyle - let's see if it passes with the additional change you suggested... https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=97af9314f20b
https://hg.mozilla.org/mozilla-central/rev/41d8d6b0fbab
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Depends on: 1323932
You need to log in before you can comment on or make changes to this bug.