RESOLVED FIXED 130236
Refactor Path to Path2D and remove currentPath
https://bugs.webkit.org/show_bug.cgi?id=130236
Summary Refactor Path to Path2D and remove currentPath
Dirk Schulze
Reported 2014-03-14 06:57:06 PDT
Other implementations prefer Path2D over Path. Furthermore, currentPath is not the right way to apply a Path2D. Instead pass Path2D as argument to fill, stroke, clip.
Attachments
Patch (40.47 KB, patch)
2014-03-14 07:05 PDT, Dirk Schulze
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (577.26 KB, application/zip)
2014-03-14 08:09 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (496.44 KB, application/zip)
2014-03-14 08:20 PDT, Build Bot
no flags
Patch (42.17 KB, patch)
2014-03-14 09:01 PDT, Dirk Schulze
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (525.76 KB, application/zip)
2014-03-14 10:44 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (633.68 KB, application/zip)
2014-03-14 11:12 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (499.75 KB, application/zip)
2014-03-14 12:18 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (497.69 KB, application/zip)
2014-03-14 13:15 PDT, Build Bot
no flags
Patch (45.71 KB, patch)
2014-03-14 13:26 PDT, Dirk Schulze
dino: review+
Patch for landing (46.41 KB, patch)
2014-03-14 14:00 PDT, Dirk Schulze
no flags
Patch for landing... for real this time (46.41 KB, patch)
2014-03-14 14:02 PDT, Dirk Schulze
no flags
Dirk Schulze
Comment 1 2014-03-14 07:05:03 PDT
Build Bot
Comment 2 2014-03-14 08:09:07 PDT
Comment on attachment 226708 [details] Patch Attachment 226708 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/6234891448483840 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 3 2014-03-14 08:09:12 PDT
Created attachment 226716 [details] Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 4 2014-03-14 08:20:25 PDT
Comment on attachment 226708 [details] Patch Attachment 226708 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5306108528820224 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 5 2014-03-14 08:20:33 PDT
Created attachment 226718 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Dirk Schulze
Comment 6 2014-03-14 09:01:37 PDT
Build Bot
Comment 7 2014-03-14 10:44:01 PDT
Comment on attachment 226722 [details] Patch Attachment 226722 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/6110487183884288 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 8 2014-03-14 10:44:06 PDT
Created attachment 226732 [details] Archive of layout-test-results from webkit-ews-08 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 9 2014-03-14 11:12:13 PDT
Comment on attachment 226722 [details] Patch Attachment 226722 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5204266264297472 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 10 2014-03-14 11:12:21 PDT
Created attachment 226737 [details] Archive of layout-test-results from webkit-ews-05 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 11 2014-03-14 12:18:31 PDT
Comment on attachment 226722 [details] Patch Attachment 226722 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5145496616173568 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 12 2014-03-14 12:18:41 PDT
Created attachment 226750 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 13 2014-03-14 13:15:29 PDT
Comment on attachment 226722 [details] Patch Attachment 226722 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/4896682181394432 New failing tests: js/dom/global-constructors-attributes.html
Build Bot
Comment 14 2014-03-14 13:15:37 PDT
Created attachment 226755 [details] Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Dirk Schulze
Comment 15 2014-03-14 13:26:21 PDT
Created attachment 226757 [details] Patch I fixed you expectation files Mac ML. Please stay cool!
Dean Jackson
Comment 16 2014-03-14 13:34:27 PDT
Comment on attachment 226757 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226757&action=review > LayoutTests/fast/canvas/script-tests/canvas-clip-path.js:18 > + if (!data.length) > + return true; > + var c = {r:0,g:0,b:0,a:0}; > + for (var i = 0; i < data.length; i += 4) { > + c.r += data[i]; > + c.g += data[i+1]; > + c.b += data[i+2]; > + c.a += data[i+3]; > + } > + if (refColor.r == Math.round(c.r/data.length*4) > + && refColor.g == Math.round(c.g/data.length*4) > + && refColor.b == Math.round(c.b/data.length*4) > + && refColor.a == Math.round(c.a/data.length*4)) > + return true; > + return false; So much indent!! > LayoutTests/fast/canvas/script-tests/canvas-stroke-path.js:19 > +function areaColor(data, refColor) { > + if (!data.length) > + return true; > + var c = {r:0,g:0,b:0,a:0}; > + for (var i = 0; i < data.length; i += 4) { > + c.r += data[i]; > + c.g += data[i+1]; > + c.b += data[i+2]; > + c.a += data[i+3]; > + } > + if (refColor.r == Math.round(c.r/data.length*4) > + && refColor.g == Math.round(c.g/data.length*4) > + && refColor.b == Math.round(c.b/data.length*4) > + && refColor.a == Math.round(c.a/data.length*4)) > + return true; > + return false; > +} So much indent here too! > Source/WebCore/html/canvas/CanvasRenderingContext2D.h:141 > + void fill(DOMPath* , const String& winding = "nonzero"); > + void stroke(DOMPath*); > + void clip(DOMPath* , const String& winding = "nonzero"); Nit: extra space between * and ,
Dirk Schulze
Comment 17 2014-03-14 14:00:04 PDT
Created attachment 226762 [details] Patch for landing
Dirk Schulze
Comment 18 2014-03-14 14:02:29 PDT
Created attachment 226764 [details] Patch for landing... for real this time
WebKit Commit Bot
Comment 19 2014-03-14 14:43:55 PDT
Comment on attachment 226764 [details] Patch for landing... for real this time Clearing flags on attachment: 226764 Committed r165651: <http://trac.webkit.org/changeset/165651>
WebKit Commit Bot
Comment 20 2014-03-14 14:44:02 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.