Bug 178987

Summary: [Conic Gradients] Add support for parsing conic gradients
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, sabouhallawa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 146113    
Attachments:
Description Flags
Patch
none
Patch
none
Patch dino: review+

Description Sam Weinig 2017-10-29 08:31:11 PDT
[Conic Gradients] Add support for parsing conic gradients
Comment 1 Sam Weinig 2017-10-29 08:47:16 PDT
Created attachment 325284 [details]
Patch
Comment 2 Sam Weinig 2017-10-29 08:50:30 PDT
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.
Comment 3 Sam Weinig 2017-10-29 08:53:19 PDT
Created attachment 325285 [details]
Patch
Comment 4 Sam Weinig 2017-10-29 08:58:48 PDT
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)"?
Comment 5 Sam Weinig 2017-10-29 09:00:45 PDT
Created attachment 325286 [details]
Patch
Comment 6 Dean Jackson 2017-10-29 14:38:09 PDT
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}%, `;
Comment 7 Sam Weinig 2017-10-29 16:07:47 PDT
Committed r224165: <https://trac.webkit.org/changeset/224165>
Comment 8 Radar WebKit Bug Importer 2017-11-15 12:35:21 PST
<rdar://problem/35567823>