[Conic Gradients] Add support for parsing conic gradients
Created attachment 325284 [details] Patch
Note: This doesn't support double position color hint syntax yet. This seems like something that should be supporter for all gradients or none, and, since it is just sugar over using two hints, I opted to leave it out of the first change.
Created attachment 325285 [details] Patch
One thing I am not sure of is if all the CSS text results in the test case are correct. e.g should "at center" map to "at center center" and should "hsl(0,0%,75%)" map to "rgb(191, 191, 191)"?
Created attachment 325286 [details] Patch
Comment on attachment 325286 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325286&action=review > LayoutTests/ChangeLog:9 > + [Conic Gradients] Add support for parsing conic gradients > + https://bugs.webkit.org/show_bug.cgi?id=178987 > + > + Reviewed by NOBODY (OOPS!). > + > + * fast/gradients/conic-gradient-parsing-expected.txt: Added. > + * fast/gradients/conic-gradient-parsing.html: Added. Would be nice if these could be WPT proposals in http/wpt/ > LayoutTests/fast/gradients/conic-gradient-parsing.html:50 > + for(var x = 0; x < 500; x++) Nit: space after for > LayoutTests/fast/gradients/conic-gradient-parsing.html:51 > + s += "white " + (x/500) + "%, " + ((2 * x + 1) / 1000) + "%, "; Nit: s += `white ${x/500}%, ${(2 * x + 1) / 1000}%, `;
Committed r224165: <https://trac.webkit.org/changeset/224165>
<rdar://problem/35567823>