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);
}
}
}