mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
bug 244569: Open transient styles before dealing with end tags for residual style tags, so that we don't miss a temporarily closed style. r+sr=jst
This commit is contained in:
parent
513c311556
commit
65e8bdcc71
@ -1662,6 +1662,15 @@ CNavDTD::HandleEndToken(CToken* aToken)
|
||||
} else {
|
||||
eHTMLTags theParentTag = mBodyContext->Last();
|
||||
|
||||
// First open transient styles, so that we see any autoclosed style
|
||||
// tags.
|
||||
if (nsHTMLElement::IsResidualStyleTag(theChildTag)) {
|
||||
result = OpenTransientStyles(theChildTag);
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (kNotFound ==
|
||||
nsHTMLElement::GetIndexOfChildOrSynonym(*mBodyContext,
|
||||
theChildTag)) {
|
||||
@ -1688,8 +1697,9 @@ CNavDTD::HandleEndToken(CToken* aToken)
|
||||
if (gHTMLElements[theChildTag].HasSpecialProperty(kHandleStrayTag) &&
|
||||
mDTDMode != eDTDMode_full_standards &&
|
||||
mDTDMode != eDTDMode_almost_standards) {
|
||||
// Oh boy!! we found a "stray" tag. Nav4.x and IE introduce line break in
|
||||
// such cases. So, let's simulate that effect for compatibility.
|
||||
// Oh boy!! we found a "stray" tag. Nav4.x and IE introduce line
|
||||
// break in such cases. So, let's simulate that effect for
|
||||
// compatibility.
|
||||
// Ex. <html><body>Hello</P>There</body></html>
|
||||
PRBool theParentContains = -1;
|
||||
if (!CanOmit(theParentTag, theChildTag, theParentContains)) {
|
||||
@ -1723,12 +1733,6 @@ CNavDTD::HandleEndToken(CToken* aToken)
|
||||
FindAutoCloseTargetForEndTag(theChildTag, *mBodyContext,
|
||||
mDTDMode);
|
||||
if (eHTMLTag_unknown != theTarget) {
|
||||
if (nsHTMLElement::IsResidualStyleTag(theChildTag)) {
|
||||
result = OpenTransientStyles(theChildTag);
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
result = CloseContainersTo(theTarget, PR_FALSE);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user