added debug code for ParseFragment(); r=harishd

This commit is contained in:
rickg%netscape.com 2000-01-08 00:53:43 +00:00
Родитель 37c91dade9
Коммит 37833fde23
2 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -831,7 +831,9 @@ nsresult nsParser::Parse(const nsString& aSourceBuffer,void* aKey,const nsString
pc=mParserContext; pc=mParserContext;
pc->mScanner->Append(mUnusedInput); pc->mScanner->Append(mUnusedInput);
} }
pc->mScanner->Append(aSourceBuffer); pc->mScanner->Append(aSourceBuffer);
if (nsnull != pc->mPrevContext) { if (nsnull != pc->mPrevContext) {
pc->mMultipart = (pc->mPrevContext->mMultipart || !aLastCall); pc->mMultipart = (pc->mPrevContext->mMultipart || !aLastCall);
} }
@ -924,7 +926,14 @@ nsresult nsParser::ParseFragment(const nsString& aSourceBuffer,void* aKey,nsITag
theContext.Append("<endnote>"); //XXXHack! I'll make this better later. theContext.Append("<endnote>"); //XXXHack! I'll make this better later.
nsAutoString theBuffer(theContext); nsAutoString theBuffer(theContext);
theBuffer.Append(aSourceBuffer); #if 0
//use this to force a buffer-full of content as part of a paste operation...
theBuffer.Append("<title>title</title><a href=\"one\">link</a>");
#else
//this is the normal code path for paste...
theBuffer.Append(aSourceBuffer);
#endif
if(theBuffer.Length()){ if(theBuffer.Length()){
//now it's time to try to build the model from this fragment //now it's time to try to build the model from this fragment

Просмотреть файл

@ -831,7 +831,9 @@ nsresult nsParser::Parse(const nsString& aSourceBuffer,void* aKey,const nsString
pc=mParserContext; pc=mParserContext;
pc->mScanner->Append(mUnusedInput); pc->mScanner->Append(mUnusedInput);
} }
pc->mScanner->Append(aSourceBuffer); pc->mScanner->Append(aSourceBuffer);
if (nsnull != pc->mPrevContext) { if (nsnull != pc->mPrevContext) {
pc->mMultipart = (pc->mPrevContext->mMultipart || !aLastCall); pc->mMultipart = (pc->mPrevContext->mMultipart || !aLastCall);
} }
@ -924,7 +926,14 @@ nsresult nsParser::ParseFragment(const nsString& aSourceBuffer,void* aKey,nsITag
theContext.Append("<endnote>"); //XXXHack! I'll make this better later. theContext.Append("<endnote>"); //XXXHack! I'll make this better later.
nsAutoString theBuffer(theContext); nsAutoString theBuffer(theContext);
theBuffer.Append(aSourceBuffer); #if 0
//use this to force a buffer-full of content as part of a paste operation...
theBuffer.Append("<title>title</title><a href=\"one\">link</a>");
#else
//this is the normal code path for paste...
theBuffer.Append(aSourceBuffer);
#endif
if(theBuffer.Length()){ if(theBuffer.Length()){
//now it's time to try to build the model from this fragment //now it's time to try to build the model from this fragment