Float & flood should probably be implemented in JavaScript so that we can introduce the option of making the image fit if there is a small difference between the height of the available whitespace and the height of the figure. And only after checking this, upgrade to float.
Also, we could fix the current image + caption issue (breaking inside).
[edit] Problem is we’ve got VERY LIMITED TIME to push that, maybe something like 50 or 100 ms before the paginating process is ended. And I’ve tried a lot of simple things to get around this issue: reloading the whole document won’t work as it has no effect on pagination, the smallest timeout possible either, etc.
As far as I’m concerned, I wish we can create something simple so that 1. it stands the test of time and 2. is easily maintainable. And ideally, I don’t want to introduce something “dirty” to achieve that. So if you’ve got any idea as I’m probably missing something, feel free to share it.