Last Comment Bug 416549 - MathML does not render properly with text-align:justify
: MathML does not render properly with text-align:justify
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: mozilla1.9beta5
Assigned To: Frédéric Wang (:fredw)
:
Mentors:
http://mathematiie.iiens.net/geometri...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-09 08:00 PST by Frédéric Wang (:fredw)
Modified: 2008-09-08 06:19 PDT (History)
6 users (show)
roc: blocking1.9-
roc: wanted1.9+
jruderman: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Show the bug is due to "text-indent" (35.09 KB, application/xml)
2008-02-25 01:10 PST, Frédéric Wang (:fredw)
no flags Details
Patch that add text-indent:0 (1.04 KB, patch)
2008-02-25 13:17 PST, Frédéric Wang (:fredw)
karlt: review+
roc: superreview+
dsicore: approval1.9+
Details | Diff | Splinter Review
Check properties margin, padding, border and text-align do not cause the bug (7.21 KB, application/xml)
2008-02-26 05:12 PST, Frédéric Wang (:fredw)
no flags Details
Bug with text-align:right (7.15 KB, application/xml)
2008-02-26 05:13 PST, Frédéric Wang (:fredw)
no flags Details
Show that the bug is still there for matrix (1.03 KB, application/xml)
2008-09-07 02:27 PDT, Frédéric Wang (:fredw)
no flags Details
Show that the bug is still there for matrix (3.10 KB, application/xml)
2008-09-07 02:29 PDT, Frédéric Wang (:fredw)
no flags Details

Description Frédéric Wang (:fredw) 2008-02-09 08:00:33 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.11) Gecko/20071128 Iceweasel/2.0.0.11 (Debian-2.0.0.11-1)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.11) Gecko/20071128 Iceweasel/2.0.0.11 (Debian-2.0.0.11-1)

If MathML is inside a XHTML element with the property text-align:justify, then the property is also applied to the MathML elements that are consequently displayed strangely. I do not know what the specifications say, but I do not think such a behaviour is expected.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Frédéric Wang (:fredw) 2008-02-09 08:05:35 PST
This is of course for the CVS version of Firefox, as it works well with Firefox 2.
Comment 2 Frédéric Wang (:fredw) 2008-02-23 11:41:52 PST
Actually, It seems it isn't related to the "justify" property. Firefox simply does not compute well the spaces inside a formula.
Comment 3 Karl Tomlinson (:karlt) 2008-02-24 18:04:00 PST
We shouldn't have all the extra space between elements.  We'd didn't with FF2.
Comment 4 Frédéric Wang (:fredw) 2008-02-25 01:09:09 PST
I've just looked again to the bug, finally it is due to the CSS property:

p {text-indent: 2em}

I'll add an attachment to show this.
Comment 5 Frédéric Wang (:fredw) 2008-02-25 01:10:12 PST
Created attachment 305466 [details]
Show the bug is due to "text-indent"
Comment 6 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-02-25 12:48:14 PST
Should be fixable by setting text-indent:0 on the mathml anonymous block in mathml.css.
Comment 7 Frédéric Wang (:fredw) 2008-02-25 13:17:30 PST
Created attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

The suggestion above works for me. Here is a patch.
Comment 8 Karl Tomlinson (:karlt) 2008-02-25 13:47:28 PST
Comment on attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

Thanks.

We should just add a space after the colon for consistency with the other properties.
Comment 9 Robert O'Callahan (:roc) (email my personal email if necessary) 2008-02-25 14:23:01 PST
Comment on attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

You might want to consider setting some extra stuff here. Maybe text-align, for example. But this patch is good for now.
Comment 10 Karl Tomlinson (:karlt) 2008-02-25 15:19:54 PST
Comment on attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

not much risk in this style change.
Comment 11 Frédéric Wang (:fredw) 2008-02-26 05:12:46 PST
Created attachment 305742 [details]
Check properties margin, padding, border and text-align do not cause the bug

	I made some test with margin, padding, border and text-align. None of these properties produce spaces (see margin_padding_border_text-align.xml) so I suppose only text-indent have to be set to zero in mathml.css
Comment 12 Frédéric Wang (:fredw) 2008-02-26 05:13:29 PST
Created attachment 305743 [details]
Bug with text-align:right

	But I found another bug with text-align (see text-align_right.xml). The third equality have its right side out of the screen whereas it is not the case for the two first. I suppose it is because of the mtable, whose width is considered as zero.
Comment 13 Damon Sicore (:damons) 2008-02-26 14:30:32 PST
Comment on attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

a1.9+=damons
Comment 14 Karl Tomlinson (:karlt) 2008-02-26 14:39:04 PST
(In reply to comment #12)
> I suppose it is because of the mtable, whose width is considered as zero.

Yes, I think so.  Let's check that when bug 363240 is fixed.

Comment 15 Karl Tomlinson (:karlt) 2008-02-26 14:43:28 PST
Frédéric, do you have a cvs account?
(If not, I can check this fix in.)
Comment 16 Frédéric Wang (:fredw) 2008-02-27 02:55:37 PST
(In reply to comment #15)
> Frédéric, do you have a cvs account?
> (If not, I can check this fix in.)
> 

No I don't. I would appreciate if you can check in for me.
Comment 18 Jesse Ruderman 2008-03-06 17:52:02 PST
karlt backed out the patch to fix an orange.
Comment 20 Frédéric Wang (:fredw) 2008-09-07 02:27:44 PDT
Created attachment 337272 [details]
Show that the bug is still there for matrix
Comment 21 Frédéric Wang (:fredw) 2008-09-07 02:29:19 PDT
Created attachment 337274 [details]
Show that the bug is still there for matrix
Comment 22 Jesse Ruderman 2008-09-07 10:35:14 PDT
Frédéric, please file a new bug report for that.  Reopening old FIXED bugs just causes confusion.  You can mention the new bug number here.
Comment 23 Frédéric Wang (:fredw) 2008-09-08 06:19:50 PDT
Here is the new bug number:

https://bugzilla.mozilla.org/show_bug.cgi?id=454085

Also, I submit a patch.

Note You need to log in before you can comment on or make changes to this bug.