It needs more investingating. http://build.webkit.org/results/Qt%20Linux%20Release/r54839%20%287422%29/results.html : --- /home/webkitbuildbot/release32bit/buildslave/qt-linux-release/build/layout-test-results/fast/canvas/drawImage-with-negative-source-destination-expected.txt 2010-02-16 15:08:32.970217114 -0800 +++ /home/webkitbuildbot/release32bit/buildslave/qt-linux-release/build/layout-test-results/fast/canvas/drawImage-with-negative-source-destination-actual.txt 2010-02-16 15:08:32.970217114 -0800 @@ -4,7 +4,7 @@ PASS imgdata[4] is 0 -PASS imgdata[5] is 255 +FAIL imgdata[5] should be 255. Was 0. PASS imgdata[6] is 0 PASS successfullyParsed is true
fast/canvas/drawImage-with-negative-source-destination.html skipped until fix by http://trac.webkit.org/changeset/54842 .
Created attachment 51450 [details] support negative width and height At HTML5 spec 4.8.10.1.11 Images, about context.drawImage: The source rectangle is the rectangle whose corners are the four points (sx, sy), (sx+sw, sy), (sx+sw, sy+sh), (sx,sy+sh). The destination rectangle is the rectangle whose corners are the four points (dx, dy), (dx+dw, dy), (dx+dw,dy+dh), (dx, dy+dh). In this case, the sw(width) or sh(height) could be negative. Based on the spec, as long as sx+sw > 0 or sy+sh, it is still legal. In Qt, QPainter don't support a negative width or height. Bascially, to support negative width or height, we need to reset the (sx,sy) to make width or heigh to positive.
Comment on attachment 51450 [details] support negative width and height Looks good, r+.
Comment on attachment 51450 [details] support negative width and height Clearing flags on attachment: 51450 Committed r56619: <http://trac.webkit.org/changeset/56619>
All reviewed patches have been landed. Closing bug.
Revision r56619 cherry-picked into qtwebkit-2.0 with commit fa2319915a2edd5b11c44b519e43d48b29f228c0