RESOLVED FIXED 20474
setting Canvas fillStyle or strokeStyle to an invalid value should have no effect
https://bugs.webkit.org/show_bug.cgi?id=20474
Summary setting Canvas fillStyle or strokeStyle to an invalid value should have no ef...
Dirk Schulze
Reported 2008-08-21 00:04:54 PDT
If fillStyle() and strokeStyle() gets wrong arguments, they are set to transparent black. But fillStyle() and strokeStyle() should be ignored in this case and Canvas should fallback to the last fillStyle() or strokeStyle(), if there are no styles before, it should be transparent black.
Attachments
Canvas invalid styles (8.84 KB, patch)
2008-08-28 10:31 PDT, Dirk Schulze
eric: review-
Canvas and invalid styles (7.55 KB, patch)
2008-08-28 22:11 PDT, Dirk Schulze
darin: review+
Dirk Schulze
Comment 1 2008-08-28 10:31:48 PDT
Created attachment 23057 [details] Canvas invalid styles I changed the behaviour on invalid styles from transparent black to the last valid style. FF and Opera initialise canvas with a 'fillStyle' and 'strokeStyle' of black like webkit. That's why I don't follow the spec on that.
Eric Seidel (no email)
Comment 2 2008-08-28 13:05:27 PDT
Comment on attachment 23057 [details] Canvas invalid styles The gradient and pattern if's aren't necessary. We shouldn't be ever applying with a NULL gradient or pattern. Otherwise this looks great! Nice use of the js tests! If you were a commiter I would just r+ this and you could fix it as you commit, as is, you should upload a new patch so it's easier for someone else to land.
Dirk Schulze
Comment 3 2008-08-28 22:11:47 PDT
Created attachment 23064 [details] Canvas and invalid styles Changes to the comment from eseidel above.
Darin Adler
Comment 4 2008-08-28 22:30:06 PDT
Comment on attachment 23064 [details] Canvas and invalid styles r=me
Mark Rowe (bdash)
Comment 5 2008-09-02 23:03:50 PDT
Landed in r36044.
Note You need to log in before you can comment on or make changes to this bug.