Created attachment 607052 [details] testcase (asserts fatally when loaded) ###!!! ASSERTION: Already have an undisplayed context entry for aContent: '!GetUndisplayedContent(aContent)', file layout/base/nsFrameManager.cpp, line 371 ###!!! ASSERTION: Found more undisplayed content data after removal: 'context == nsnull', file layout/base/nsFrameManager.cpp, line 427 ###!!! ASSERTION: Unexpected document; this will lead to incorrect behavior!: 'aElement->GetCurrentDoc() == Document()', file layout/base/RestyleTracker.cpp, line 291 (Above assertions are probably covered by bug 537624.) Assertion failure: mElements.Contains(cur), at layout/style/nsCSSRuleProcessor.cpp:3363 (New assertion, added in bug 705877.)
Yeah, so... That last assert is triggered by the previous ones: we're reresolving style on a bogus undisplayed entry (in particular, for a node that's not in the document), so of course we don't have the right parent stack for it. Jesse, how much of a problem is this for you? I can make the assert nonfatal or I can loosen it up to be nonfatal or not fire at all at least for nodes not in documents (since there is no good reason for such nodes to ever come through this code), if that would be useful, but I don't think there's any new problem here past what bug 537624 covers.
And on trunk I should of course just fix bug 537624. I'm really sorry I haven't yet.
This is only a problem for me in that I won't find other ways to trigger the same assertion. How much of a problem is that for you? ;)
Some. ;) I'll try to get a fix up tomorrow.
The patch I just checked in for bug 537624 fixes this bug.
Fixed yesterday. Jesse, keep banging on this stuff, please!