Implement Canvas2D resetTransform method

RESOLVED FIXED in mozilla36

Status

()

Core
Canvas: 2D
RESOLVED FIXED
3 years ago
4 months ago

People

(Reporter: fscholz, Assigned: milan)

Tracking

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

unspecified
mozilla36
dev-doc-complete
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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)

Comment 1

3 years ago
Created attachment 8523074 [details] [diff] [review]
Add resetTransform() method and a simple test for it (the test does fail if resetTransform is removed)
Attachment #8523074 - Flags: review?(gwright)
Attachment #8523074 - Flags: review?(bzbarsky)
(Assignee)

Updated

3 years ago
Assignee: nobody → milan
(Assignee)

Updated

3 years ago
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+
(Assignee)

Comment 3

3 years ago
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
(Assignee)

Comment 4

3 years ago
Created attachment 8524699 [details] [diff] [review]
Add resetTransform() and tests for it, and remove it from the list of interfaces that should fail.  Carry r=bz,gw280,khuey
Attachment #8523074 - Attachment is obsolete: true
Attachment #8524699 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/41d8d6b0fbab
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.