WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
151592
Find a replacement for -webkit-line-box-contain in mathml.css
https://bugs.webkit.org/show_bug.cgi?id=151592
Summary
Find a replacement for -webkit-line-box-contain in mathml.css
Frédéric Wang (:fredw)
Reported
2015-11-24 13:27:05 PST
In
http://trac.webkit.org/changeset/124512
, David Barton added the following CSS properties to avoid excessive line spacing in MathML expressions: math { -webkit-line-box-contain: glyphs replaced; line-height: 0; } mtext { line-height: 1.0; } (the "line-height: 0;" has been removed since then, but the one for mtext preserved) I suspect this is no longer necessary with OpenType math fonts setting the USE_TYPO_METRICS flag now that it is supported by WebKit (
bug 131839
). However, it's probably good to reset some CSS spacing properties, for example an issue was reported in Wikipedia for Gecko, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1187673
. So I'd suggest to replace the above rules with just: math { line-height: normal; word-spacing: normal; letter-spacing: normal; } Related to that is the list of math fonts in the font-family rule. Apple engineer will still have to upgrade the pre-installed STIX fonts to version 2.0 when it is released before we can update the default font-family. As a comparison, the latest Gecko release use the following list of math fonts: "Latin Modern Math, XITS Math, Cambria Math, TeX Gyre Bonum Math, TeX Gyre Pagella Math, TeX Gyre Schola, TeX Gyre Termes Math, STIX Math, Asana Math, STIXGeneral, DejaVu Serif, DejaVu Sans, serif"
Attachments
Add attachment
proposed patch, testcase, etc.
Frédéric Wang (:fredw)
Comment 1
2015-11-24 13:32:27 PST
(I forgot to mention that the -webkit-line-box-contain property was removed from Blink, so it's probably good to avoid relying on it anyway:
https://code.google.com/p/chromium/issues/detail?id=522215
)
Frédéric Wang (:fredw)
Comment 2
2016-02-05 00:59:49 PST
@Alex: I've done the proposed adjustment on your MathML branch, except that I kept "-webkit-line-box-contain: glyphs replaced;". Indeed, removing that one causes excessive ascent/descent and breaks tests. Upgrading the math test font to a version that has the USE_TYPO_METRICS flag gives a better result (see
https://github.com/mrobinson/webkitgtk-test-fonts/issues/6
) ; but using logical metrics still gives slightly taller ascent/descent than ink metrics [1]. So I suspect we will have to keep it for now and consider that again when the MathML layout code can really distinguish between logical/ink metrics. We will probably have to do something similar to Gecko (which does not support -webkit-line-box-contain) if we want to port the MathML code to Blink. [1]
http://www.mathml-association.org/MathMLinHTML5/S3.html#SS1.SSS1
Frédéric Wang (:fredw)
Comment 3
2016-03-14 06:06:11 PDT
I moved the safe changes into
bug 155433
and
bug 155018
. Let's keep this bug for the -webkit-line-box-contain rule only.
Ahmad Saleem
Comment 4
2023-11-24 18:17:23 PST
Still applicable:
https://searchfox.org/wubkat/rev/aa809c03fded1f6f0c99d562ee397ee2f472fee9/Source/WebCore/css/mathml.css#67
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug