Fix#1027.
Footers of split tables have a wrong position: they keep their position before
splitting the table. This commit is an improvement (it doesn’t crash anymore,
data are OK on each page) but it’s far from perfect.
We also have to take care of absolute and fixed elements in footers. It’s
probably already broken (see related #138), so…
TODOs have been added where things have to be improved.
If a parent box can only display absolute boxes at the bottom of the page, but
has other children that have to be drawn on the next page, keep the absolute
boxes for the next page too. It's at least very useful for markers.
Fix#945.
The device_size parameter was passed to many layout features, but it was only
used to set default size of replaced boxes with no implicit or explicit size
set. As this case is really rare for printed documents, and as it's also rare
to have printed supports that small, we can remove this "feature".
Moreover, in CSS3-images, another definition called "default object size" is
used to set replaced box size when no size is defined. This size doesn't seem
to be defined for images.
The spec says that we can do what we want to improve the rendering in such
cases. Adding a line would probably give exactly the same rendering as if there
were text, but the difference is so small that there's no need to hack the
formatting structure and keep the fix in 3 small lines during the layout.
Fix#873.
To fix#860 and #851, we decided to move block children a little bit to keep
them in the page. It's a bad idea, because children position is altered (and it
breaks many tests, by the way).
Increasing the allowed max_position_y is a better workaround as it doesn't
move blocks.
Here's another floating point rounding error we have to deal with. The original
issue comes from flex layout, but there are probably plenty of rounding
problems in other flows, so it's safe to put the workaround here.
Fix#851.
Top border is handled by collapsing_with_children set to False when the box is
a flex item. Bottom border is handled at the end of the flex item layout, by
adding the collapsed adjoining margins to the child's bottom border.
Fix#673.