mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Fix issue with auto table layout when cells have multiple fragments. Fixes some layout issues related to #2554.
This commit is contained in:
parent
c85f6db17b
commit
049b99cfac
4 changed files with 35 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
16
src/test/ref/table_auto_width.html
Normal file
16
src/test/ref/table_auto_width.html
Normal 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>
|
16
src/test/ref/table_auto_width_ref.html
Normal file
16
src/test/ref/table_auto_width_ref.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span>1234567890</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue