I think at some point nsBlockFrame needs a major cleanup. Here are some ideas I think might work (although I haven't thought them through well enough yet to really have a good idea how they might work): * It would be good to store vertical margins in separate structures, say, nsBlockVerticalMargin (or maybe something a little shorter), since a single vertical margin can be associated with an arbitrary number of blocks. * It might (I've thought about this even less) be nice to split nsBlockFrame into two classes: nsBlockFrame and nsBlockInnerFrame -- the outer one would contain only other block frames, tables and nsBlockInnerFrames, and the inner one would serve as a container for lines. The current way the mLines array stores both block and inline children has always seemed weird to me and I think the code might end up being simpler if we distinguished between them. Or something like that... I'm not sure if other people had been thinking about similar things, but I wanted to jot these ideas down in a bug before I forgot them...