Fix bug 370692. r+sr=rbs

git-svn-id: svn://10.0.0.236/trunk@220558 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2007-02-19 20:46:31 +00:00
parent 55c4ba3bbe
commit 1807c5a422
4 changed files with 47 additions and 14 deletions

View File

@ -812,13 +812,17 @@ PRInt32
nsMathMLmtdFrame::GetRowSpan()
{
PRInt32 rowspan = 1;
nsAutoString value;
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::rowspan, value);
if (!value.IsEmpty()) {
PRInt32 error;
rowspan = value.ToInteger(&error);
if (error || rowspan < 0)
rowspan = 1;
// Don't look at the content's rowspan if we're not an mtd.
if (mContent->Tag() == nsGkAtoms::mtd_) {
nsAutoString value;
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::rowspan, value);
if (!value.IsEmpty()) {
PRInt32 error;
rowspan = value.ToInteger(&error);
if (error || rowspan < 0)
rowspan = 1;
}
}
return rowspan;
}
@ -827,13 +831,17 @@ PRInt32
nsMathMLmtdFrame::GetColSpan()
{
PRInt32 colspan = 1;
nsAutoString value;
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::columnspan_, value);
if (!value.IsEmpty()) {
PRInt32 error;
colspan = value.ToInteger(&error);
if (error || colspan < 0)
colspan = 1;
// Don't look at the content's rowspan if we're not an mtd.
if (mContent->Tag() == nsGkAtoms::mtd_) {
nsAutoString value;
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::columnspan_, value);
if (!value.IsEmpty()) {
PRInt32 error;
colspan = value.ToInteger(&error);
if (error || colspan < 0)
colspan = 1;
}
}
return colspan;
}

View File

@ -0,0 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table>
<mathml:mtr xmlns:mathml="http://www.w3.org/1998/Math/MathML">
<mathml:mo>+</mathml:mo>
<td>bar</td>
</mathml:mtr>
<tr><td>baz</td></tr>
</table>
</body>
</html>

View File

@ -0,0 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table>
<mathml:mtr rowspan="2" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
<mathml:mo>+</mathml:mo>
<td>bar</td>
</mathml:mtr>
<tr><td>baz</td></tr>
</table>
</body>
</html>

View File

@ -160,6 +160,7 @@ fails == bugs/368020-4.html bugs/368020-4-ref.html # bug 368085
== bugs/370586-1.xhtml bugs/370586-1-ref.xhtml
== bugs/370629-1.html bugs/370629-1-ref.html
== bugs/370629-2.html bugs/370629-2-ref.html
== bugs/370692-1.xhtml bugs/370692-1-ref.xhtml
# object/
== object/no-attrs.html object/no-attrs-ref.html