Closed Bug 416549 Opened 16 years ago Closed 16 years ago

MathML does not render properly with text-align:justify

Categories

(Core :: MathML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta5

People

(Reporter: fredw, Assigned: fredw)

References

()

Details

(Keywords: regression)

Attachments

(5 files, 1 obsolete file)

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.
Component: General → MathML
Product: Firefox → Core
QA Contact: general → mathml
This is of course for the CVS version of Firefox, as it works well with Firefox 2.
Version: unspecified → Trunk
Actually, It seems it isn't related to the "justify" property. Firefox simply does not compute well the spaces inside a formula.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
We shouldn't have all the extra space between elements.  We'd didn't with FF2.
Status: RESOLVED → UNCONFIRMED
Flags: blocking1.9?
Keywords: regression
Resolution: INVALID → ---
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.
Should be fixable by setting text-indent:0 on the mathml anonymous block in mathml.css.
The suggestion above works for me. Here is a patch.
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.
Attachment #305579 - Flags: superreview?(roc)
Attachment #305579 - Flags: review+
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.
Attachment #305579 - Flags: superreview?(roc) → superreview+
Flags: wanted1.9+
Flags: blocking1.9?
Flags: blocking1.9-
Comment on attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

not much risk in this style change.
Attachment #305579 - Flags: approval1.9?
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
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.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 305579 [details] [diff] [review]
Patch that add text-indent:0

a1.9+=damons
Attachment #305579 - Flags: approval1.9? → approval1.9+
(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.

Frédéric, do you have a cvs account?
(If not, I can check this fix in.)
(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.
Assignee: nobody → fwsmail35
Checked in:

http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1204840685&maxdate=1204840793&who=karlt%2B%25karlt.net
Status: NEW → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
karlt backed out the patch to fix an orange.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Checked in again and no orange.

http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1204861562&maxdate=1204861642&who=karlt%2B%25karlt.net
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: MathML does not render properly with text-align:justify → MathML does not render properly with text-align:indent
Attachment #337272 - Attachment is obsolete: true
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.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Summary: MathML does not render properly with text-align:indent → MathML does not render properly with text-align:justify
Here is the new bug number:

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

Also, I submit a patch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: