initial support for <iframe>

git-svn-id: svn://10.0.0.236/trunk@3657 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze
1998-06-11 16:46:33 +00:00
parent 3609fb407a
commit da12569a7e
21 changed files with 404 additions and 154 deletions

View File

@@ -40,6 +40,8 @@
#include "nsRepository.h"
extern nsresult NS_NewHTMLIFrame(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag); // XXX move
// XXX attribute values have entities in them - use the parsers expander!
// XXX Go through a factory for this one
@@ -173,6 +175,8 @@ protected:
nsresult ProcessCloseOPTIONTag(const nsIParserNode& aNode);
nsresult ProcessOPTIONTagContent(const nsIParserNode& aNode);
nsresult ProcessIFRAMETag(nsIHTMLContent** aInstancePtrResult,
const nsIParserNode& aNode);
//----------------------------------------------------------------------
void GetAttributeValueAt(const nsIParserNode& aNode,
@@ -557,6 +561,10 @@ PRInt32 HTMLContentSink::OpenContainer(const nsIParserNode& aNode)
rv = ProcessOpenOPTIONTag(&container, aNode);
break;
case eHTMLTag_iframe:
rv = ProcessIFRAMETag(&container, aNode);
break;
default:
rv = NS_NewHTMLContainer(&container, atom);
break;
@@ -1306,6 +1314,20 @@ HTMLContentSink::ProcessOPTIONTagContent(const nsIParserNode& aNode)
return NS_OK;
}
nsresult
HTMLContentSink::ProcessIFRAMETag(nsIHTMLContent** aInstancePtrResult,
const nsIParserNode& aNode)
{
nsAutoString tmp(aNode.GetText());
tmp.ToUpperCase();
nsIAtom* atom = NS_NewAtom(tmp);
nsresult rv = NS_NewHTMLIFrame(aInstancePtrResult, atom);
NS_RELEASE(atom);
return rv;
}
nsresult HTMLContentSink::ProcessWBRTag(nsIHTMLContent** aInstancePtrResult,
const nsIParserNode& aNode)
{