Don't create a frame for the root element if it's styled display:none. b=454361 r+sr=roc

This commit is contained in:
Mats Palmgren 2008-09-12 03:36:58 +02:00
parent fe5c11a5ea
commit 8301514138

View File

@ -4137,6 +4137,12 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
"Scrollbars should have been propagated to the viewport");
#endif
if (NS_UNLIKELY(display->mDisplay == NS_STYLE_DISPLAY_NONE)) {
mInitialContainingBlock = nsnull;
mRootElementStyleFrame = nsnull;
return NS_OK;
}
nsFrameConstructorSaveState absoluteSaveState;
if (mHasRootAbsPosContainingBlock) {
// Push the absolute containing block now so we can absolutely position