Bug 986799 - Handle rtl mtable padding properly. r=fredw

This commit is contained in:
James Kitchener 2014-03-24 08:58:29 -04:00
parent 30b0508f12
commit 3e0faecbe5
4 changed files with 65 additions and 5 deletions

View File

@ -172,10 +172,10 @@ mtr:last-child > mtd {
padding-bottom: 0ex; padding-bottom: 0ex;
} }
mtd:first-child { mtd:first-child {
padding-left: 0em; -moz-padding-start: 0em;
} }
mtd:last-child { mtd:last-child {
padding-right: 0em; -moz-padding-end: 0em;
} }
/* re-instate the spacing if the table has a surrounding frame */ /* re-instate the spacing if the table has a surrounding frame */
mtable[frame="solid"] > mtr:first-child > mtd, mtable[frame="solid"] > mtr:first-child > mtd,
@ -188,11 +188,11 @@ mtable[frame="dashed"] > mtr:last-child > mtd {
} }
mtable[frame="solid"] > mtr > mtd:first-child, mtable[frame="solid"] > mtr > mtd:first-child,
mtable[frame="dashed"] > mtr > mtd:first-child { mtable[frame="dashed"] > mtr > mtd:first-child {
padding-left: 0.4em; /* framespacing.left */ -moz-padding-start: 0.4em; /* framespacing.left (or right in rtl)*/
} }
mtable[frame="solid"] > mtr > mtd:last-child, mtable[frame="solid"] > mtr > mtd:last-child,
mtable[frame="dashed"] > mtr > mtd:last-child { mtable[frame="dashed"] > mtr > mtd:last-child {
padding-right: 0.4em; /* framespacing.right */ -moz-padding-end: 0.4em; /* framespacing.right (or left in rtl)*/
} }
/**************************************************************************/ /**************************************************************************/

View File

@ -33,5 +33,35 @@
</math> </math>
</p> </p>
<p>
mtable:
<math>
<mtable frame="solid">
<mtr>
<mtd>
<mtext>c</mtext>
</mtd>
<mtd>
<mtext>b</mtext>
</mtd>
<mtd>
<mtext>a</mtext>
</mtd>
</mtr>
<mtr>
<mtd>
<mtext>f</mtext>
</mtd>
<mtd>
<mtext>e</mtext>
</mtd>
<mtd>
<mtext>d</mtext>
</mtd>
</mtr>
</mtable>
</math>
</p>
</body> </body>
</html> </html>

View File

@ -33,5 +33,35 @@
</math> </math>
</p> </p>
<p>
mtable:
<math dir="rtl">
<mtable frame="solid">
<mtr>
<mtd>
<mtext>a</mtext>
</mtd>
<mtd>
<mtext>b</mtext>
</mtd>
<mtd>
<mtext>c</mtext>
</mtd>
</mtr>
<mtr>
<mtd>
<mtext>d</mtext>
</mtd>
<mtd>
<mtext>e</mtext>
</mtd>
<mtd>
<mtext>f</mtext>
</mtd>
</mtr>
</mtable>
</math>
</p>
</body> </body>
</html> </html>

View File

@ -3,7 +3,7 @@
== dir-3.html dir-3-ref.html == dir-3.html dir-3-ref.html
== dir-4.html dir-4-ref.html == dir-4.html dir-4-ref.html
== dir-5.html dir-5-ref.html == dir-5.html dir-5-ref.html
fails == dir-6.html dir-6-ref.html == dir-6.html dir-6-ref.html
== dir-7.html dir-7-ref.html == dir-7.html dir-7-ref.html
fails == dir-8.html dir-8-ref.html fails == dir-8.html dir-8-ref.html
fails == dir-9.html dir-9-ref.html # Bug 787215 fails == dir-9.html dir-9-ref.html # Bug 787215