layout: Translate floats when clearing non-floated blocks.

Improves CNN layout considerably.

Closes #3439.
This commit is contained in:
Patrick Walton 2014-09-22 14:07:37 -07:00
parent ac895a0e65
commit 34b3408a89
4 changed files with 28 additions and 1 deletions

View file

@ -138,3 +138,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
== percentage_height_float_a.html percentage_height_float_ref.html
== img_block_maxwidth_a.html img_block_maxwidth_ref.html
== img_block_maxwidth_b.html img_block_maxwidth_ref.html
== float_clearance_a.html float_clearance_ref.html

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="width: 256px;">
<div style="width: 237px; float: left;">hello</div>
<div style="clear: both;">darkness</div>
<div style="float: left;">my old friend</div>
</div>
</body>
</html>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="width: 256px;">
<div style="width: 237px; float: left;">hello</div>
<div style="clear: both;">darkness</div>
<div>my old friend</div>
</div>
</body>
</html>