Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Issue 137353004: Add versions of stroke, fill, and clip that take a Path parameter. (Closed)

Created:
6 years, 11 months ago by jcgregorio
Modified:
6 years, 6 months ago
CC:
blink-reviews, arv+blink, dglazkov+blink, adamk+blink_chromium.org, aandrey+blink_chromium.org, watchdog-blink-watchlist_google.com, Inactive, eseidel, haraken
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add versions of stroke, fill, and clip to CanvasRenderingContext2D that take a Path parameter. The spec reference is: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-fill This partially addresses bug 330506. The rest of these functions need to be added to completely close that bug, which I plan to do in a following CL: - drawSystemFocusRing(path, element); - drawCustomFocusRing(path, element); - isPointInPath(path, x, y); - isPointInStroke(path, x, y); - scrollPathIntoView(path); BUG=330506 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167705

Patch Set 1 #

Patch Set 2 : Add clip test. #

Patch Set 3 : expectations #

Patch Set 4 : cleanup #

Patch Set 5 : clean up idl #

Total comments: 16

Patch Set 6 : Fix optional Path argument. #

Patch Set 7 : Remove leftover file. #

Patch Set 8 : Add more comments to the IDL file. #

Patch Set 9 : Drop unneeded if statements. #

Patch Set 10 : Add tests for null Path object passed in. #

Total comments: 3

Patch Set 11 : Update the IDL to get all Path arguments behind the exp canvas flag. #

Patch Set 12 : Clean up some sync'd files #

Patch Set 13 : Impl->Internal #

Total comments: 6

Patch Set 14 : Drop this->, add FIXME, use consistent braces. #

Patch Set 15 : Drop this->, add FIXME, use consistent braces. #

Patch Set 16 : Reorder IDL, so that the stricter check for Path comes before the less strict check for an enum. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+559 lines, -46 lines) Patch
A LayoutTests/fast/canvas/canvas-path-context-clip.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-path-context-fill.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-path-context-stroke.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/canvas-path-context-stroke-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js View 1 2 3 4 5 6 7 8 9 1 chunk +72 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js View 1 2 3 4 5 6 7 8 9 1 chunk +70 lines, -0 lines 0 comments Download
A LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js View 1 2 3 4 5 6 7 8 9 1 chunk +53 lines, -0 lines 0 comments Download
A LayoutTests/virtual/gpu/fast/canvas/canvas-path-context-clip-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/virtual/gpu/fast/canvas/canvas-path-context-fill-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/virtual/gpu/fast/canvas/canvas-path-context-stroke-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +87 lines, -44 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +11 lines, -2 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
jcgregorio
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode83 Source/core/html/canvas/CanvasRenderingContext2D.idl:83: void fill(Path? path, optional CanvasWindingRule winding); The part that ...
6 years, 11 months ago (2014-01-23 18:17:13 UTC) #1
Justin Novosad
canvas-path-context-clip.js appears to be missing
6 years, 11 months ago (2014-01-23 18:49:24 UTC) #2
jcgregorio
On 2014/01/23 18:49:24, junov wrote: > canvas-path-context-clip.js appears to be missing It shows up for ...
6 years, 11 months ago (2014-01-23 18:56:51 UTC) #3
Rik
Were the lgtm's to implement this on the blink mailing list? I did not receive ...
6 years, 11 months ago (2014-01-23 19:04:56 UTC) #4
Stephen White
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode83 Source/core/html/canvas/CanvasRenderingContext2D.idl:83: void fill(Path? path, optional CanvasWindingRule winding); On 2014/01/23 18:17:14, ...
6 years, 11 months ago (2014-01-23 19:17:05 UTC) #5
jcgregorio
On 2014/01/23 19:04:56, Rik wrote: > Were the lgtm's to implement this on the blink ...
6 years, 11 months ago (2014-01-23 19:18:01 UTC) #6
Justin Novosad
I agree. There needs to be at least an "intent to implement" thread on blink-dev ...
6 years, 11 months ago (2014-01-23 19:20:20 UTC) #7
jcgregorio
On 2014/01/23 19:20:20, junov wrote: > I agree. There needs to be at least an ...
6 years, 11 months ago (2014-01-23 20:08:31 UTC) #8
eseidel
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode83 Source/core/html/canvas/CanvasRenderingContext2D.idl:83: void fill(Path? path, optional CanvasWindingRule winding); On 2014/01/23 19:17:06, ...
6 years, 11 months ago (2014-01-23 20:24:01 UTC) #9
dshwang
afaik jinho.bang@ works in progress on canvas path also. https://codereview.chromium.org/118103003/ https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js File LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js (right): https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js#newcode46 ...
6 years, 11 months ago (2014-01-23 21:17:16 UTC) #10
Nils Barth (inactive)
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode83 Source/core/html/canvas/CanvasRenderingContext2D.idl:83: void fill(Path? path, optional CanvasWindingRule winding); Thanks for raising ...
6 years, 10 months ago (2014-01-29 06:59:16 UTC) #11
jcgregorio
I believe https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/MGxEfzBPw68/Lj5hYlhgkI4J means that this CL is now unblocked on the Intent to Implement ...
6 years, 10 months ago (2014-01-29 17:51:36 UTC) #12
jcgregorio
https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js File LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js (right): https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js#newcode46 LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js:46: testStrokeWith(path); On 2014/01/23 21:17:17, dshwang wrote: > I'm curious ...
6 years, 10 months ago (2014-01-29 17:51:49 UTC) #13
Stephen White
On 2014/01/29 17:51:49, jcgregorio wrote: > https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js > File LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js (right): > > https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js#newcode46 > ...
6 years, 10 months ago (2014-01-29 18:08:56 UTC) #14
jcgregorio
On Wed, Jan 29, 2014 at 1:08 PM, <senorblanco@chromium.org> wrote > > > I'm pretty ...
6 years, 10 months ago (2014-01-29 19:19:17 UTC) #15
jcgregorio
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode83 Source/core/html/canvas/CanvasRenderingContext2D.idl:83: void fill(Path? path, optional CanvasWindingRule winding); Updated the .idl ...
6 years, 10 months ago (2014-01-30 20:41:57 UTC) #16
Nils Barth (inactive)
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode83 Source/core/html/canvas/CanvasRenderingContext2D.idl:83: void fill(Path? path, optional CanvasWindingRule winding); On 2014/01/30 20:41:57, ...
6 years, 10 months ago (2014-01-31 00:42:37 UTC) #17
dshwang
https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js File LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js (right): https://codereview.chromium.org/137353004/diff/110001/LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js#newcode46 LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js:46: testStrokeWith(path); On 2014/01/29 17:51:49, jcgregorio wrote: > On 2014/01/23 ...
6 years, 10 months ago (2014-01-31 12:29:00 UTC) #18
jcgregorio
https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1002 Source/core/html/canvas/CanvasRenderingContext2D.cpp:1002: return; On 2014/01/31 12:29:00, dshwang wrote: > On 2014/01/29 ...
6 years, 10 months ago (2014-01-31 18:08:48 UTC) #19
jcgregorio
On Fri, Jan 31, 2014 at 7:29 AM, <dongseong.hwang@intel.com> wrote: > > https://codereview.chromium.org/137353004/diff/110001/ > LayoutTests/fast/canvas/script-tests/canvas-path-context-stroke.js ...
6 years, 10 months ago (2014-01-31 18:14:17 UTC) #20
dshwang
On 2014/01/31 18:08:48, jcgregorio wrote: > https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.cpp > File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): > > https://codereview.chromium.org/137353004/diff/110001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode1002 > ...
6 years, 10 months ago (2014-02-03 12:59:54 UTC) #21
dshwang
I correct above pseudo code to not make any confusion. Case 1) var ctx = ...
6 years, 10 months ago (2014-02-03 13:37:32 UTC) #22
jcgregorio
On Mon, Feb 3, 2014 at 8:37 AM, <dongseong.hwang@intel.com> wrote: > I correct above pseudo ...
6 years, 10 months ago (2014-02-03 13:55:44 UTC) #23
jcgregorio
On 2014/02/03 12:59:54, dshwang wrote: > > > On 2014/01/29 17:51:49, jcgregorio wrote: > > ...
6 years, 10 months ago (2014-02-03 14:24:24 UTC) #24
Rik
On 2014/02/03 12:59:54, dshwang wrote: > > Case 1) > var path = new Path(); ...
6 years, 10 months ago (2014-02-07 05:17:10 UTC) #25
jcgregorio
Ping. I believe all the concerns raised to date have been addressed.
6 years, 10 months ago (2014-02-19 13:45:12 UTC) #26
Justin Novosad
Since the Path constructor is hidden behind the experimental flag, I think we are not ...
6 years, 10 months ago (2014-02-19 15:36:41 UTC) #27
eseidel
Since we're not guarding these, due to a bug, that means we are actually shipping ...
6 years, 10 months ago (2014-02-19 15:44:24 UTC) #28
eseidel
I'm really not trying to make your life difficult. We just have no way to ...
6 years, 10 months ago (2014-02-19 15:45:03 UTC) #29
Justin Novosad
Eric, just to be clear, why is it hard to unship a method that cannot ...
6 years, 10 months ago (2014-02-19 15:57:07 UTC) #30
Justin Novosad
On 2014/02/19 15:57:07, junov wrote: > Joe: have you tried different ways of working around ...
6 years, 10 months ago (2014-02-19 16:03:01 UTC) #31
Inactive
https://codereview.chromium.org/137353004/diff/420001/Source/core/html/canvas/CanvasRenderingContext2D.idl File Source/core/html/canvas/CanvasRenderingContext2D.idl (right): https://codereview.chromium.org/137353004/diff/420001/Source/core/html/canvas/CanvasRenderingContext2D.idl#newcode84 Source/core/html/canvas/CanvasRenderingContext2D.idl:84: void fill(Path path, optional CanvasWindingRule winding); Until the generator ...
6 years, 10 months ago (2014-02-19 16:06:23 UTC) #32
jcgregorio
On Wed, Feb 19, 2014 at 10:57 AM, <junov@chromium.org> wrote: > Eric, just to be ...
6 years, 10 months ago (2014-02-19 16:12:25 UTC) #33
eseidel
Sorry, maybe I'm missing context. I was not aware that these methods can't be called ...
6 years, 10 months ago (2014-02-19 16:21:54 UTC) #34
jcgregorio
On Wed, Feb 19, 2014 at 11:21 AM, <eseidel@chromium.org> wrote: > Sorry, maybe I'm missing ...
6 years, 10 months ago (2014-02-19 16:30:59 UTC) #35
jcgregorio
Updated the .idl file so that all the methods that take Path parameters are behind ...
6 years, 10 months ago (2014-02-20 18:48:52 UTC) #36
eseidel
lgtm Other than the this->, this seems fine. https://codereview.chromium.org/137353004/diff/930001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/137353004/diff/930001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode918 Source/core/html/canvas/CanvasRenderingContext2D.cpp:918: this->fillInternal(m_path, ...
6 years, 10 months ago (2014-02-20 18:59:51 UTC) #37
jcgregorio
https://codereview.chromium.org/137353004/diff/930001/Source/core/html/canvas/CanvasRenderingContext2D.cpp File Source/core/html/canvas/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/137353004/diff/930001/Source/core/html/canvas/CanvasRenderingContext2D.cpp#newcode918 Source/core/html/canvas/CanvasRenderingContext2D.cpp:918: this->fillInternal(m_path, windingRuleString); On 2014/02/20 18:59:52, eseidel wrote: > Why ...
6 years, 10 months ago (2014-02-20 19:28:29 UTC) #38
jcgregorio
The CQ bit was checked by jcgregorio@google.com
6 years, 10 months ago (2014-02-24 17:39:27 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jcgregorio@google.com/137353004/1150001
6 years, 10 months ago (2014-02-24 17:39:44 UTC) #40
commit-bot: I haz the power
Change committed as 167705
6 years, 10 months ago (2014-02-24 22:12:43 UTC) #41
Nils Barth (inactive)
6 years, 6 months ago (2014-06-13 02:33:00 UTC) #42
Message was sent while issue was closed.
BTW, the cruft in the use of [RuntimeEnabled] can now be fixed up
(thanks to bindings CG changes by Jens), which I've done in:
Cleanup [RuntimeEnabled] use in CanvasRenderingContext2D
https://codereview.chromium.org/334803002/

...and we can avoid these in future!

Powered by Google App Engine
This is Rietveld 408576698