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

2017-11-02 Thread Myles C. Maxfield
I’d like to clarify my previous email.

Everyone wants to see high quality math rendering on the Web. MathML is a web 
standard, has two implementations (WebKit and Gecko), and is one of the most 
requested features in Chromium 

 and Edge 
.
 Chromium is even in talks to add support. Clearly, MathML is part of the Web 
Platform.

I was not proposing that we pull MathML support from WebKit. Native support for 
MathML, rather than polyfilled support, leads to better experiences for our 
users for many reasons, among them performance and accessibility. Bugs (or even 
“quite a few bugs”) is not sufficient evidence to pull a feature like this.

Instead, I was pointing out that MathML doesn’t seem to be getting the love it 
deserves. I hope we can improve our support for MathML to make our 
implementation the best it can possibly be.

Thanks,
Myles

> On Oct 27, 2017, at 2:15 PM, Myles C. Maxfield  wrote:
> 
> Is there any development being done on MathML? There are quite a few places 
> where our implementation is fairly broken. This, coupled with the fact that 
> most places which use MathML on the Web fallback to MathJax (which doesn’t 
> need MathML) makes me question whether we want to continue supporting MathML 
> in the first place.
> 
>> On Oct 25, 2017, at 11:37 AM, Michael Catanzaro  
>> wrote:
>> 
>> On Wed, Oct 25, 2017 at 12:05 PM, Maciej Stachowiak  wrote:
>>> Why don't we wait to hear from port owners whether they would actually want 
>>> to disable MathML for reason of compatibiltiy. Knowing answers to the above 
>>> questions would help.
>> 
>> For GTK and WPE, I think it's fine to have MathML enabled unconditionally.
>> 
>> Michael
>> 
>> ___
>> webkit-dev mailing list
>> webkit-dev@lists.webkit.org
>> https://lists.webkit.org/mailman/listinfo/webkit-dev
> 
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-27 Thread Myles C. Maxfield
Is there any development being done on MathML? There are quite a few places 
where our implementation is fairly broken. This, coupled with the fact that 
most places which use MathML on the Web fallback to MathJax (which doesn’t need 
MathML) makes me question whether we want to continue supporting MathML in the 
first place.

> On Oct 25, 2017, at 11:37 AM, Michael Catanzaro  wrote:
> 
> On Wed, Oct 25, 2017 at 12:05 PM, Maciej Stachowiak  wrote:
>> Why don't we wait to hear from port owners whether they would actually want 
>> to disable MathML for reason of compatibiltiy. Knowing answers to the above 
>> questions would help.
> 
> For GTK and WPE, I think it's fine to have MathML enabled unconditionally.
> 
> Michael
> 
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-25 Thread Michael Catanzaro
On Wed, Oct 25, 2017 at 12:05 PM, Maciej Stachowiak  
wrote:
Why don't we wait to hear from port owners whether they would 
actually want to disable MathML for reason of compatibiltiy. Knowing 
answers to the above questions would help.


For GTK and WPE, I think it's fine to have MathML enabled 
unconditionally.


Michael

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-25 Thread Frédéric WANG
On 25/10/2017 19:05, Maciej Stachowiak wrote:
>
> (1) Is it at all common to use MathML with a math font specified as a web 
> font? Can you give an example?
I can't say whether it is "common" but I guess the trick is well known
by MathML users, since unfortunately many systems do not provide math
fonts by default. I have a github repo with known fonts at
https://github.com/fred-wang/MathFonts

As an example Jacques Distler uses STIX 2 WOFF on his blog:

https://golem.ph.utexas.edu/~distler/blog/archives/002702.html
https://golem.ph.utexas.edu/~distler/blog/styles-site.css

Some people also bundle WOFF fonts in web apps or ebooks. Web fonts are
also used by browser addons e.g.
https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/ which allow
to workaround the lack of system fonts (and the impossibility to install
them for users).

Website using MathML often have a page with installation instructions
for math fonts, for example on NIST dlmf:
http://dlmf.nist.gov/help/mathml#S3

Note that I've seen similar things (WOFF fonts, addons, instructions)
for other languages in the past e.g.
https://addons.mozilla.org/en-US/firefox/addon/khmer-fonts-package/, so
again it's not specific to math.

> (2) Is it at all common to use MathML only to the extent that it's rendered 
> fine without a math font?
Again, I'm not sure how common it is but I've seen some users happy with
basic MathML rendering for elementary calculations. I was also surprised
to see some people excited about my CSS stylesheet at
https://github.com/fred-wang/mathml.css that can render very basic math.
There are a lot of such formulas on Wikipedia, for sure for instance
https://en.wikipedia.org/wiki/Fraction_(mathematics) contains MathML
formulas that can be rendered without specialized math fonts.
> (3) In the cases above, is there usually an image fallback?
It really depends on the website. But definitely people using MathML
need some fallback (image, CSS layout, javascript layout, text etc).

How this fallback is triggered depends on the website, there is not any
real rule. IIUC, the argument mentioned earlier only considers the case
where an author would try to detect MathML support and automatically
fallback to an image otherwise. As I said, authors could also try to
detect availability of math fonts, or provide WOFF fallback (Distler's
blog), or have a page to explain how to install fonts (e.g. NIST dlmf),
or use image by default and explain how to enable MathML & install fonts
(e.g. Wikipedia), or provide LaTeX fallback in an  (my blog)
or...

IMHO, platform owners should not speculate on what authors will do.
Disabling MathML just because of the lack of math fonts, does not seem a
good idea. On the one hand, if MathML is enabled page authors can still
decide to serve fallback content if they think the support is not good
enough on the user platform. On the other hand, if the platform owner
has disabled MathML, then there is no way for users/authors willing to
use MathML to force it to be enabled again...
> Why don't we wait to hear from port owners whether they would actually want 
> to disable MathML for reason of compatibiltiy. Knowing answers to the above 
> questions would help.
Sure. My email was to follow-up on
https://bugs.webkit.org/show_bug.cgi?id=177744 and the discussions at
the Web Engines Hackfest, so they are not forgotten. But there is no
hurry to remove the build flag for now.

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-25 Thread Maciej Stachowiak


> On Oct 25, 2017, at 1:44 AM, Frédéric WANG  wrote:
> 
> On 24/10/2017 18:50, Maciej Stachowiak wrote:
>> 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.
> Hi,
> 
> I believe it is up to the platform owners to decide whether they want to
> provide math fonts by default ; depending on whether they want to
> privilege disk space or a better user experience.
> 
> However, I still don't see the connection between available fonts and
> enabling MathML support. As I said, some pages with MathML provide the
> necessary WOFF math fonts while others just use basic math (fractions
> etc) where the default text fonts are enough. So the owners would be
> intentionally breaking these pages, just because they don't provide math
> fonts on their platforms ? That sounds weird, to me.

(1) Is it at all common to use MathML with a math font specified as a web font? 
Can you give an example?

(2) Is it at all common to use MathML only to the extent that it's rendered 
fine without a math font?

(3) In the cases above, is there usually an image fallback?

Why don't we wait to hear from port owners whether they would actually want to 
disable MathML for reason of compatibiltiy. Knowing answers to the above 
questions would help.


> 
> Also I think a runtime flag makes sense for the use case of the Tor
> project, but it is a separate use case IMHO and it should not be
> blocking the removal of the compile-time flag.
> 
> So to summarize, I'm happy to submit a patch to remove ENABLE(MATHML) if
> the only reasons were the two points you mention (which as you said are
> not true here). However, if some port owners provide a concrete
> explanation of why they want to keep the option of disabling MathML then
> I don't think I'll have time to check the runtime option right now, so
> I'll just keep the status quo and it will be up to these people to
> submit a patch or to keep fixing the build failures for --no-mathml ;-)
> 
> -- 
> Frédéric Wang - frederic-wang.fr
> 
> 

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-25 Thread Frédéric WANG
On 24/10/2017 18:50, Maciej Stachowiak wrote:
> 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.
Hi,

I believe it is up to the platform owners to decide whether they want to
provide math fonts by default ; depending on whether they want to
privilege disk space or a better user experience.

However, I still don't see the connection between available fonts and
enabling MathML support. As I said, some pages with MathML provide the
necessary WOFF math fonts while others just use basic math (fractions
etc) where the default text fonts are enough. So the owners would be
intentionally breaking these pages, just because they don't provide math
fonts on their platforms ? That sounds weird, to me.

Also I think a runtime flag makes sense for the use case of the Tor
project, but it is a separate use case IMHO and it should not be
blocking the removal of the compile-time flag.

So to summarize, I'm happy to submit a patch to remove ENABLE(MATHML) if
the only reasons were the two points you mention (which as you said are
not true here). However, if some port owners provide a concrete
explanation of why they want to keep the option of disabling MathML then
I don't think I'll have time to check the runtime option right now, so
I'll just keep the status quo and it will be up to these people to
submit a patch or to keep fixing the build failures for --no-mathml ;-)

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Ryosuke Niwa
On Tue, Oct 24, 2017 at 2:35 AM, Olivier Blin 
wrote:

> Le 24/10/2017 à 09:19, Frédéric WANG a écrit :
>
>> On 23/10/2017 18:25, Adrian Perez de Castro wrote:
>> > From your description it sounds that what takes more disk space in
>> MathML are
>> > the needed math fonts, and that the amount of code added to WebKit when
>> built
>> > is in the order of hundreds of kilobytes, at most (BTW, do you have
>> figures of
>> > MathML enabld vs. disabled to confirm?). That being the case, it seems
>> fine to
>> > me that MathML support is always enabled.
>> >
>> > Usually my main concern with removing compilation guards is forcing
>> additional
>> > usage of megabytes of disk and/or memory in embedded platforms (which
>> is, for
>> > example, the case for ENABLE_VIDEO: for the GTK+ and WPE ports it
>> completely
>> > avoids the GStreamer dependency, which saves tens of megabytes!). But
>> keeping
>> > the guards to save just a few hundreds of kilobytes is certainly not
>> worth it,
>> > and in this case embedders can choose to not ship the math fonts.
>> >
>> > TL;DR: Fine by me, as it seems the compile flag only saves a few
>> kilobytes in
>> > the built binaries, and the math fonts can't be skipped anyway by
>> embedders.
>>
>> Thanks Adrián. No, I wanted to do it during the Web Engines Hackfest but
>> did not have time to try. Also, Olivier mentioned he would check the
>> difference and tell whether it is significant or not for his project,
>> but I have not heard back from him yet.
>>
>
> Hi,
>
> The difference is about 250 kB on libWPEWebKit.so.0 for a WPE build on my
> ARMv7 target:
>
> - without MathML : 37474160
> - with MathML: 37726056
>
> This can still be significant on low-end devices, with 128 MB of flash
> storage.


That's only 0.6%. I'm pretty certain there are better things to work on if
your focus was to reduce the binary size.
e.g. you could de-inline a bunch of functions in the binding code and
significantly reduce the binary size with a slight perf overhead.

- R. Niwa
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Maciej Stachowiak


> On Oct 24, 2017, at 12:14 AM, Frédéric WANG  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
> 
> 

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Frédéric WANG
On 24/10/2017 11:35, Olivier Blin wrote:
> Hi,
>
> The difference is about 250 kB on libWPEWebKit.so.0 for a WPE build on
> my ARMv7 target:
>
> - without MathML : 37474160
> - with MathML: 37726056
>
> This can still be significant on low-end devices, with 128 MB of flash
> storage.
>
Thank you Olivier. That indeed seems to match Adrián's guess of "a few
hundreds of kilobytes".

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Olivier Blin

Le 24/10/2017 à 09:19, Frédéric WANG a écrit :

On 23/10/2017 18:25, Adrian Perez de Castro wrote:
> From your description it sounds that what takes more disk space in MathML are
> the needed math fonts, and that the amount of code added to WebKit when built
> is in the order of hundreds of kilobytes, at most (BTW, do you have figures of
> MathML enabld vs. disabled to confirm?). That being the case, it seems fine to
> me that MathML support is always enabled.
>
> Usually my main concern with removing compilation guards is forcing additional
> usage of megabytes of disk and/or memory in embedded platforms (which is, for
> example, the case for ENABLE_VIDEO: for the GTK+ and WPE ports it completely
> avoids the GStreamer dependency, which saves tens of megabytes!). But keeping
> the guards to save just a few hundreds of kilobytes is certainly not worth it,
> and in this case embedders can choose to not ship the math fonts.
>
> TL;DR: Fine by me, as it seems the compile flag only saves a few kilobytes in
> the built binaries, and the math fonts can't be skipped anyway by embedders.

Thanks Adrián. No, I wanted to do it during the Web Engines Hackfest but
did not have time to try. Also, Olivier mentioned he would check the
difference and tell whether it is significant or not for his project,
but I have not heard back from him yet.


Hi,

The difference is about 250 kB on libWPEWebKit.so.0 for a WPE build on 
my ARMv7 target:


- without MathML : 37474160
- with MathML: 37726056

This can still be significant on low-end devices, with 128 MB of flash 
storage.


--
Olivier Blin - SoftAtHome

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Frédéric WANG
On 24/10/2017 09:14, Frédéric WANG wrote:
> so it's a different use case and that one does not make sense to me.
*does make sense*

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Frédéric WANG
On 23/10/2017 18:25, Adrian Perez de Castro wrote:
> From your description it sounds that what takes more disk space in MathML are
> the needed math fonts, and that the amount of code added to WebKit when built
> is in the order of hundreds of kilobytes, at most (BTW, do you have figures of
> MathML enabld vs. disabled to confirm?). That being the case, it seems fine to
> me that MathML support is always enabled.
>
> Usually my main concern with removing compilation guards is forcing additional
> usage of megabytes of disk and/or memory in embedded platforms (which is, for
> example, the case for ENABLE_VIDEO: for the GTK+ and WPE ports it completely
> avoids the GStreamer dependency, which saves tens of megabytes!). But keeping
> the guards to save just a few hundreds of kilobytes is certainly not worth it,
> and in this case embedders can choose to not ship the math fonts.
>
> TL;DR: Fine by me, as it seems the compile flag only saves a few kilobytes in
> the built binaries, and the math fonts can't be skipped anyway by embedders.
>
> Best regards,
>
>
> --
>  Adrián 🎩

Thanks Adrián. No, I wanted to do it during the Web Engines Hackfest but
did not have time to try. Also, Olivier mentioned he would check the
difference and tell whether it is significant or not for his project,
but I have not heard back from him yet.

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Frédéric WANG
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.

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.

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




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-24 Thread Frédéric WANG
@Konstantin I think you are a bit deviating from the main question but
FWIW: a) MathML also remains readable without math fonts as long as you
don't use complex content (same is true for normal text as long as you
do not use the rarest unicode characters) b) None of the feature
detection technique is perfect (mspace only tests a very basic MathML
feature, one can also make a test for available math fonts if present,
what if javascript is disabled? etc) and adding a build-time flag to
disable a HTML5 feature seems a very fragile way to guarantee the
content delivered to users.

SVG and MathML are features that share a common history (designed as
elements in a different namespaces, separate spec embedded in HTML5,
initially implemented under a build-time flags in Gecko and WebKit...)
so my point was really just that from the implementer point of view it
makes sense to handle them consistently, nothing more.

It seems you did not reply to the question about whether you have a
concrete use case of an embedded device where degrading HTML5 support to
help feature detection is important. I suspect for such device like
set-top box kind where math rendering is not essential, it does not
really matter whether MathML is enabled or not or whether fonts or
installed or not. But in any case, I still don't see why a build-time
flag would help and, as Maciej mentioned; it could better be a runtime
flag instead.

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-23 Thread Konstantin Tokarev


23.10.2017, 19:11, "Frédéric WANG" :
> On 23/10/2017 18:04, Konstantin Tokarev wrote:
>>  There is a big difference between SVG and MathML: the first one is entirely 
>> self-
>>  contained, while (AFAIU) MathML requires presence of math fonts on the 
>> target
>>  system for correct rendering (i.e. native MathML will look much worse than 
>> image
>>  fallback that is usually available).
>>
>>  Imagine embedded system (e.g. of set-top box kind) which has no math fonts 
>> on
>>  the board. Will always-on MathML be progression or regression there?
>
> SVG also requires fonts for the  tag.

Yes, but only general-purpose fonts, not math-specific.
Also, if text is rendered with a different font face (because system lacks 
requested font)
it's remains readable.

> And Web fonts exist to work around the lack of system fonts.

Yes, but what if web developer is not careful enough and assumes that if mathml 
is present,
then math font is available?

> As a Web Platform developer, I believe browser sniffing is bad practice, so I 
> hope people
> use other techniques to provide alternate content.

What do you mean under "browser sniffing"? UA string sniffing is a shame, 
certainly.
But feature testing (e.g. by checking size of ) is a valid appoach.

-- 
Regards,
Konstantin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-23 Thread Adrian Perez de Castro
Hi Fred,

On Mon, 23 Oct 2017 17:42:29 +0200, Frédéric WANG  wrote:
 
> There have been some discussions recently on
> https://bugs.webkit.org/show_bug.cgi?id=177744 regarding the relevance
> of the compile-time flag for MathML. Discussing with Olivier during the
> Web Engines Hackfest, it seems he only had disabled MathML in his
> project because he thought it would reduce binary size. However, he was
> not really sure this actually had a significant impact. AFAIK, the only
> dependencies needed for MathML are the font libraries but they are
> already used for text layout. The implementation is only a few
> element/rendering files plus some changes here and there.

From your description it sounds that what takes more disk space in MathML are
the needed math fonts, and that the amount of code added to WebKit when built
is in the order of hundreds of kilobytes, at most (BTW, do you have figures of
MathML enabld vs. disabled to confirm?). That being the case, it seems fine to
me that MathML support is always enabled.

Usually my main concern with removing compilation guards is forcing additional
usage of megabytes of disk and/or memory in embedded platforms (which is, for
example, the case for ENABLE_VIDEO: for the GTK+ and WPE ports it completely
avoids the GStreamer dependency, which saves tens of megabytes!). But keeping
the guards to save just a few hundreds of kilobytes is certainly not worth it,
and in this case embedders can choose to not ship the math fonts.

TL;DR: Fine by me, as it seems the compile flag only saves a few kilobytes in
the built binaries, and the math fonts can't be skipped anyway by embedders.

Best regards,


--
 Adrián 🎩



pgp7R6bRrzRM0.pgp
Description: PGP signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-23 Thread Maciej Stachowiak


> On Oct 23, 2017, at 9:04 AM, Konstantin Tokarev  wrote:
> 
> 
> 
> 23.10.2017, 18:43, "Frédéric WANG"  >:
>> Hi,
>> 
>> There have been some discussions recently on
>> https://bugs.webkit.org/show_bug.cgi?id=177744 regarding the relevance
>> of the compile-time flag for MathML. Discussing with Olivier during the
>> Web Engines Hackfest, it seems he only had disabled MathML in his
>> project because he thought it would reduce binary size. However, he was
>> not really sure this actually had a significant impact. AFAIK, the only
>> dependencies needed for MathML are the font libraries but they are
>> already used for text layout. The implementation is only a few
>> element/rendering files plus some changes here and there.
>> 
>> I'm wondering if other people use the --no-mathml build option and
>> believe they really need it? If not, I'm propose to remove this
>> compile-time flag.
>> 
>> As a comparison, the flag for SVG was removed in
>> https://bugs.webkit.org/show_bug.cgi?id=127991 ; Mozilla also removed
>> compile time option for MathML and SVG a long time ago (
>> https://hg.mozilla.org/mozilla-central/rev/b8664f450508 for the former).
> 
> There is a big difference between SVG and MathML: the first one is entirely 
> self-
> contained, while (AFAIU) MathML requires presence of math fonts on the target
> system for correct rendering (i.e. native MathML will look much worse than 
> image
> fallback that is usually available).
> 
> Imagine embedded system (e.g. of set-top box kind) which has no math fonts on
> the board. Will always-on MathML be progression or regression there?

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

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-23 Thread Frédéric WANG
On 23/10/2017 18:04, Konstantin Tokarev wrote:
> There is a big difference between SVG and MathML: the first one is entirely 
> self-
> contained, while (AFAIU) MathML requires presence of math fonts on the target
> system for correct rendering (i.e. native MathML will look much worse than 
> image
> fallback that is usually available).
>
> Imagine embedded system (e.g. of set-top box kind) which has no math fonts on
> the board. Will always-on MathML be progression or regression there?
SVG also requires fonts for the  tag. And Web fonts exist to work
around the lack of system fonts. As a Web Platform developer, I believe
browser sniffing is bad practice, so I hope people use other techniques
to provide alternate content. Do you have any concrete use case in mind?

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-23 Thread Konstantin Tokarev


23.10.2017, 18:43, "Frédéric WANG" :
> Hi,
>
> There have been some discussions recently on
> https://bugs.webkit.org/show_bug.cgi?id=177744 regarding the relevance
> of the compile-time flag for MathML. Discussing with Olivier during the
> Web Engines Hackfest, it seems he only had disabled MathML in his
> project because he thought it would reduce binary size. However, he was
> not really sure this actually had a significant impact. AFAIK, the only
> dependencies needed for MathML are the font libraries but they are
> already used for text layout. The implementation is only a few
> element/rendering files plus some changes here and there.
>
> I'm wondering if other people use the --no-mathml build option and
> believe they really need it? If not, I'm propose to remove this
> compile-time flag.
>
> As a comparison, the flag for SVG was removed in
> https://bugs.webkit.org/show_bug.cgi?id=127991 ; Mozilla also removed
> compile time option for MathML and SVG a long time ago (
> https://hg.mozilla.org/mozilla-central/rev/b8664f450508 for the former).

There is a big difference between SVG and MathML: the first one is entirely 
self-
contained, while (AFAIU) MathML requires presence of math fonts on the target
system for correct rendering (i.e. native MathML will look much worse than image
fallback that is usually available).

Imagine embedded system (e.g. of set-top box kind) which has no math fonts on
the board. Will always-on MathML be progression or regression there?

>
> --
> Frédéric Wang - frederic-wang.fr
>
> ,
>
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

-- 
Regards,
Konstantin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


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

2017-10-23 Thread Frédéric WANG
Hi,

There have been some discussions recently on
https://bugs.webkit.org/show_bug.cgi?id=177744 regarding the relevance
of the compile-time flag for MathML. Discussing with Olivier during the
Web Engines Hackfest, it seems he only had disabled MathML in his
project because he thought it would reduce binary size. However, he was
not really sure this actually had a significant impact. AFAIK, the only
dependencies needed for MathML are the font libraries but they are
already used for text layout. The implementation is only a few
element/rendering files plus some changes here and there.

I'm wondering if other people use the --no-mathml build option and
believe they really need it? If not, I'm propose to remove this
compile-time flag.

As a comparison, the flag for SVG was removed in
https://bugs.webkit.org/show_bug.cgi?id=127991 ; Mozilla also removed
compile time option for MathML and SVG a long time ago (
https://hg.mozilla.org/mozilla-central/rev/b8664f450508 for the former).

-- 
Frédéric Wang - frederic-wang.fr




signature.asc
Description: OpenPGP digital signature
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev