[Webkit-unassigned] [Bug 118053] Parsing of MathML length

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 18 06:41:28 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=118053





--- Comment #20 from Frédéric Wang <fred.wang at free.fr>  2013-07-18 06:41:24 PST ---
(In reply to comment #19)
> 
> I am unfamiliar with the MathML codebase, but this code is really weird.
> 
> The parsing is non-standard (for something that looks a lot like our CSS parsing). But the weirdest thing is having parsing done by a _render object_!
> Why is this made like that?

I'm not sure what you mean by non-standard, this is how it is defined in the MathML3 spec and how it is implemented in Gecko and MathJax. A special parsing function is needed anyway for MathML particularities: the interpretation of % as a multiple of the default value, the unitless notation and namedspace values.

I wanted to reuse the existing code for the things that are in common, but the MathML code in WebKit used float and it was not clear to me how to handle that. After bug 118601, the length are now LayoutUnits so I guess that would be possible to directly specify the unit rather than doing some computations.

I don't think that having the parsing functions on the renderer object is fundamental, they can be moved to e.g. WebCore/mathml/ I guess. However, some of the MathML attributes are not mapped to CSS properties so I think the parsing functions must be called by the renderer objects anyway.

As a comparison, Gecko uses specific parsing function for MathML, store them on the content/ side, call them from the layout/ side (or from the content/ side for those mapped to CSS properties) and returns the result as a C++ object representing CSS units.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list