Incorrect absolute positionning when the containing block is a table cell
Here is a small example where the renderer produce an incorrect output: https://gist.github.com/alcinos/a0a88c4ec735e62deacf
The file is correctly rendered by current versions of chrome and firefox.
Note that I tested it on the latest version available on git, with python2 and python3, with in both cases the same incorrect output
Could you reduce the test case to be as small as possible while showing the problem, and describe what the problem is? Thanks.
Apparently, the issue comes from an incorrect interpretation of the position relative/absolute in td cells. Here is a smaller example: https://gist.github.com/alcinos/140dadd8179a0811f4fe
Firefox renders the previous file as follows:

Weasy print miss-interpret the "top:0px" property:

As a side note, the rendering is correct when the table is removed and the td replaced by a regular div
This seems to be caused by / related to the following:
- the
<td>essentially being empty (apart from the absolutely positioned div, which doesn't contribute to the height of the table cell) - the table layout algorithm "resetting" the cell's height to
autobefore laying out its contents (see here: https://github.com/Kozea/WeasyPrint/blob/v60.2/weasyprint/layout/table.py#L145-L147)
This then leads to an issue in block_container_layout, in particular these lines: https://github.com/Kozea/WeasyPrint/blob/v60.2/weasyprint/layout/block.py#L794-L800, where new_box.height gets set to 0 - which presumably breaks positioning the absolute child div.