RESOLVED FIXED Bug 13537
Canvex example starts rendering strangely after a while
https://bugs.webkit.org/show_bug.cgi?id=13537
Summary Canvex example starts rendering strangely after a while
Elliott Sprehn
Reported 2007-04-29 01:13:53 PDT
In some situations the rendering of the <canvas> on <http://canvex.lazyilluminati.com/83/play.xhtml> becomes corrupted. Resizing the canvas with the size links at the top of the page, which seems to reset the canvas buffer and start over generally corrects the rendering. Steps to reproduce: 1. At the start walk directly forward until standing on the edge of the step out of the blue area and stop. 2. Hold the left arrow key and do a 360 degree spin. Another Way: 1. From the start, turn and walk to the left and stop inside the doorway after the door as gone up. 2. Face the inside room area (away from the Firefox logo). 3. Rotate 360 degrees. Some flickering may occur, and different parts of the canvas rendering area may become stuck displaying part of the level, while other parts keep changing. The frame rate should also jump much higher after this. The 360 degree spin isn't strictly required, and the bug can be produced by doing a partial spin as you walk over the step from the blue floored area in the middle of the room as well in other situations. Can't produce this behavior in Opera 9 or Firefox 2, so it doesn't appear to be a bug in the JS.
Attachments
patch; tolerate 0 sizes without raising an exception (9.27 KB, patch)
2007-05-04 22:10 PDT, Darin Adler
hyatt: review+
Elliott Sprehn
Comment 1 2007-04-29 01:54:38 PDT
Reproducible in the latest nightly (Sun Apr 29 3:44:55 GMT 2007).
Alexey Proskuryakov
Comment 2 2007-05-01 03:15:57 PDT
Confirmed with r21199.
Darin Adler
Comment 3 2007-05-04 21:42:23 PDT
I've debugged this and determined that the problem is that Safari's canvas will throw an exception if drawImage arguments are no good. That's what the WhatWG specification says we should do <http://www.whatwg.org/specs/web-apps/current-work/#images>, but here in the Canvex example it's causing us to do a save() without a restore() and the clip is getting stuck.
Darin Adler
Comment 4 2007-05-04 22:10:28 PDT
Created attachment 14347 [details] patch; tolerate 0 sizes without raising an exception
Alexey Proskuryakov
Comment 5 2007-05-04 23:47:44 PDT
See also: bug 11251.
Dave Hyatt
Comment 6 2007-05-06 19:27:04 PDT
Comment on attachment 14347 [details] patch; tolerate 0 sizes without raising an exception r=me
Darin Adler
Comment 7 2007-05-06 20:25:03 PDT
Sending LayoutTests/ChangeLog Deleting LayoutTests/fast/canvas/drawImage-with-invalid-args-expected.checksum Deleting LayoutTests/fast/canvas/drawImage-with-invalid-args-expected.png Sending LayoutTests/fast/canvas/drawImage-with-invalid-args-expected.txt Sending LayoutTests/fast/canvas/drawImage-with-invalid-args.html Sending WebCore/ChangeLog Sending WebCore/html/CanvasRenderingContext2D.cpp Transmitting file data ..... Committed revision 21280.
Note You need to log in before you can comment on or make changes to this bug.