Let me talk through my CatTrap layout engine?
The minimum & natural sizes can be computed in a postorder traversal. A preorder can compute the maximum widths.
Once I have the min & max widths I can clamp the natural widths to them.
Once I know the final width I can compute the natural height in a postorder traversal. A preorder traversal can then finalize it within the given bounds.
That'll give good input to more advanced layout. And yes, I'm not tackling vertical text yet...
1/2