layout: Don't use the block container inline size as the initial

computed table inline size.

Makes google.com fully centered.
This commit is contained in:
Patrick Walton 2015-08-03 20:03:12 -07:00
parent 0565df8596
commit 04928bf1e3
6 changed files with 114 additions and 4 deletions

View file

@ -284,6 +284,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== table_caption_bottom_a.html table_caption_bottom_ref.html
== table_caption_top_a.html table_caption_top_ref.html
== table_cell_float_a.html table_cell_float_ref.html
== table_center_a.html table_center_ref.html
== table_colspan_fixed_a.html table_colspan_fixed_ref.html
== table_colspan_simple_a.html table_colspan_simple_ref.html
== table_containing_block_a.html table_containing_block_ref.html
@ -294,6 +295,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== table_padding_a.html table_padding_ref.html
== table_percentage_capping_a.html table_percentage_capping_ref.html
== table_percentage_width_a.html table_percentage_width_ref.html
== table_preferred_width_a.html table_preferred_width_ref.html
== table_row_direction_a.html table_row_direction_ref.html
== table_width_attribute_a.html table_width_attribute_ref.html
== text_align_complex_a.html text_align_complex_ref.html

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<style>
body, html {
margin: 0;
}
</style>
<body>
<center><table border=0 cellspacing=0><tr><td style="border: none; padding: 0; height: 100px; width: 100px; background: green"></td></tr></table></center>
</body>
</html>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<style>
body, html {
margin: 0;
}
</style>
<body>
<center><div style="height: 100px; width: 100px; background: green"></div></center>
</body>
</html>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<style>
#a {
width: 500px;
}
table, table * {
border: none;
border-spacing: 0;
padding: 0;
}
</style>
<div id=a><table><td>
Hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
</td></table></div>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<style>
#a {
width: 500px;
}
table, table * {
border: none;
border-spacing: 0;
padding: 0;
}
</style>
<div id=a>
Hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
hello hello hello hello
</div>