Bug 35005

Summary: [Qt] REGRESSION(r54811) fast/canvas/drawImage-with-negative-source-destination.html fails
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: qi <qi.2.zhang>
Status: CLOSED FIXED    
Severity: Normal CC: ariya.hidayat, commit-queue, cshu, hausmann, kent.hansen, laszlo.gombos, noam
Priority: P3 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 35784    
Attachments:
Description Flags
support negative width and height none

Csaba Osztrogonác
Reported 2010-02-16 15:45:53 PST
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
Attachments
support negative width and height (3.20 KB, patch)
2010-03-23 13:38 PDT, qi
no flags
Csaba Osztrogonác
Comment 1 2010-02-16 15:57:18 PST
fast/canvas/drawImage-with-negative-source-destination.html skipped until fix by http://trac.webkit.org/changeset/54842 .
qi
Comment 2 2010-03-23 13:38:31 PDT
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.
Laszlo Gombos
Comment 3 2010-03-26 05:34:01 PDT
Comment on attachment 51450 [details] support negative width and height Looks good, r+.
WebKit Commit Bot
Comment 4 2010-03-26 05:58:14 PDT
Comment on attachment 51450 [details] support negative width and height Clearing flags on attachment: 51450 Committed r56619: <http://trac.webkit.org/changeset/56619>
WebKit Commit Bot
Comment 5 2010-03-26 05:58:20 PDT
All reviewed patches have been landed. Closing bug.
Simon Hausmann
Comment 6 2010-03-26 08:39:05 PDT
Revision r56619 cherry-picked into qtwebkit-2.0 with commit fa2319915a2edd5b11c44b519e43d48b29f228c0
Note You need to log in before you can comment on or make changes to this bug.