From 37833fde23544310c72f9313ce7c32c0ae131b92 Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Sat, 8 Jan 2000 00:53:43 +0000 Subject: [PATCH] added debug code for ParseFragment(); r=harishd --- htmlparser/src/nsParser.cpp | 11 ++++++++++- parser/htmlparser/src/nsParser.cpp | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/htmlparser/src/nsParser.cpp b/htmlparser/src/nsParser.cpp index 6ac86c1502a..29d164f9003 100644 --- a/htmlparser/src/nsParser.cpp +++ b/htmlparser/src/nsParser.cpp @@ -831,7 +831,9 @@ nsresult nsParser::Parse(const nsString& aSourceBuffer,void* aKey,const nsString pc=mParserContext; pc->mScanner->Append(mUnusedInput); } + pc->mScanner->Append(aSourceBuffer); + if (nsnull != pc->mPrevContext) { pc->mMultipart = (pc->mPrevContext->mMultipart || !aLastCall); } @@ -924,7 +926,14 @@ nsresult nsParser::ParseFragment(const nsString& aSourceBuffer,void* aKey,nsITag theContext.Append(""); //XXXHack! I'll make this better later. 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("titlelink"); +#else + //this is the normal code path for paste... + theBuffer.Append(aSourceBuffer); +#endif + if(theBuffer.Length()){ //now it's time to try to build the model from this fragment diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index 6ac86c1502a..29d164f9003 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -831,7 +831,9 @@ nsresult nsParser::Parse(const nsString& aSourceBuffer,void* aKey,const nsString pc=mParserContext; pc->mScanner->Append(mUnusedInput); } + pc->mScanner->Append(aSourceBuffer); + if (nsnull != pc->mPrevContext) { pc->mMultipart = (pc->mPrevContext->mMultipart || !aLastCall); } @@ -924,7 +926,14 @@ nsresult nsParser::ParseFragment(const nsString& aSourceBuffer,void* aKey,nsITag theContext.Append(""); //XXXHack! I'll make this better later. 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("titlelink"); +#else + //this is the normal code path for paste... + theBuffer.Append(aSourceBuffer); +#endif + if(theBuffer.Length()){ //now it's time to try to build the model from this fragment