Implement Canvas2D resetTransform method

RESOLVED FIXED in mozilla36

Status

()

defect
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: fscholz, Assigned: milan)

Tracking

(Depends on 1 bug, {dev-doc-complete})

unspecified
mozilla36
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [parity-blink][DocArea=Canvas], )

Attachments

(1 attachment, 1 obsolete attachment)

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: 5 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.