Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Table auto-layout differences compared to browsers #906
So I have this HTML
(I have a nice fiddle for this https://jsfiddle.net/4wr36ouh/)
Here I have some 1cm divs, along with some tables that have 1cm columns (or rather, they should).
However, in weasyprint, this property causes the content to escape the cell, with the cell staying 1cm. See this PDF test_pdf.pdf
Now, the auto-layout spec is User Agent-specific.... I don't know if this is just an incidental issue in the weasyprint algorithm leading to the difference, or if it's a fundamental difference in the interpretation of the
I'm going to try looking into this a bit more later, I believe there could be a very small patch that unifies behavior here. But I would like to know if there's any intentionality in this behavior that I should be aware about?
That's right, we treat cells as we treat other containing blocks when calculating minimum content width. We should check that content doesn't escape from the block for cells instead.
There's an extra
@liZe I was messing around on this problem all day, trying various things to get the result I needed here (I'm on JST), but I'm no longer confident in the kind of patch I'm creating to solve this problem. If you could take a whack at this I'd greatly appreciate it.
I opened up a PR with my work (I think the test itself is pretty important, not at all sure if I'm tackling the issue at the right spot though)
(As an aside, the code base is really interesting to walk through. This is a cool project!)
Thanks a lot for your PR, I've simplified the test and included it in the fix.
As you can see in 8d10c01, the fix was to add specific