RESOLVED CONFIGURATION CHANGED 84006
support canvas.resetTransform()
https://bugs.webkit.org/show_bug.cgi?id=84006
Summary support canvas.resetTransform()
Lu Guanqun
Reported 2012-04-15 20:22:53 PDT
Support canvas.resetTransform() interface.
Attachments
Patch (7.45 KB, patch)
2012-04-15 20:24 PDT, Lu Guanqun
webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-03 (6.23 MB, application/zip)
2012-04-15 21:49 PDT, WebKit Review Bot
no flags
Patch (7.91 KB, patch)
2012-04-15 21:57 PDT, Lu Guanqun
adele: review-
simon.fraser: commit-queue-
Lu Guanqun
Comment 1 2012-04-15 20:24:32 PDT
WebKit Review Bot
Comment 2 2012-04-15 21:49:25 PDT
Comment on attachment 137269 [details] Patch Attachment 137269 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12408859 New failing tests: platform/chromium/virtual/gpu/fast/canvas/canvas-resetTransform.html fast/canvas/canvas-resetTransform.html
WebKit Review Bot
Comment 3 2012-04-15 21:49:31 PDT
Created attachment 137276 [details] Archive of layout-test-results from ec2-cr-linux-03 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Lu Guanqun
Comment 4 2012-04-15 21:57:39 PDT
Alexey Proskuryakov
Comment 5 2012-04-16 09:11:55 PDT
Comment on attachment 137278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=137278&action=review > Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:670 > + state().m_transform = AffineTransform(); Shouldn't this be makeIdentity()?
Dean Jackson
Comment 6 2012-04-16 12:11:10 PDT
Comment on attachment 137278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=137278&action=review > LayoutTests/fast/canvas/script-tests/canvas-resetTransform.js:15 > +ctx.beginPath(); > +ctx.scale(0.5, 0.5); > +ctx.resetTransform(); > +ctx.fillStyle = 'green'; > +ctx.fillRect(0, 0, 100, 100); > + > +var imageData = ctx.getImageData(1, 1, 98, 98); > +var imgdata = imageData.data; > +shouldBe("imgdata[4]", "0"); > +shouldBe("imgdata[5]", "128"); > +shouldBe("imgdata[6]", "0"); I would expect this test to draw two identical rects with different colours, one with a scale and one after the resetTransform, and test both corners of the imagedata. Am I missing something? And maybe have some debug() statements to explain what's going on. > Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:668 > + if (!ctm.isInvertible()) > + return; Is this behaviour explained anywhere? I can understand why the other transformation functions have it, but in this case we're trying to reset the transform to identity, so I don't know why it is should fail if there is a currently un-invertable state. >> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:670 >> + state().m_transform = AffineTransform(); > > Shouldn't this be makeIdentity()? Agreed.
Adele Peterson
Comment 7 2012-04-19 16:15:23 PDT
Comment on attachment 137278 [details] Patch r- until Dean and Alexey's comments are addressed.
Joseph Pecoraro
Comment 8 2017-07-07 14:28:30 PDT
It seems we already support resetTransform. Lets close this out.
Note You need to log in before you can comment on or make changes to this bug.