gecko-dev/servo/components/gfx/display_list
Pyfisch 8844d0506c servo: Merge #16666 - Improvements to gradients (from pyfisch:gradients); r=emilio
This is a collection of commits improving the rendering of linear and radial gradients by making them conform more closely to the spec.

All commits are are independent and should work without the others.

These commits address the following issues:
* a956e3fd529715cc0ac39b23910f19e092c7c5a9 resolves #3908 but contains also some other necessary changes to `convert_gradient_stops`. The updated function has a few more copys but should be more correct. Maybe @pcwalton wants to comment since he has originally written the code.
* b230be8aaf318fb754cf58e5cd243087df2f7e0f partially solves #16638. (Partially because `border-image-outset` is not implemented. This is an older issue for border gradients: #15894.

To quickly catch regressions and see changes to gradients I have created [a set of twelve manual testcases](https://pyfisch.org/stuff/testcases-gradients.html) and placed them in a single file. Attached are two files. One shows how the gradients were rendered before the PR the other one with the changes applied.

![testcases-old](https://cloud.githubusercontent.com/assets/2781017/25580052/b433278e-2e7d-11e7-9396-500fef12eee0.png)
![testcases-new](https://cloud.githubusercontent.com/assets/2781017/25580051/b43222c6-2e7d-11e7-99ab-c0a2709baf41.png)

r? @emilio
and maybe also @jdm?

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Source-Repo: https://github.com/servo/servo
Source-Revision: 3f1ae6425588bbac37da2e0f8aa2a708f51fa988

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b6e9d1479c65a59ebe6df841e7b648782449c5dc
2017-05-07 07:56:51 -05:00
..
mod.rs servo: Merge #16666 - Improvements to gradients (from pyfisch:gradients); r=emilio 2017-05-07 07:56:51 -05:00