mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
layout: Float table wrappers directly instead of generating a block
wrapper around them. Fixes Wikipedia tables leaking out. Along the way, I refactored tables' width calculation significantly. This was necessary in order to properly handle floated tables, as some of the logic had to be ported over from block flows.
This commit is contained in:
parent
e9a7b44f68
commit
62bb9093d7
9 changed files with 270 additions and 217 deletions
|
@ -144,3 +144,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
|
|||
== whitespace_nowrap_a.html whitespace_nowrap_ref.html
|
||||
== block_formatting_context_relative_a.html block_formatting_context_ref.html
|
||||
== block_formatting_context_translation_a.html block_formatting_context_translation_ref.html
|
||||
== floated_table_with_margin_a.html floated_table_with_margin_ref.html
|
||||
|
|
22
tests/ref/floated_table_with_margin_a.html
Normal file
22
tests/ref/floated_table_with_margin_a.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Rust - Wikipedia, the free encyclopedia</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table style="float: right; margin: 0px 0px 0em 1em; width: 100px; background: red;">
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
22
tests/ref/floated_table_with_margin_ref.html
Normal file
22
tests/ref/floated_table_with_margin_ref.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Rust - Wikipedia, the free encyclopedia</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="float: right"><table style="margin: 0px 0px 0em 1em; width: 100px; background: red;">
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
<tr><td>foo</td></tr>
|
||||
</table></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue