{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/7120","labels_url":"https://api.github.com/repos/servo/servo/issues/7120/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/7120/comments","events_url":"https://api.github.com/repos/servo/servo/issues/7120/events","html_url":"https://github.com/servo/servo/pull/7120","id":99961369,"number":7120,"title":"Implement currentColor for Canvas colors","user":{"login":"dzbarsky","id":1565842,"avatar_url":"https://avatars.githubusercontent.com/u/1565842?v=3","gravatar_id":"","url":"https://api.github.com/users/dzbarsky","html_url":"https://github.com/dzbarsky","followers_url":"https://api.github.com/users/dzbarsky/followers","following_url":"https://api.github.com/users/dzbarsky/following{/other_user}","gists_url":"https://api.github.com/users/dzbarsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dzbarsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzbarsky/subscriptions","organizations_url":"https://api.github.com/users/dzbarsky/orgs","repos_url":"https://api.github.com/users/dzbarsky/repos","events_url":"https://api.github.com/users/dzbarsky/events{/privacy}","received_events_url":"https://api.github.com/users/dzbarsky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/S-awaiting-review","name":"S-awaiting-review","color":"d4c5f9"},{"url":"https://api.github.com/repos/servo/servo/labels/S-needs-rebase","name":"S-needs-rebase","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"milestone":null,"comments":16,"created_at":"2015-08-10T03:21:45Z","updated_at":"2015-09-28T13:30:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/7120","html_url":"https://github.com/servo/servo/pull/7120","diff_url":"https://github.com/servo/servo/pull/7120.diff","patch_url":"https://github.com/servo/servo/pull/7120.patch"},"body":"I made addColorStop throw for currentColor, which matches Firefox.  It's easy enough to change the behavior to fetch the color from the canvas, which is what Chrome and Safari do. I'll file a spec bug to decide what to do here.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/servo/servo/7120)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/143744207","html_url":"https://github.com/servo/servo/pull/7120#issuecomment-143744207","issue_url":"https://api.github.com/repos/servo/servo/issues/7120","id":143744207,"user":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T13:30:22Z","updated_at":"2015-09-28T13:30:22Z","body":"\n\n\n\nReviewed 7 of 7 files at r1.\nReview status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.\n\n---\n\n<sup>**[components/script/dom/canvasgradient.rs, line 53 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/7120#-K-J7FHIL9KGyNxMpVLv)** ([raw file](https://github.com/servo/servo/blob/0bc7ad9b08d3ae978be4a95687025f00cfcff312/components/script/dom/canvasgradient.rs#L53)):</sup>\nIs this function still used at all? If not, please remove it.\n<!-- Reviewable comment -K-J7FHIL9KGyNxMpVLw:-313289776 -->\n\n---\n\n<sup>**[components/script/dom/canvasrenderingcontext2d.rs, line 426 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/7120#-K-J6yKxg3BaVNjlcvF3)** ([raw file](https://github.com/servo/servo/blob/6725e8ab9d9995b34de5316b2ba4fae702ef588f/components/script/dom/canvasrenderingcontext2d.rs#L426)):</sup>\nThis seems wasteful: it serializes an RGBA struct to a string just to parse it again. Could this code access the `ComputedValues` struct directly, rather than use `GetComputedStyle`?\n<!-- Reviewable comment -K-J6yKxg3BaVNjlcvF4:1392304855 -->\n\n---\n\n<sup>**[tests/wpt/web-platform-tests/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html, line 2 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/7120#-K-J8AwXay5pxN0iQCh7)** ([raw file](https://github.com/servo/servo/blob/6725e8ab9d9995b34de5316b2ba4fae702ef588f/tests/wpt/web-platform-tests/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html#L2)):</sup>\nI don’t see this file upstream. @Ms2ger, would it be removed at the next sync? Should it go to `tests/wpt/mozilla` instead?\n<!-- Reviewable comment -K-J8AwXay5pxN0iQCh8:701983682 -->\n\n---\n\n\nComments from the [review on Reviewable.io](https://reviewable.io:443/reviews/servo/servo/7120)\n<!-- Sent from Reviewable.io -->\n"}}