set attributes on <frame>, <frameset> layout

git-svn-id: svn://10.0.0.236/trunk@6121 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1998-07-21 23:20:04 +00:00
parent 59ebdc3a76
commit 51d7d8a151
5 changed files with 70 additions and 55 deletions

View File

@@ -595,6 +595,7 @@ HTMLContentSink::OpenFrameset(const nsIParserNode& aNode)
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult rv = NS_NewHTMLFrameset(&mFrameset, atom, nsnull);
mFrameset->SetDocument(mDocument);
NS_RELEASE(atom);
if (NS_OK != rv) {
return rv;
@@ -605,9 +606,6 @@ HTMLContentSink::OpenFrameset(const nsIParserNode& aNode)
// Add attributes to the frameset content object
AddAttributes(aNode, mFrameset);
// XXX If the frameset already existed and has been reflowed somewhat
// then we need to trigger a style change
mRoot->AppendChild(mFrameset, PR_TRUE);
return NS_OK;
}
@@ -617,6 +615,8 @@ HTMLContentSink::CloseFrameset(const nsIParserNode& aNode)
{
FlushText();
mRoot->AppendChild(mFrameset, PR_TRUE);
SINK_TRACE_NODE(SINK_TRACE_CALLS,
"HTMLContentSink::CloseFrameset", aNode);
@@ -1805,6 +1805,9 @@ nsresult HTMLContentSink::ProcessFrameTag(nsIHTMLContent** aInstancePtrResult,
nsIAtom* atom = NS_NewAtom(tmp);
nsresult rv = NS_NewHTMLFrame(aInstancePtrResult, atom, mWebShell);
if (NS_OK == rv) {
rv = AddAttributes(aNode, *aInstancePtrResult);
}
NS_RELEASE(atom);
return rv;