The direction of the subpath is not taken into account. This breaks the nonzero winding rule when using either a negative width or a negative height (but not both), in which case the rect should be counterclockwise.
Created attachment 73312 [details] Patch
Comment on attachment 73312 [details] Patch This patch can be simplified to remove the "if (width < 0) {" and "if (height < 0) {" blocks and just leaving the Path::addRect() call as-is. The Path objects generated by the two code paths in your patch are equivalent AFAICT.
@Andreas: my initial patch consisted in removing the two 'if' blocks only, but then I saw that you introduced them in http://trac.webkit.org/changeset/63270. If you're sure that removing them won't break anything, I can just do that.
(In reply to comment #3) > @Andreas: my initial patch consisted in removing the two 'if' blocks only, but then I saw that you introduced them in http://trac.webkit.org/changeset/63270. If you're sure that removing them won't break anything, I can just do that. That should be fine. r63270 simply factored those checks out of validateRectForCanvas() and into rect(). :-)
Created attachment 73428 [details] Patch
Comment on attachment 73428 [details] Patch Clearing flags on attachment: 73428 Committed r71716: <http://trac.webkit.org/changeset/71716>
All reviewed patches have been landed. Closing bug.
As discussed (in pvt) with Suresh, this should not block qtwebkit-2.1. Marking as a nice-to-have fix for qtwebkit-2.2 (later it can be triaged and promoted to blocker if necessary)
Revision r71716 cherry-picked into qtwebkit-2.2 with commit dd6e586 <http://gitorious.org/webkit/qtwebkit/commit/dd6e586>
Related QtWRT Bugzilla error ID: http://bugs.nokia-boston.com/bugzilla/show_bug.cgi?id=7147