Create anchors using NS_NewHTMLAnchor

This commit is contained in:
kipp@netscape.com
1998-08-29 03:17:02 +00:00
parent 4b2bf9eeda
commit 1acc2a8d33
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();