Closed Bug 832713 Opened 12 years ago Closed 12 years ago

mathbackground attribute is not rendered correctly for dynamically created <mi> elements

Categories

(Core :: MathML, defect)

18 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: patrboch, Unassigned)

References

Details

Attachments

(1 file)

Attached file mi mathbackground testcase.html (deleted) —
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 Build ID: 20130116073211 Steps to reproduce: 1. Create dynamically <mi> element 2. Assign mathbackground attribute 3. Append <mi> to <math> Actual results: background color does not render Expected results: background color should be rendered as per the mathbackground attribute
Attachment #704292 - Attachment mime type: text/plain → text/html
I replicated the same behaviour for mathcolor attribute and for <mo> and <mn> elements.
Blocks: 744783
OK, for this bug and bug 755541, the problem disappears if one creates MathML elements with document.createElementNS("http://www.w3.org/1998/Math/MathML", ...) Is it a bug that we can't use document.createElement(...)? I guess now that HTML5 allows to use MathML without specifying the namespace in the source, people are likely to expect it works that way when the elements are created via Javascript... How is this situation handled with SVG?
(In reply to Frédéric Wang (:fredw) from comment #2) > Is it a bug that we can't use > > document.createElement(...)? Spec-wise, no. > I guess now that HTML5 allows to use MathML without specifying the namespace > in the source, people are likely to expect it works that way when the > elements are created via Javascript... Likely to expect maybe, but the expectation is wrong. :-/ > How is this situation handled with > SVG? You need to use createElementNS(). After all, there are HTML and SVG elements with colliding local names. (MathML does not collide with HTML, but I think we shouldn’t introduce DWIM for MathML if the pattern won’t work for SVG.)
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Thanks for the info. I'll resolve bug 755541 too.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: