mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 601436 - mtable 'align' attribute: negative rownumbers are wrongly interpreted. r=roc
This commit is contained in:
parent
56a42da678
commit
a3ea06bbc7
@ -540,9 +540,10 @@ nsMathMLmtableOuterFrame::GetRowFrameAt(nsPresContext* aPresContext,
|
||||
// Negative indices mean to find upwards from the end.
|
||||
if (aRowIndex < 0) {
|
||||
aRowIndex = rowCount + aRowIndex;
|
||||
} else {
|
||||
// aRowIndex is 1-based, so convert it to a 0-based index
|
||||
--aRowIndex;
|
||||
}
|
||||
// aRowIndex is 1-based, so convert it to a 0-based index
|
||||
--aRowIndex;
|
||||
|
||||
// if our inner table says that the index is valid, find the row now
|
||||
if (0 <= aRowIndex && aRowIndex <= rowCount) {
|
||||
|
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>mtable align attribute: negative rownumber</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
|
||||
<mtable align="axis 3"><mtr><mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> <mtd><mi>c</mi></mtd></mtr> <mtr><mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd></mtr> <mtr><mtd><mi>g</mi></mtd> <mtd><mi>h</mi></mtd> <mtd><mi>i</mi></mtd></mtr></mtable><mo>=</mo>
|
||||
<mtable align="axis 1"><mtr><mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> <mtd><mi>c</mi></mtd></mtr> <mtr><mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd></mtr> <mtr><mtd><mi>g</mi></mtd> <mtd><mi>h</mi></mtd> <mtd><mi>i</mi></mtd></mtr></mtable></mrow></math>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
15
layout/reftests/mathml/mtable-align-negative-rownumber.html
Normal file
15
layout/reftests/mathml/mtable-align-negative-rownumber.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>mtable align attribute: negative rownumber</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
|
||||
<mtable align="axis -1"><mtr><mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> <mtd><mi>c</mi></mtd></mtr> <mtr><mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd></mtr> <mtr><mtd><mi>g</mi></mtd> <mtd><mi>h</mi></mtd> <mtd><mi>i</mi></mtd></mtr></mtable><mo>=</mo>
|
||||
<mtable align="axis 1"><mtr><mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> <mtd><mi>c</mi></mtd></mtr> <mtr><mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd></mtr> <mtr><mtd><mi>g</mi></mtd> <mtd><mi>h</mi></mtd> <mtd><mi>i</mi></mtd></mtr></mtable></mrow></math>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -26,6 +26,7 @@ fails-if(winWidget) == mfenced-10.html mfenced-10-ref.html
|
||||
== table-width-1.xhtml table-width-1-ref.xhtml
|
||||
== underbar-width-1.xhtml underbar-width-1-ref.xhtml
|
||||
== mathml-type-supported.xhtml mathml-type-supported-ref.xml
|
||||
== mtable-align-negative-rownumber.html mtable-align-negative-rownumber-ref.html
|
||||
!= embellished-op-1-1.html embellished-op-1-1-ref.html
|
||||
!= embellished-op-1-2.html embellished-op-1-2-ref.html
|
||||
!= embellished-op-1-3.html embellished-op-1-3-ref.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user