layout: Unify the block-size computation for blocks and floats.

The float code was old and did not support most of CSS 2.1. So unifying
the two paths both simplifies code and improves functionality.

Improves the Reddit sidebar.
This commit is contained in:
Patrick Walton 2014-09-24 10:07:39 -07:00
parent c2d6d8084c
commit 9f4c2de211
6 changed files with 86 additions and 140 deletions

View file

@ -145,3 +145,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.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
== margins_inside_floats_a.html margins_inside_floats_ref.html

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<div style="float: left;">
<div style="margin-bottom: 64px;">Must be this tall</div>
<div style="margin-top: 64px;">to write multi-threaded code.</div>
</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<div>
<div style="margin-bottom: 64px;">Must be this tall</div>
<div style="margin-top: 64px;">to write multi-threaded code.</div>
</div>
</body>
</html>