[webkit-dev] Proposal: Remove ENABLE(MATHML)

Maciej Stachowiak mjs at apple.com
Tue Oct 24 09:50:29 PDT 2017



> On Oct 24, 2017, at 12:14 AM, Frédéric WANG <fred.wang at free.fr> wrote:
> 
> On 23/10/2017 18:11, Maciej Stachowiak wrote:
>> 
>> Is there any way we can convert MathML to a runtime switch? It seems
>> like the main consideration is rendering quality given available
>> fonts, rather than code size.
>> 
>> Regards,
>> Maciej
>> 
> @Maciej:
> 
> As I explained, I don't think disabling a HTML5 feature to determine
> which kind of fallback content will be delivered to the user is a good
> idea. Authors can provide Web fonts and for very elementary math (e.g.
> using only simple fractions) you even do not need math fonts at all.

I don't have a strong opinion on whether we should support disabling MathML. My point is just that if we support disabling it, it should be a runtime switch, not compile-time.

Good reasons to have a compile-time switch would be:
- Some ports want the code size savings
- It requires back-end code that is not available on all ports

But neither of those is true.

On the other hand, we might still want a runtime switch if some ports would like to disable the feature for reason of compatibility based on available fonts. I think it's up to port owners to say whether they want to disable the feature for this reason.


> 
> Anyway, replying to your question the Tor project also added run-time
> preferences for MathML and SVG in Gecko last year:
> 
> https://hg.mozilla.org/mozilla-central/rev/0d48c28cc547
> https://hg.mozilla.org/mozilla-central/rev/7b09464eb767
> 
> IIRC, they basically move the MathML/SVG elements in "unknown"
> namespaces so that the MathML/SVG content and layout classes are not
> used to process them. I believe we could do the same for WebKit. Note
> that their justification is security (users intentionally disable HTML5
> features to "reduce attack surface area") so it's a different use case
> and that one does not make sense to me.

To be clear, I'm not necessarily suggesting a flag exposed to end users. That would be weird.

> 
> In any cases, I do not think adding an runtime option for MathML/SVG is
> a prerequisite to remove the build-time option, as the latter was more
> about reducing binary size/dependencies for web engines developers while
> the former was about providing more control to users.
> 
> -- 
> Frédéric Wang - frederic-wang.fr
> 
> 



More information about the webkit-dev mailing list