зеркало из 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_noembed:
|
||||
case eHTMLTag_noscript:
|
||||
mHasOpenNoXXX--;
|
||||
//and allow to fall through...
|
||||
|
||||
|
@ -2318,6 +2317,14 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) const {
|
|||
}
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
||||
|
@ -3181,6 +3188,7 @@ nsresult CNavDTD::CloseNoscript(const nsIParserNode *aNode) {
|
|||
START_TIMER();
|
||||
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
NS_ASSERTION((mHasOpenNoXXX > -1), "mHasOpenNoXXX underflow");
|
||||
if(mHasOpenNoXXX > 0) {
|
||||
mHasOpenNoXXX--;
|
||||
}
|
||||
|
|
|
@ -1079,6 +1079,7 @@ nsIParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
|
|||
if(aTag==theStack->Last()) {
|
||||
result=theStack->Pop();
|
||||
mResidualStyleCount--;
|
||||
break; // Fix bug 50710 - Stop after finding a style.
|
||||
} else {
|
||||
// NS_ERROR("bad residual style entry");
|
||||
}
|
||||
|
|
|
@ -1781,7 +1781,6 @@ nsresult CNavDTD::HandleEndToken(CToken* aToken) {
|
|||
|
||||
case eHTMLTag_noframes:
|
||||
case eHTMLTag_noembed:
|
||||
case eHTMLTag_noscript:
|
||||
mHasOpenNoXXX--;
|
||||
//and allow to fall through...
|
||||
|
||||
|
@ -2318,6 +2317,14 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) const {
|
|||
}
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
||||
|
@ -3181,6 +3188,7 @@ nsresult CNavDTD::CloseNoscript(const nsIParserNode *aNode) {
|
|||
START_TIMER();
|
||||
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
NS_ASSERTION((mHasOpenNoXXX > -1), "mHasOpenNoXXX underflow");
|
||||
if(mHasOpenNoXXX > 0) {
|
||||
mHasOpenNoXXX--;
|
||||
}
|
||||
|
|
|
@ -1079,6 +1079,7 @@ nsIParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
|
|||
if(aTag==theStack->Last()) {
|
||||
result=theStack->Pop();
|
||||
mResidualStyleCount--;
|
||||
break; // Fix bug 50710 - Stop after finding a style.
|
||||
} else {
|
||||
// NS_ERROR("bad residual style entry");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче