Merge pull request #2865 from glennw/wiki-layout-2

Fix issue with auto table layout when cells have multiple fragments. Fix...
This commit is contained in:
Patrick Walton 2014-07-17 20:32:12 -07:00
commit aa43c1493a
4 changed files with 35 additions and 2 deletions

View file

@ -1092,8 +1092,8 @@ impl Flow for InlineFlow {
let fragment_intrinsic_widths = fragment.intrinsic_widths(Some(context));
intrinsic_widths.minimum_width = geometry::max(intrinsic_widths.minimum_width,
fragment_intrinsic_widths.minimum_width);
intrinsic_widths.preferred_width = geometry::max(intrinsic_widths.preferred_width,
fragment_intrinsic_widths.preferred_width);
intrinsic_widths.preferred_width = intrinsic_widths.preferred_width +
fragment_intrinsic_widths.preferred_width;
}
self.base.intrinsic_widths = intrinsic_widths;

View file

@ -84,3 +84,4 @@
== noscript.html noscript_ref.html
== pseudo_inherit.html pseudo_inherit_ref.html
== float_intrinsic_height.html float_intrinsic_height_ref.html
== table_auto_width.html table_auto_width_ref.html

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table>
<tbody>
<tr>
<td>
<span>12345<span>67890</span></span>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table>
<tbody>
<tr>
<td>
<span>1234567890</span>
</td>
</tr>
</tbody>
</table>
</body>
</html>