Index: nsHTMLContentSink.cpp
===================================================================
RCS file: /cvsroot/mozilla/content/html/document/src/nsHTMLContentSink.cpp,v
retrieving revision 3.566
diff -u -r3.566 nsHTMLContentSink.cpp
--- nsHTMLContentSink.cpp 2 Jul 2002 17:58:21 -0000 3.566
+++ nsHTMLContentSink.cpp 11 Jul 2002 22:27:31 -0000
@@ -412,6 +412,7 @@
SinkContext* mCurrentContext;
SinkContext* mHeadContext;
PRInt32 mNumOpenIFRAMES;
+ PRBool mHasIFRAME;
nsCOMPtr mScriptElements;
nsCOMPtr mDummyParserRequest;
@@ -822,6 +823,10 @@
dtd->CollectSkippedContent(eHTMLTag_textarea, skippedContent, lineNo);
}
+
+ if (eHTMLTag_iframe == aNodeType)
+ mHasIFRAME = PR_TRUE;
+
// Make the content object
rv = MakeContentObject(aNodeType, nodeInfo, aForm,
aWebShell, aResult, &skippedContent,
@@ -2106,6 +2111,7 @@
mDeflectedCount = 0;
mLastSampledUserEventTime = 0;
mScrolledToRefAlready = PR_FALSE;
+ mHasIFRAME = PR_FALSE;
}
HTMLContentSink::~HTMLContentSink()
@@ -4902,6 +4908,9 @@
nsCOMPtr nodeInfo;
mNodeInfoManager->GetNodeInfo(nsHTMLAtoms::script, nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
+
+ if (mHasIFRAME)
+ mCurrentContext->FlushTags(PR_TRUE);
rv = NS_CreateHTMLElement(getter_AddRefs(element), nodeInfo, PR_FALSE);
if (NS_FAILED(rv)) {