fixed PDT+ bugs 30929 and 29749; r=harishd, pollman; a=jar

This commit is contained in:
rickg%netscape.com 2000-03-08 06:18:18 +00:00
parent e2639fea30
commit 97c63bcd77
6 changed files with 12 additions and 14 deletions

View File

@ -3110,7 +3110,8 @@ nsresult CNavDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool aC
}
}
else if(1==theNode->mUseCount) {
theNode->mUseCount--; //cause it to get popped from style stack.
//this fixes bug 30885 and 29626
mBodyContext->PopStyle(theTag);
}
mBodyContext->PushStyles(theChildStyleStack);
}

View File

@ -597,8 +597,8 @@ nsIParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
nsEntryStack *theStack=mStack.mEntries[theLevel].mStyles;
if(theStack) {
if(aTag==theStack->Last()) {
return theStack->Pop();
mResidualStyleCount--;
return theStack->Pop();
} else {
// NS_ERROR("bad residual style entry");
}
@ -624,8 +624,8 @@ nsIParserNode* nsDTDContext::RemoveStyle(eHTMLTags aTag){
nsEntryStack *theStack=mStack.mEntries[theLevel].mStyles;
if(theStack) {
if(aTag==theStack->Last()) {
return theStack->Pop();
mResidualStyleCount--;
return theStack->Pop();
} else {
// NS_ERROR("bad residual style entry");
}

View File

@ -1611,7 +1611,6 @@ static PRUint16 PA_HackTable[] = {
*/
PRInt32 CEntityToken::TranslateToUnicodeStr(nsString& aString) {
PRInt32 value=0;
PRInt32 theRadix[2]={16,10};
if(mTextValue.Length()>1) {
PRUnichar theChar0=mTextValue.CharAt(0);
@ -1619,9 +1618,8 @@ PRInt32 CEntityToken::TranslateToUnicodeStr(nsString& aString) {
if(kHashsign==theChar0) {
PRInt32 err=0;
PRUnichar theChar1=mTextValue.CharAt(1);
PRBool isDigit1=nsString::IsDigit(theChar1);
value=mTextValue.ToInteger(&err,theRadix[isDigit1]);
value=mTextValue.ToInteger(&err,kAutoDetect);
if(0==err) {
#ifdef PA_REMAP_128_TO_160_ILLEGAL_NCR
/* for some illegal, but popular usage */

View File

@ -3110,7 +3110,8 @@ nsresult CNavDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool aC
}
}
else if(1==theNode->mUseCount) {
theNode->mUseCount--; //cause it to get popped from style stack.
//this fixes bug 30885 and 29626
mBodyContext->PopStyle(theTag);
}
mBodyContext->PushStyles(theChildStyleStack);
}

View File

@ -597,8 +597,8 @@ nsIParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
nsEntryStack *theStack=mStack.mEntries[theLevel].mStyles;
if(theStack) {
if(aTag==theStack->Last()) {
return theStack->Pop();
mResidualStyleCount--;
return theStack->Pop();
} else {
// NS_ERROR("bad residual style entry");
}
@ -624,8 +624,8 @@ nsIParserNode* nsDTDContext::RemoveStyle(eHTMLTags aTag){
nsEntryStack *theStack=mStack.mEntries[theLevel].mStyles;
if(theStack) {
if(aTag==theStack->Last()) {
return theStack->Pop();
mResidualStyleCount--;
return theStack->Pop();
} else {
// NS_ERROR("bad residual style entry");
}

View File

@ -1611,7 +1611,6 @@ static PRUint16 PA_HackTable[] = {
*/
PRInt32 CEntityToken::TranslateToUnicodeStr(nsString& aString) {
PRInt32 value=0;
PRInt32 theRadix[2]={16,10};
if(mTextValue.Length()>1) {
PRUnichar theChar0=mTextValue.CharAt(0);
@ -1619,9 +1618,8 @@ PRInt32 CEntityToken::TranslateToUnicodeStr(nsString& aString) {
if(kHashsign==theChar0) {
PRInt32 err=0;
PRUnichar theChar1=mTextValue.CharAt(1);
PRBool isDigit1=nsString::IsDigit(theChar1);
value=mTextValue.ToInteger(&err,theRadix[isDigit1]);
value=mTextValue.ToInteger(&err,kAutoDetect);
if(0==err) {
#ifdef PA_REMAP_128_TO_160_ILLEGAL_NCR
/* for some illegal, but popular usage */