Skip to content
Permalink
Browse files
Do not rely on Latin Modern Math to test fraction/radical bars
https://bugs.webkit.org/show_bug.cgi?id=183446

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-12
Reviewed by Manuel Rego Casasnovas.

mathml/opentype/fraction-line.html was added in bug 155639 to test OpenType MATH parameters
for fraction but relies on the presence of the Latin Modern Math font, which is not available
on several platforms. Since these features are now already covered by the Web Platform
tests in Layout/imported/mathml-in-html5/mathml/presentation-markup/fractions/ we just remove
the test. Similarly, mathml/presentation/fractions-linethickness.html relies on Latin Modern
Math to ensure correct linethickness and we rewrite that test to use the web font
fraction-rulethickness10000.woff instead. We perform similar rewriting for
radical-bar-visibility.html, using a WOFF font with a specified radical line thickness.
Finally, we update the test expectations accordingly on iOS, macOS and Windows platform.

* mathml/opentype/fraction-line.html: Removed. Already tested by other tests.
* mathml/opentype/fraction-line-expected.html: Ditto.
* mathml/presentation/fractions-linethickness.html: Use fraction-rulethickness10000.woff
* mathml/presentation/fractions-linethickness-expected.html: Ditto.
* mathml/presentation/radical-bar-visibility.html: Use radical-degreebottomraisepercent25-rulethickness1000.woff
* platform/ios/TestExpectations: Update expectations.
* platform/mac/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

Canonical link: https://commits.webkit.org/199227@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
fred-wang committed Mar 12, 2018
1 parent 081b876 commit 9dc53d57c2a22703a9e51a06010fe5dd6bcab3a8
@@ -1,3 +1,29 @@
2018-03-12 Frederic Wang <fwang@igalia.com>

Do not rely on Latin Modern Math to test fraction/radical bars
https://bugs.webkit.org/show_bug.cgi?id=183446

Reviewed by Manuel Rego Casasnovas.

mathml/opentype/fraction-line.html was added in bug 155639 to test OpenType MATH parameters
for fraction but relies on the presence of the Latin Modern Math font, which is not available
on several platforms. Since these features are now already covered by the Web Platform
tests in Layout/imported/mathml-in-html5/mathml/presentation-markup/fractions/ we just remove
the test. Similarly, mathml/presentation/fractions-linethickness.html relies on Latin Modern
Math to ensure correct linethickness and we rewrite that test to use the web font
fraction-rulethickness10000.woff instead. We perform similar rewriting for
radical-bar-visibility.html, using a WOFF font with a specified radical line thickness.
Finally, we update the test expectations accordingly on iOS, macOS and Windows platform.

* mathml/opentype/fraction-line.html: Removed. Already tested by other tests.
* mathml/opentype/fraction-line-expected.html: Ditto.
* mathml/presentation/fractions-linethickness.html: Use fraction-rulethickness10000.woff
* mathml/presentation/fractions-linethickness-expected.html: Ditto.
* mathml/presentation/radical-bar-visibility.html: Use radical-degreebottomraisepercent25-rulethickness1000.woff
* platform/ios/TestExpectations: Update expectations.
* platform/mac/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

2018-03-12 Javier Fernandez <jfernandez@igalia.com>

Remove GridLayout runtime flag

This file was deleted.

This file was deleted.

@@ -4,12 +4,17 @@
<title>fractions linethickness</title>
<meta charset="utf-8"/>
<style type="text/css">
/* For Latin Modern Math
FractionRuleThickness = 40 * 25 / 1000 = 1px;
*/
@font-face {
font-family: TestFont;
src: url("../../imported/w3c/web-platform-tests/fonts/math/fraction-rulethickness10000.woff");
}
math {
font-family: "Latin Modern Math";
font-size: 25px;
/* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
font-family: "TestFont";
font-size: 1px;
}
mn {
font-size: 20px;
}
</style>
</head>
@@ -26,10 +31,10 @@
-->

<math>
<mfrac linethickness="0.5px"><mn>1</mn><mn>2</mn></mfrac>
<mfrac linethickness="1px"><mn>1</mn><mn>2</mn></mfrac>
<mfrac linethickness="2px"><mn>1</mn><mn>2</mn></mfrac>
<mfrac linethickness="5px"><mn>1</mn><mn>2</mn></mfrac>
<mfrac linethickness="10px"><mn>1</mn><mn>2</mn></mfrac>
<mfrac linethickness="20px"><mn>1</mn><mn>2</mn></mfrac>
<mfrac linethickness="50px"><mn>1</mn><mn>2</mn></mfrac>
</math>

</body>
@@ -4,12 +4,17 @@
<title>fractions linethickness</title>
<meta charset="utf-8"/>
<style type="text/css">
/* This test requires the Latin Modern Math font, which satisfies:
FractionRuleThickness = 40 * 25 / 1000 = 1px;
*/
@font-face {
font-family: TestFont;
src: url("../../imported/w3c/web-platform-tests/fonts/math/fraction-rulethickness10000.woff");
}
math {
font-family: "Latin Modern Math";
font-size: 25px;
/* FractionRuleThickness = 10000 * 1 / 1000 = 10px; */
font-family: "TestFont";
font-size: 1px;
}
mn {
font-size: 20px;
}
</style>
</head>
@@ -4,13 +4,17 @@
<title>Radical bar visibility</title>
<meta charset="utf-8"/>
<style>
@font-face {
font-family: TestFont;
src: url("../../imported/w3c/web-platform-tests/fonts/math/radical-degreebottomraisepercent25-rulethickness1000.woff");
}
math, msqrt {
/* Latin Modern Math has
RadicalRuleThickess = 40
/* TestFont has
RadicalRuleThickess = 1000
em = 1000
So the actual rule thickness is 24 * 40 / 1000 = 0.96 < 1 pixel */
font-family: Latin Modern Math;
font-size: 24px;
So the actual rule thickness is .9 * 1000 / 1000 = 0.9 < 1 pixel */
font-family: TestFont;
font-size: .9px;
}
</style>
</head>
@@ -1376,8 +1376,6 @@ webkit.org/b/160161 mathml/opentype/horizontal.html [ Skip ]
webkit.org/b/160161 mathml/opentype/horizontal-munderover.html [ Skip ]

# These tests require the Latin Modern Math font.
webkit.org/b/160161 mathml/opentype/fraction-line.html [ Skip ]
webkit.org/b/160161 mathml/presentation/fractions-linethickness.html [ Skip ]
webkit.org/b/160161 mathml/opentype/large-operators-italic-correction.html [ Skip ]
webkit.org/b/160161 mathml/presentation/bug159513.html [ Skip ]

@@ -679,8 +679,6 @@ webkit.org/b/160161 mathml/opentype/horizontal.html [ Skip ]
webkit.org/b/160161 mathml/opentype/horizontal-munderover.html [ Skip ]

# These tests require the Latin Modern Math font.
webkit.org/b/160161 mathml/opentype/fraction-line.html [ Skip ]
webkit.org/b/160161 mathml/presentation/fractions-linethickness.html [ Skip ]
webkit.org/b/160161 mathml/opentype/large-operators-italic-correction.html [ Skip ]
webkit.org/b/160161 mathml/presentation/bug159513.html [ Skip ]

@@ -1959,9 +1959,7 @@ mathml/presentation/mathvariant-tokens.html [ ImageOnlyFailure ]
mathml/presentation/tokenElements-mathvariant.html [ ImageOnlyFailure ]

# These tests require the Latin Modern Math font.
mathml/opentype/fraction-line.html [ Skip ]
mathml/opentype/large-operators-italic-correction.html [ Skip ]
mathml/presentation/fractions-linethickness.html [ Skip ]
################################################################################
################# End MathML Issues ####################
################################################################################

0 comments on commit 9dc53d5

Please sign in to comment.