From 50df06b8df382f8ce99ad37520a431effc7680ff Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Fri, 10 Aug 2001 02:02:01 +0000 Subject: [PATCH] Oops my previous checkin has incorrect bug # and sr=. Backing out my preivous change to update the comments git-svn-id: svn://10.0.0.236/trunk@100720 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/CNavDTD.cpp | 17 ++++++----------- mozilla/parser/htmlparser/src/CNavDTD.cpp | 17 ++++++----------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/mozilla/htmlparser/src/CNavDTD.cpp b/mozilla/htmlparser/src/CNavDTD.cpp index cb5c574bf3a..fa5ac45e7e6 100644 --- a/mozilla/htmlparser/src/CNavDTD.cpp +++ b/mozilla/htmlparser/src/CNavDTD.cpp @@ -3629,14 +3629,11 @@ nsresult CNavDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool aC } } else if(1==theNode->mUseCount) { - // This fixes bug 30885,29626. + // This fixes bug 30885 and 29626 // Make sure that the node, which is about to // get released does not stay on the style stack... - // Also be sure to remove the correct style off the - // style stack. - Ref. bug 94208. - // Ex - // Make sure that removes B off the style stack. - mBodyContext->RemoveStyle(theTag); + nsCParserNode* node=mBodyContext->PopStyle(theTag); + IF_FREE(node, &mNodeAllocator); } mBodyContext->PushStyles(theChildStyleStack); } @@ -3656,11 +3653,9 @@ nsresult CNavDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool aC //Ah, at last, the final case. If you're here, then we just popped a //style tag that got onto that tag stack from a stylestack somewhere. //Pop it from the stylestack if the target is also a style tag. - //Make sure to remove the matching style. In the following example - // make sure that - // does not remove off the style stack. - bug 94208 - if (theTargetTagIsStyle && theTag == aTarget) { - mBodyContext->RemoveStyle(theTag); + if(theTargetTagIsStyle) { + nsCParserNode* node=mBodyContext->PopStyle(theTag); + IF_FREE(node, &mNodeAllocator); } } } diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp index cb5c574bf3a..fa5ac45e7e6 100644 --- a/mozilla/parser/htmlparser/src/CNavDTD.cpp +++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp @@ -3629,14 +3629,11 @@ nsresult CNavDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool aC } } else if(1==theNode->mUseCount) { - // This fixes bug 30885,29626. + // This fixes bug 30885 and 29626 // Make sure that the node, which is about to // get released does not stay on the style stack... - // Also be sure to remove the correct style off the - // style stack. - Ref. bug 94208. - // Ex - // Make sure that removes B off the style stack. - mBodyContext->RemoveStyle(theTag); + nsCParserNode* node=mBodyContext->PopStyle(theTag); + IF_FREE(node, &mNodeAllocator); } mBodyContext->PushStyles(theChildStyleStack); } @@ -3656,11 +3653,9 @@ nsresult CNavDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool aC //Ah, at last, the final case. If you're here, then we just popped a //style tag that got onto that tag stack from a stylestack somewhere. //Pop it from the stylestack if the target is also a style tag. - //Make sure to remove the matching style. In the following example - // make sure that - // does not remove off the style stack. - bug 94208 - if (theTargetTagIsStyle && theTag == aTarget) { - mBodyContext->RemoveStyle(theTag); + if(theTargetTagIsStyle) { + nsCParserNode* node=mBodyContext->PopStyle(theTag); + IF_FREE(node, &mNodeAllocator); } } }