This is sort-of-related to bug 15405. I don't see anything in the CSS spec to say that the root element should expand to contain floats. ('overflow' basically never applies to the root since it's propagated to the viewport.) Steps to reproduce: load http://dump.testsuite.org/2006/www-style/001.htm Expected results: bottom blue border is same distance from text that top blue border is Actual results: bottom blue border moves down to contain light blue float Fixing this would bring us into parity with Opera 8.52, WebCore, and KHTML.
Basically, the problem here is that we (in NS_NewDocumentElementFrame) give the root NS_BLOCK_SPACE_MGR -- in other words, the root establishes the first block formatting context, instead of the initial containing block (nsCanvasFrame). I see three ways to fix this: 1. make the nsCanvasFrame host a space manager and don't set NS_BLOCK_SPACE_MGR on the root 2. make the nsCanvasFrame subclass nsBlockFrame, and set NS_BLOCK_SPACE_MGR on it 3. (this *may* leave other related bugs) add another bit that's like NS_BLOCK_SPACE_MGR but that the root element doesn't have (or check some other information that's not a state bit), and use that instead in nsBlockFrame::ComputeFinalSize
bug 540491 has some additional details about compatibility and more recent spec discussion
You need to log in before you can comment on or make changes to this bug.