Auto merge of #13681 - gpoesia:master, r=mbrubeck

Fix margin size calculation for TableWrapper

<!-- Please describe your changes on the following line: -->

Fixes inline size calculation for TableWrapper. The table's width was always reaching the inline size equation solver as a specified variable, which was causing the system to be overdetermined when there was a margin specified for the table, and this caused the overflow reported in #12748. The fix consists in handling three cases when the table's width is not specified: if the preferred size of all columns fits, it is returned; if the minimum size does not fit, it is returned instead (it will overflow), otherwise, it is returned as a free variable (that should be solved together with the margin to some value above the minimum width and below the preferred width).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12748
- [X] There are tests for these changes

<!-- 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/13681)

<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-23 08:55:44 -08:00 committed by GitHub
commit b0f91193fd
4 changed files with 91 additions and 1 deletions

View file

@ -5220,6 +5220,18 @@
"url": "/_mozilla/css/table_intrinsic_style_specified_width_a.html"
}
],
"css/table_margin_a.html": [
{
"path": "css/table_margin_a.html",
"references": [
[
"/_mozilla/css/table_margin_ref.html",
"=="
]
],
"url": "/_mozilla/css/table_margin_a.html"
}
],
"css/table_margin_auto_a.html": [
{
"path": "css/table_margin_auto_a.html",
@ -20586,6 +20598,18 @@
"url": "/_mozilla/css/table_intrinsic_style_specified_width_a.html"
}
],
"css/table_margin_a.html": [
{
"path": "css/table_margin_a.html",
"references": [
[
"/_mozilla/css/table_margin_ref.html",
"=="
]
],
"url": "/_mozilla/css/table_margin_a.html"
}
],
"css/table_margin_auto_a.html": [
{
"path": "css/table_margin_auto_a.html",