зеркало из https://github.com/mozilla/pjs.git
42429 - Preserve newline/whitespace inside TABLE,TR,TBODY,THEAD,TFOOT
50710 - Stop after popping a style stack otherwise it might cause a MLK r=rickg
This commit is contained in:
Родитель
9d0e97540d
Коммит
11d713bf60
|
@ -1781,7 +1781,6 @@ nsresult CNavDTD::HandleEndToken(CToken* aToken) {
|
||||||
|
|
||||||
case eHTMLTag_noframes:
|
case eHTMLTag_noframes:
|
||||||
case eHTMLTag_noembed:
|
case eHTMLTag_noembed:
|
||||||
case eHTMLTag_noscript:
|
|
||||||
mHasOpenNoXXX--;
|
mHasOpenNoXXX--;
|
||||||
//and allow to fall through...
|
//and allow to fall through...
|
||||||
|
|
||||||
|
@ -2318,6 +2317,14 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if(!result) {
|
||||||
|
// Bug 42429 - Preserve whitespace inside TABLE,TR,TBODY,TFOOT,etc.,
|
||||||
|
if(gHTMLElements[aParent].HasSpecialProperty(kBadContentWatch)) {
|
||||||
|
if(nsHTMLElement::IsWhitespaceTag((eHTMLTags)aChild)) {
|
||||||
|
result=PR_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3181,6 +3188,7 @@ nsresult CNavDTD::CloseNoscript(const nsIParserNode *aNode) {
|
||||||
START_TIMER();
|
START_TIMER();
|
||||||
|
|
||||||
if(NS_SUCCEEDED(result)) {
|
if(NS_SUCCEEDED(result)) {
|
||||||
|
NS_ASSERTION((mHasOpenNoXXX > -1), "mHasOpenNoXXX underflow");
|
||||||
if(mHasOpenNoXXX > 0) {
|
if(mHasOpenNoXXX > 0) {
|
||||||
mHasOpenNoXXX--;
|
mHasOpenNoXXX--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1079,6 +1079,7 @@ nsIParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
|
||||||
if(aTag==theStack->Last()) {
|
if(aTag==theStack->Last()) {
|
||||||
result=theStack->Pop();
|
result=theStack->Pop();
|
||||||
mResidualStyleCount--;
|
mResidualStyleCount--;
|
||||||
|
break; // Fix bug 50710 - Stop after finding a style.
|
||||||
} else {
|
} else {
|
||||||
// NS_ERROR("bad residual style entry");
|
// NS_ERROR("bad residual style entry");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1781,7 +1781,6 @@ nsresult CNavDTD::HandleEndToken(CToken* aToken) {
|
||||||
|
|
||||||
case eHTMLTag_noframes:
|
case eHTMLTag_noframes:
|
||||||
case eHTMLTag_noembed:
|
case eHTMLTag_noembed:
|
||||||
case eHTMLTag_noscript:
|
|
||||||
mHasOpenNoXXX--;
|
mHasOpenNoXXX--;
|
||||||
//and allow to fall through...
|
//and allow to fall through...
|
||||||
|
|
||||||
|
@ -2318,6 +2317,14 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if(!result) {
|
||||||
|
// Bug 42429 - Preserve whitespace inside TABLE,TR,TBODY,TFOOT,etc.,
|
||||||
|
if(gHTMLElements[aParent].HasSpecialProperty(kBadContentWatch)) {
|
||||||
|
if(nsHTMLElement::IsWhitespaceTag((eHTMLTags)aChild)) {
|
||||||
|
result=PR_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3181,6 +3188,7 @@ nsresult CNavDTD::CloseNoscript(const nsIParserNode *aNode) {
|
||||||
START_TIMER();
|
START_TIMER();
|
||||||
|
|
||||||
if(NS_SUCCEEDED(result)) {
|
if(NS_SUCCEEDED(result)) {
|
||||||
|
NS_ASSERTION((mHasOpenNoXXX > -1), "mHasOpenNoXXX underflow");
|
||||||
if(mHasOpenNoXXX > 0) {
|
if(mHasOpenNoXXX > 0) {
|
||||||
mHasOpenNoXXX--;
|
mHasOpenNoXXX--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1079,6 +1079,7 @@ nsIParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
|
||||||
if(aTag==theStack->Last()) {
|
if(aTag==theStack->Last()) {
|
||||||
result=theStack->Pop();
|
result=theStack->Pop();
|
||||||
mResidualStyleCount--;
|
mResidualStyleCount--;
|
||||||
|
break; // Fix bug 50710 - Stop after finding a style.
|
||||||
} else {
|
} else {
|
||||||
// NS_ERROR("bad residual style entry");
|
// NS_ERROR("bad residual style entry");
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче