# MathML: rendering of mtable with a columnalign attribute is sometimes incorrect

RESOLVED FIXED in mozilla29

Core
MathML
P4
normal
RESOLVED FIXED
8 years ago
3 years ago

## Tracking

### (Blocks: 1 bug)

Trunk
mozilla29
Points:
---
Dependency tree / graph

## Attachments

### (4 attachments)

 21.49 KB, image/png Details 22.24 KB, image/png Details 22.61 KB, image/png Details 9.92 KB, application/xhtml+xml Details
(Reporter)

### Description

8 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1b5pre) Gecko/20090504 Shiretoko/3.5b5pre
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.1b5pre) Gecko/20090504 Shiretoko/3.5b5pre

Sometime when the "Differentiable Manifold" is displayed at
http://eyeasme.com/Joe/MathML/browser_test_bug.html
the column align attribute the the mtable is not honored, instead
of left aligning the default right alignment is done.
(See attached picture 1).
Note that when the cursor is moved into the column that it
reformats itself and properly left alignes.

Reproducible: Sometimes

Steps to Reproduce:
1. go to http://eyeasme.com/Joe/MathML/browser_test_bug.html
2. look at "Differentiable Manifold" example
3. sometimes the column alignment is not left (as wanted) but center
Actual Results:
Sometimes (see attached Picture 1) the generated MathML formula is not
properly column aligning to the left (as wanted) but is centering.
NOTE: when cursor is moved into the generated MathML column, that the
formula then re-aligns itself and becomes left column aligned.

Expected Results:
The mtable attribute of columnalign should be honored.

Sorry for the large example, but the bug I want to show does NOT show
itself for small examples (i.e isolating the "Differentiable Manifold" example row).  There is some kind of interaction among the examples that triggers the bug.  The strange thing is that moving the mouse to hover over the MathML column of the example fixes it.  This is bad since the page should be static.
I have attached an image of the example displayed incorrectly and then displayed
correctly.  The incorrectly displayed image should never occur.
(Reporter)

### Comment 1

8 years ago
Created attachment 375710 [details]
bad alignment in the third column example

Note bad alignment in the third column example
(Reporter)

### Comment 2

8 years ago
Created attachment 375711 [details]
Correct alignment

Correct alignment, this occured after moving mouse into the third column.

### Updated

8 years ago
Component: General → MathML
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: general → mathml
Hardware: PowerPC → All
Version: unspecified → Trunk

### Updated

8 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

8 years ago
Keywords: polish

8 years ago
Keywords: polish
(Reporter)

### Comment 3

8 years ago
When filling out bug 504324, I noticed that the CSS property "text-decoration" did not completely show until I clicked in the table cell.
(i.e the MathML equation changed its look (to what it should be) when the table cell it was in, was clicked.  It appears that all the CSS code is not being applied when a page is displayed.

8 years ago
Blocks: 525772
(Reporter)

### Comment 4

7 years ago
The example given in comment #0 is no longer is applicable .

The problem is that the columnalign attribute of mtable is not working
in Firefox.  The work around is to use CSS to set 'text-align' to the
columnalign value desired.

### Comment 5

7 years ago
(In reply to comment #4)
> The example given in comment #0 is no longer is applicable .
>
> The problem is that the columnalign attribute of mtable is not working
> in Firefox.  The work around is to use CSS to set 'text-align' to the
> columnalign value desired.

I'm not sure to understand. The columnalign attribute seems to be implemented (looking to the source code) and works for me. I try to produce a reduced testcase but can not see the bug. Can you give a testcase that shows the incorrect behaviour?
No longer blocks: 525772
(Reporter)

### Comment 6

7 years ago
Created attachment 424098 [details]
Image of the bug

Notice the bug in the third column.
Should be column aligned left.
(Reporter)

### Comment 7

7 years ago
I have updated example (look at third column of "Differentiable Manifold").
(click on the column to see the code (or just look at code with show Source)

The problem does not show for a small test page like so

https://eyeasme.com/Joe/MathML/browser_test_bug2.html

But does show for a bigger test page like so

https://eyeasme.com/Joe/MathML/browser_test_bug.html

I have included an image of the bug in progress.
The bug goes away (I.E. the formula moves to proper configuration)
when the mouse enters the formula (same row and column).

### Comment 8

7 years ago
Created attachment 427195 [details]
Testcase

While writing some MathML, I've just met the bug again (this time, the bug disappears when you zoom). Note that the link to a css seems necessary for the bug to happen (but you can use an empty css stylesheet).

### Updated

7 years ago
Summary: MathML does not honor columnalign attribute of mtable element → MathML: rendering of mtable with a columnalign attribute is sometimes incorrect

### Comment 9

6 years ago
It seems zooming in and out can solve this problem. Still annoying, though.

### Comment 10

6 years ago
MathJax users have reported issues which looks related to this bug:

I think fixing bug 69409 (or at least to map columnalign to style) is likely to solve this bug.

6 years ago
Blocks: 687809

### Updated

6 years ago
Keywords: dev-doc-needed

### Updated

5 years ago
Depends on: 731667
(Reporter)

### Comment 11

5 years ago
My example code has bit-rotted and should be ignored.

My work around for the bug is to set the CSS style "text-align" in the mtd tag as well as set the "columnalign" in the table.
EX:
<mtable columnalign="left">
<mtr>
<mtd style="text-align: left"> <!--hack for this bug is here -->

### Comment 12

5 years ago
(In reply to Frédéric Wang from comment #8)
> Created attachment 427195 [details]
> Testcase
>
> While writing some MathML, I've just met the bug again (this time, the bug
> disappears when you zoom). Note that the link to a css seems necessary for
> the bug to happen (but you can use an empty css stylesheet).

This testcase does not seem to work any more.

### Comment 13

5 years ago
(In reply to Frédéric Wang from comment #12)
> This testcase does not seem to work any more.

Actually, the testcase does not seem to exhibit the bug with a nightly build but it does with a release version.

Here is another page that demonstrates the issue (see alignments in theorem 9.2 or lemma 9.4):
http://www.maths-informatique-jeux.com/international/hsp/web/appendix_B.php#id8.2.

### Comment 14

5 years ago
For a more reliable testcase, see attachment 633989 [details] (MathML trees created dynamically by MathJax).

### Comment 15

5 years ago
Mass change: setting priority to 2 for bugs that would be nice fix if Gecko's MathML support is enabled by default in MathJax but that are not in my opinion strictly required or for which a workaround could be written in the MathJax code.
Priority: -- → P2

### Updated

5 years ago
Priority: P2 → P4

### Updated

4 years ago
Duplicate of this bug: 939558

### Comment 17

4 years ago
Fixed by bug 731667.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29

### Comment 18

3 years ago
@eric: do you remember why you set the "dev-doc-needed" flag?

I think the columnalign attribute is already claimed to be supported:

https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute

It's just that it was (incorrectly) ignored in some random cases.
Flags: needinfo?(eshepherd)

### Comment 19

3 years ago
(In reply to Frédéric Wang (:fredw) from comment #18)
> @eric: do you remember why you set the "dev-doc-needed" flag?
>
> I think the columnalign attribute is already claimed to be supported:
>
> https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
>
> It's just that it was (incorrectly) ignored in some random cases.

Yeah, this doesn't need docs. Not sure why I flagged it. Probably misread it during a pass through a list of new bugs once.
Flags: needinfo?(eshepherd)
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.