Closed Bug 433235 Opened 13 years ago Closed 13 years ago
Image of canvas onto self is incorrect
When drawing a canvas onto an overlapping region of itself, changes in an output row are read back in as input when drawing later rows, resulting in incorrect output. HTML5 says "Note: When a canvas is drawn onto itself, the drawing model requires the source to be copied before the image is drawn back onto the canvas, so it is possible to copy parts of a canvas onto overlapping parts of itself." Fails in current nightly on Windows (2008051011) and Linux (2008051104). Passes in (at least) FF22.214.171.124 on Linux, and FF3 beta 5 on Windows. (I guess this is a regression from bug 430873.)
Confirmed to fail on today's Windows but pass on today's mac nightly. Vlad can you take a look to figure out if this is urgent?
Assignee: nobody → vladimir
Here's a patch, but pretty sure this isn't urgent -- it's not all that common of an operation. I'm updating my build to make sure this fixes it, but the patch builds and should.
(This is actually quite possibly a bug inside cairo, since it's supposed to handle this case; but either way the workaround is easy.)
Given comment 2 taking off the blocking list. If we have to do an RC2 for other reasons we can take this. Note [RC2?] is what we'll use on whiteboard for bugs like this.
Flags: blocking1.9? → blocking1.9-
Whiteboard: [RC2? → [RC2?]
13 years ago
Attachment #320445 - Flags: review?(pavlov)
roc, how's this mochitest look?
Attachment #320478 - Flags: review?(roc)
Comment on attachment 320478 [details] [diff] [review] same patch with mochitest Looks OK if you make the canvas element 300x150
Attachment #320478 - Flags: review?(roc) → review+
Comment on attachment 320478 [details] [diff] [review] same patch with mochitest Putting on the approval queue so that it can get picked up for an RC2 if one comes about.
Same patch, just with the tweak to the test in case someone other than me needs to check it in.
Attachment #320592 - Flags: approval1.9? → approval126.96.36.199?
Attachment #320592 - Flags: approval188.8.131.52? → approval184.108.40.206?
13 years ago
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment on attachment 320592 [details] [diff] [review] patch with test tweak Approved for 220.127.116.11. Please land in CVS. a=ss
Attachment #320592 - Flags: approval18.104.22.168? → approval22.214.171.124+
Fixed 126.96.36.199: Checking in content/canvas/src/nsCanvasRenderingContext2D.cpp; /cvsroot/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp,v <-- nsCanvasRenderingContext2D.cpp new revision: 1.128; previous revision: 1.127 done Checking in content/canvas/test/Makefile.in; /cvsroot/mozilla/content/canvas/test/Makefile.in,v <-- Makefile.in new revision: 1.12; previous revision: 1.11 done RCS file: /cvsroot/mozilla/content/canvas/test/test_2d.drawImage.self.html,v done Checking in content/canvas/test/test_2d.drawImage.self.html; /cvsroot/mozilla/content/canvas/test/test_2d.drawImage.self.html,v <-- test_2d.drawImage.self.html initial revision: 1.1 done
verified fixed on the 1.9.0 branch using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:188.8.131.52pre) Gecko/2008082005 GranParadiso/3.0.2pre. I verified using the test case in the URL.
You need to log in before you can comment on or make changes to this bug.