mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
fixed PDT+ bugs 30929 and 29749; r=harishd, pollman; a=jar
This commit is contained in:
parent
e2639fea30
commit
97c63bcd77
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user