servo/components/layout
bors-servo f5a546a160 Auto merge of #12437 - gpoesia:tr_margin_fix, r=pcwalton
Handle row borders in border collapsing logic.

<!-- Please describe your changes on the following line: -->
Handle table row border when collapsing borders for a table row. The row border is combined with the cell's border using the already implemented conflict resolution logic.

This is a screenshot of the following test:

```html
<!doctype html>
<html><body>
    <style>
      table {
        border-collapse: collapse;
      }
      tr {
        border: 1px solid black;
      }
    </style>
    <table>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
      <tr><td>Lorem</td><td>Ipsum</td><td>Sit</td><td>Dolor</td></tr>
    </table>
  </body>
</html>
```

<img src="https://dl.dropboxusercontent.com/u/10962672/Screenshots%20Servo/servo_tr_border_collapse.png"/>

The top border is missing, but I think that's a different bug, since it also does not show up when the border is in the cells, and not the rows. Also, when debugging the border collapsing structures, they seem ok (the top border seems to be there). I can look at that bug in a separate issue (or in this one too if you prefer).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11527 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because I didn't find how to automatically test it (will be happy to provide a test if there's infrastructure for this kind of test already in place).

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Fixes #11527.

<!-- 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/12437)
<!-- Reviewable:end -->
2016-08-31 11:28:18 -05:00
..
animation.rs Make RestyleDamage::compute take no optional argument, delegate the handling to the caller. 2016-08-10 18:26:24 -07:00
block.rs Auto merge of #13051 - notriddle:root_flow_percent, r=glennw 2016-08-28 19:16:19 -05:00
Cargo.toml Update cssparser 2016-08-28 23:10:56 +02:00
construct.rs Auto merge of #13012 - servo:shared-layout-context, r=nox 2016-08-24 09:38:31 -05:00
context.rs Move image fetching methods to SharedLayoutContext. 2016-08-23 16:13:23 +02:00
data.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
display_list_builder.rs Pass SharedLayoutContext to DisplayListBuildState::new. 2016-08-23 18:04:33 +02:00
flex.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
floats.rs layout: Take margins in the inline direction into account when 2016-05-10 17:11:28 -07:00
flow.rs Auto merge of #13012 - servo:shared-layout-context, r=nox 2016-08-24 09:38:31 -05:00
flow_list.rs Use impl DoubleEndedIterator for two flow_list iterators 2016-08-14 19:06:18 +02:00
flow_ref.rs Correct the signature of flow_ref::deref_mut. 2016-06-06 15:14:23 +02:00
fragment.rs Auto merge of #13012 - servo:shared-layout-context, r=nox 2016-08-24 09:38:31 -05:00
generated_content.rs Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
incremental.rs Introduce a script_layout_interface crate and move RestyleDamage to it. 2016-06-20 19:02:36 +02:00
inline.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
layout_debug.rs Fragment debug_id u16 only exists in debug, prod will format mem address 2016-06-04 19:19:42 +02:00
lib.rs Update Rust to 1.13.0-nightly (198713106 2016-08-26) 2016-08-28 13:45:03 +02:00
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
model.rs Update euclid to 0.10.1 2016-08-21 03:03:45 +02:00
multicol.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Pass a &mut Flow to traverse_flow_tree_preorder. 2016-08-25 09:21:35 +02:00
persistent_list.rs Move util::persistent_list to layout 2016-02-20 19:20:38 +01:00
query.rs Pass &mut Flow to query functions. 2016-08-25 09:40:20 +02:00
sequential.rs Pass a &mut Flow to build_display_list_for_subtree. 2016-08-25 09:21:36 +02:00
table.rs Handle row borders in border collapsing logic. 2016-08-30 23:00:58 -03:00
table_caption.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
table_cell.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
table_colgroup.rs Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
table_row.rs Handle row borders in border collapsing logic. 2016-08-30 23:00:58 -03:00
table_rowgroup.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
table_wrapper.rs Pass SharedLayoutContext to Flow::compute_absolute_position. 2016-08-24 10:12:38 +02:00
text.rs Prefer length and percentage for word spacing 2016-08-09 17:53:40 +05:30
traversal.rs Stop creating a LayoutContext in build_display_list_for_subtree. 2016-08-24 10:16:53 +02:00
webrender_helpers.rs layout: Make the stacking context take into account the children transform when calculating overflow areas. 2016-08-16 15:34:28 -07:00
wrapper.rs Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00