Bug 178987 - [Conic Gradients] Add support for parsing conic gradients
Summary: [Conic Gradients] Add support for parsing conic gradients
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks: 146113
  Show dependency treegraph
 
Reported: 2017-10-29 08:31 PDT by Sam Weinig
Modified: 2017-11-15 12:35 PST (History)
4 users (show)

See Also:


Attachments
Patch (31.89 KB, patch)
2017-10-29 08:47 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (31.82 KB, patch)
2017-10-29 08:53 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (32.44 KB, patch)
2017-10-29 09:00 PDT, Sam Weinig
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>