Closed Bug 247151 Opened 20 years ago Closed 19 years ago

incorrect width of non breaking space   inside MathML

Categories

(Core :: MathML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: stephan.semirat, Assigned: rbs)

References

Details

(Keywords: fixed1.8)

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

when you enter nbsp entities in the left side of a mtext element,
it pushes the text to right instead of inserting the space.
For instance, if i write
<math xmlns="&mathml;">
<mi>a</mi>
<mtext>&nbsp;&nbsp;&nbsp;&nbsp;c
</mtext>
<mi>b</mi>
</math>
then the c letter renders on the right side of the b letter : it renders
abc instead of acb.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.



Expected Results:  
it should renders as acb
It seems to depend on your font since I don't reproduce it when I copy-paste
your fragment at: http://www.mozilla.org/projects/mathml/demo/tester.html
(In reply to comment #1)
> It seems to depend on your font since I don't reproduce it when I copy-paste
> your fragment at: http://www.mozilla.org/projects/mathml/demo/tester.html

I also copy-paste my fragment at this location, and still renders abc instead of
acb. Under Firefox 1.0.2. winXP.

But indeed, if i had, for instance :
<style type="text/css">
math {font-family: times;}
</style>
to my file, then it renders correctly.
Blocks: 306543
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Summary: non breaking space &nbsp; inside mtext element pushes the text instead of inserting space → incorrect width of non breaking space &nbsp; inside MathML
Attached patch patchSplinter Review
Attachment #194645 - Flags: superreview?(roc)
Attachment #194645 - Flags: review?(roc)
Attachment #194645 - Flags: superreview?(roc)
Attachment #194645 - Flags: superreview+
Attachment #194645 - Flags: review?(roc)
Attachment #194645 - Flags: review+
Checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment on attachment 194645 [details] [diff] [review]
patch

This goes with bug 306543.
Attachment #194645 - Flags: approval1.8b5?
rbs, is this a regression? what's the risk to non-mathml pages?
It is not a specific regression. It could just happen with some upredictable
fonts, making things too fragile. With the patch, we can deal more robustly with
the widely used 'nbsp' character and some other MathML characters.

The added code is only reached for MathML. So it has no effect/risk on non-MathML.
Attachment #194645 - Flags: approval1.8b5? → approval1.8b5+
Checked in the 1.8 branch.
Keywords: fixed1.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: