Create anchors using NS_NewHTMLAnchor

git-svn-id: svn://10.0.0.236/trunk@8800 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-08-29 03:17:02 +00:00
parent 64ec20b0cd
commit d44a503526
3 changed files with 10 additions and 2 deletions

View File

@@ -352,6 +352,9 @@ CreateContentObject(const nsIParserNode& aNode,
// Create content object for the given tag
nsresult rv = NS_OK;
switch (aNodeType) {
case eHTMLTag_a:
rv = NS_NewHTMLAnchor(aResult, atom);
break;
case eHTMLTag_applet:
rv = NS_NewHTMLApplet(aResult, atom);
break;
@@ -760,7 +763,7 @@ SinkContext::AddLeaf(const nsIParserNode& aNode)
NS_ASSERTION(mStackPos > 0, "leaf w/o container");
nsIHTMLContent* parent = mStack[mStackPos-1].mContent;
parent->AppendChildTo(content, PR_FALSE);
NS_IF_RELEASE(content);
NS_RELEASE(content);
// Mark sink dirty if it can safely reflow something
MaybeMarkSinkDirty();