servo/components/layout
bors-servo 3f1ae64255 Auto merge of #16666 - pyfisch:gradients, r=emilio
Improvements to gradients.

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:
* a956e3fd52 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.
* b230be8aaf 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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16666)
<!-- Reviewable:end -->
2017-05-07 07:56:51 -05:00
..
animation.rs stylo: Store font metrics provider in thread local style context 2017-04-09 19:15:35 +08:00
block.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
Cargo.toml Upgrade to html5ever 0.16 2017-05-02 19:24:28 +02:00
construct.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
context.rs Eliminate ScrollRootId 2017-04-20 08:51:38 +02:00
data.rs Bug 1325734 - Remove Servo Layout's dependency on the initial-ness of the style. r=emilio 2017-01-09 11:51:36 -08:00
display_list_builder.rs Auto merge of #16666 - pyfisch:gradients, r=emilio 2017-05-07 07:56:51 -05:00
flex.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
floats.rs Migrated -Z trace-layout to serde_json 2016-11-07 15:54:07 +08:00
flow.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
flow_list.rs Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
flow_ref.rs Migrated -Z trace-layout to serde_json 2016-11-07 15:54:07 +08:00
fragment.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
generated_content.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
incremental.rs Force reflow in the sequential fallback of block format context 2017-04-23 08:32:25 +08:00
inline.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
layout_debug.rs Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
lib.rs Auto merge of #16689 - servo:m5e, r=nox 2017-05-03 08:42:41 -05:00
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
model.rs Create a module for generics and make BorderRadiusSize generic 2017-04-25 17:13:41 +05:30
multicol.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Remove cached thread local context from LayoutContext 2017-02-08 08:47:54 +08:00
persistent_list.rs Move util::persistent_list to layout 2016-02-20 19:20:38 +01:00
query.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
sequential.rs Force reflow in the sequential fallback of block format context 2017-04-23 08:32:25 +08:00
table.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
table_caption.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
table_cell.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
table_colgroup.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
table_row.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
table_rowgroup.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
table_wrapper.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
text.rs Fix up script and layout. 2017-05-02 17:35:45 -07:00
traversal.rs Eliminate ScrollRootId 2017-04-20 08:51:38 +02:00
webrender_helpers.rs Auto merge of #16666 - pyfisch:gradients, r=emilio 2017-05-07 07:56:51 -05:00
wrapper.rs Bug 1325734 - Simplify ElementData and eliminate the concept of consuming styles. r=emilio 2017-01-09 11:51:37 -08:00