fixed nsbeta3+ crash (bug# unavailable 'cause bugzilla is down) and removed FMM. r=attinasi

This commit is contained in:
rickg%netscape.com 2000-09-14 07:28:44 +00:00
parent af172bc1f9
commit d46d2d3c38
9 changed files with 21 additions and 7 deletions

View File

@ -848,7 +848,9 @@ nsresult CNavDTD::DidHandleStartTag(nsCParserNode& aNode,eHTMLTags aChildTag){
MOZ_TIMER_DEBUGLOG(("Stop: Parse Time: CNavDTD::DidHandleStartTag(), this=%p\n", this));
const nsString& theString=aNode.GetSkippedContent();
if(0<theString.Length()) {
CViewSourceHTML::WriteText(theString,*mSink,PR_TRUE,PR_FALSE);
CTextToken *theToken=(CTextToken*)mTokenAllocator->CreateTokenOfType(eToken_text,eHTMLTag_text,theString);
nsCParserNode theNode(theToken,0);
result=mSink->AddLeaf(theNode); //when the node get's destructed, so does the new token
}
MOZ_TIMER_DEBUGLOG(("Start: Parse Time: CNavDTD::DidHandleStartTag(), this=%p\n", this));
START_TIMER()

View File

@ -941,7 +941,7 @@ void InitializeElementTable(void) {
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
/*autoclose starttags and endtags*/ 0,0,0,0,
/*parent,incl,exclgroups*/ kExtensions, kFlowEntity, kNone,
/*special props, prop-range*/ kNonContainer,kDefaultPropRange,
/*special props, prop-range*/ kNone,kDefaultPropRange,
/*special parents,kids,skip*/ 0,0,eHTMLTag_html);
Initialize(

View File

@ -161,7 +161,7 @@ nsHTMLContentSinkStream::~nsHTMLContentSinkStream()
NS_IF_RELEASE(mDTD);
if (mBuffer)
nsMemory::Free(mBuffer);
delete [] mBuffer;
}
/**

View File

@ -678,6 +678,11 @@ void DetermineParseMode(nsString& aBuffer,nsDTDMode& aParseMode,eParserDocType&
aParseMode=eDTDMode_quirks;
return;
}
else if(aMimeType.EqualsWithConversion(kTextCSSContentType)) {
aDocType=ePlainText;
aParseMode=eDTDMode_quirks;
return;
}
//now let's see if we have HTML or XHTML...

View File

@ -64,13 +64,13 @@ static char* gHTMLTypes[] = {
"text/plain",
"text/rtf",
"text/cpp",
"text/css",
0
};
static char* gXMLTypes[] = {
"text/xml",
"application/xml",
"text/css",
0
};

View File

@ -848,7 +848,9 @@ nsresult CNavDTD::DidHandleStartTag(nsCParserNode& aNode,eHTMLTags aChildTag){
MOZ_TIMER_DEBUGLOG(("Stop: Parse Time: CNavDTD::DidHandleStartTag(), this=%p\n", this));
const nsString& theString=aNode.GetSkippedContent();
if(0<theString.Length()) {
CViewSourceHTML::WriteText(theString,*mSink,PR_TRUE,PR_FALSE);
CTextToken *theToken=(CTextToken*)mTokenAllocator->CreateTokenOfType(eToken_text,eHTMLTag_text,theString);
nsCParserNode theNode(theToken,0);
result=mSink->AddLeaf(theNode); //when the node get's destructed, so does the new token
}
MOZ_TIMER_DEBUGLOG(("Start: Parse Time: CNavDTD::DidHandleStartTag(), this=%p\n", this));
START_TIMER()

View File

@ -941,7 +941,7 @@ void InitializeElementTable(void) {
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
/*autoclose starttags and endtags*/ 0,0,0,0,
/*parent,incl,exclgroups*/ kExtensions, kFlowEntity, kNone,
/*special props, prop-range*/ kNonContainer,kDefaultPropRange,
/*special props, prop-range*/ kNone,kDefaultPropRange,
/*special parents,kids,skip*/ 0,0,eHTMLTag_html);
Initialize(

View File

@ -161,7 +161,7 @@ nsHTMLContentSinkStream::~nsHTMLContentSinkStream()
NS_IF_RELEASE(mDTD);
if (mBuffer)
nsMemory::Free(mBuffer);
delete [] mBuffer;
}
/**

View File

@ -678,6 +678,11 @@ void DetermineParseMode(nsString& aBuffer,nsDTDMode& aParseMode,eParserDocType&
aParseMode=eDTDMode_quirks;
return;
}
else if(aMimeType.EqualsWithConversion(kTextCSSContentType)) {
aDocType=ePlainText;
aParseMode=eDTDMode_quirks;
return;
}
//now let's see if we have HTML or XHTML...