Bug 599080 - Frames leak when failing to insert them in the frame tree; r=roc a=blocking-final+

This commit is contained in:
Ehsan Akhgari 2010-10-06 16:30:47 -04:00
parent 29bec3cf7d
commit b5cea518bc

View File

@ -3710,6 +3710,13 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
CHECK_ONLY_ONE_BIT(FCDATA_MAY_NEED_SCROLLFRAME, FCDATA_FORCE_VIEW);
#undef CHECK_ONLY_ONE_BIT
// Don't create a subdocument frame for iframes if we're creating extra frames
if (aState.mCreatingExtraFrames && aItem.mContent->IsHTML() &&
aItem.mContent->Tag() == nsGkAtoms::iframe)
{
return NS_OK;
}
nsStyleContext* const styleContext = aItem.mStyleContext;
const nsStyleDisplay* display = styleContext->GetStyleDisplay();