RESOLVED FIXED Bug 39225
[Qt] Repeat pattern should start from origin
https://bugs.webkit.org/show_bug.cgi?id=39225
Summary [Qt] Repeat pattern should start from origin
qi
Reported 2010-05-17 09:50:33 PDT
Failed on: http://philip.html5.org/tests/canvas/suite/tests/2d.pattern.paint.norepeat.coord3.html http://philip.html5.org/tests/canvas/suite/tests/2d.pattern.paint.repeaty.coord1.html Based on spec: Patterns must be painted so that the top left of the first image is anchored at the origin of the coordinate space, and images are then repeated horizontally to the left and right (if the repeat-x string was specified) or vertically up and down (if the repeat-y string was specified) or in all four directions all over the canvas (if the repeat string was specified). Current implementation is start from top left of the rect instead of the origin of the coordinate.
Attachments
patch (3.79 KB, patch)
2010-05-17 10:19 PDT, qi
kenneth: review-
patch2 (3.82 KB, patch)
2010-05-17 10:26 PDT, qi
no flags
patch3 (6.38 KB, patch)
2010-06-09 07:41 PDT, qi
no flags
qi
Comment 1 2010-05-17 10:19:07 PDT
Created attachment 56247 [details] patch Paint repeat pattern directly instead of using brush. QtBrush always paint pattern from top left of the rectangle. We need to paint pattern from origin, but only paint the part inside of the rectangle.
WebKit Review Bot
Comment 2 2010-05-17 10:22:38 PDT
Attachment 56247 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/ChangeLog:7: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:9: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:10: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:11: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:12: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:13: Line contains tab character. [whitespace/tab] [5] Total errors found: 6 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kenneth Rohde Christiansen
Comment 3 2010-05-17 10:25:01 PDT
Comment on attachment 56247 [details] patch > + Patterns must be painted so that the top left of the first image > + is anchored at the origin of the coordinate space, and images are > + then repeated horizontally to the left and right (if the repeat-x > + string was specified) or vertically up and down (if the repeat-y > + string was specified) or in all four directions all over the canvas > + (if the repeat string was specified). There is something wrong with the indentation of the above. Missing test. r- for the above.
qi
Comment 4 2010-05-17 10:26:55 PDT
Created attachment 56248 [details] patch2 fix style check issue
Eric Seidel (no email)
Comment 5 2010-05-20 00:57:31 PDT
Comment on attachment 56248 [details] patch2 I would have put this new code in a new function. Maybe a static inline if I was concerned about performance.
qi
Comment 6 2010-06-09 07:41:04 PDT
Created attachment 58245 [details] patch3 1. Created a new function for draw repeat pattern 2. Remove 3 test cases from Skipped.
Laszlo Gombos
Comment 7 2010-06-16 18:54:31 PDT
Comment on attachment 58245 [details] patch3 lgtm, r+.
WebKit Commit Bot
Comment 8 2010-06-16 21:15:17 PDT
Comment on attachment 58245 [details] patch3 Clearing flags on attachment: 58245 Committed r61303: <http://trac.webkit.org/changeset/61303>
WebKit Commit Bot
Comment 9 2010-06-16 21:15:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.