Skip to content

Commit

Permalink
Bug 1574087. Make MathML length, dir, display, displaystyle and mathv…
Browse files Browse the repository at this point in the history
…ariant case insensitive. r=emilio

See w3c/mathml#22

* mathml/relations/css-styling/attribute-mapping-001.html (length, dir)
* mathml/relations/html5-tree/display-1.html (display)
* mathml/relations/css-styling/displaystyle-1.html (displaystyle)
* mathml/relations/css-styling/displaystyle-2.html (displaystyle)
* mathml/relations/css-styling/mathvariant-case-sensitivity.html (mathvariant)

layout/reftests/bugs/355548-3.xml has been updated now that units are case
insensitive.

Note:
* mathml/relations/css-styling/attribute-mapping-002.html also checks
  case insensitiveness of mathvariant and displaystyle but for now we map
  these attributes to internal -moz-* CSS properties.
* mathcolor and mathbackground values are already case insensitive, this
  is verified by mathml/relations/css-styling/attribute-mapping-001.html

Differential Revision: https://phabricator.services.mozilla.com/D42081

UltraBlame original commit: 2213833fcec3e1b7444a29d1ed038f39a3141cf7
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent 7d1c4a1 commit 8993b7c
Show file tree
Hide file tree
Showing 10 changed files with 2,881 additions and 1,358 deletions.
57 changes: 46 additions & 11 deletions dom/mathml/nsMathMLElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,41 @@ number
static
*
/
/
/
XXXfredw
:
Deprecate
legacy
MathML
syntax
and
use
the
CSS
parser
instead
.
/
/
See
https
:
/
/
github
.
com
/
mathml
-
refresh
/
mathml
/
issues
/
63
bool
nsMathMLElement
:
Expand Down Expand Up @@ -2645,7 +2680,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
em
Expand All @@ -2661,7 +2696,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
ex
Expand All @@ -2677,7 +2712,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
px
Expand All @@ -2693,7 +2728,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
in
Expand All @@ -2709,7 +2744,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
cm
Expand All @@ -2725,7 +2760,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
mm
Expand All @@ -2741,7 +2776,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
pt
Expand All @@ -2757,7 +2792,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
pc
Expand All @@ -2773,7 +2808,7 @@ if
(
unit
.
EqualsLiteral
LowerCaseEqualsLiteral
(
"
q
Expand Down Expand Up @@ -4985,7 +5020,7 @@ if
(
str
.
EqualsASCII
LowerCaseEqualsASCII
(
sizes
[
Expand Down Expand Up @@ -5987,7 +6022,7 @@ if
(
str
.
EqualsASCII
LowerCaseEqualsASCII
(
dirs
[
Expand Down
7 changes: 7 additions & 0 deletions layout/mathml/mathml.css
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ display
"
block
"
i
]
{
display
Expand Down Expand Up @@ -527,6 +528,7 @@ display
"
inline
"
i
]
{
display
Expand All @@ -550,6 +552,7 @@ displaystyle
"
false
"
i
]
{
-
Expand All @@ -569,6 +572,7 @@ displaystyle
"
true
"
i
]
{
-
Expand Down Expand Up @@ -2877,6 +2881,7 @@ displaystyle
"
false
"
i
]
{
-
Expand All @@ -2896,6 +2901,7 @@ displaystyle
"
true
"
i
]
{
-
Expand Down Expand Up @@ -3527,6 +3533,7 @@ displaystyle
"
true
"
i
]
{
-
Expand Down
42 changes: 21 additions & 21 deletions layout/reftests/bugs/355548-3-ref.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,24 @@ m
mstyle
>
<
/
m
:
math
>
<
/
p
>
<
p
>
<
m
:
math
>
<
m
:
mstyle
Expand All @@ -1145,7 +1163,7 @@ font
-
size
:
48px
24px
;
"
>
Expand All @@ -1163,24 +1181,6 @@ m
mstyle
>
<
/
m
:
math
>
<
/
p
>
<
p
>
<
m
:
math
>
<
m
:
mstyle
Expand Down Expand Up @@ -1328,7 +1328,7 @@ font
-
size
:
24px
0
;
"
>
Expand Down Expand Up @@ -1427,7 +1427,7 @@ font
-
size
:
0
20px
;
"
>
Expand Down
56 changes: 28 additions & 28 deletions layout/reftests/bugs/355548-3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1374,34 +1374,6 @@ mstyle
mathsize
=
"
20PX
"
>
<
m
:
mi
>
Id
<
/
m
:
mi
>
<
/
m
:
mstyle
>
<
m
:
mstyle
mathsize
=
"
.
px
"
Expand Down Expand Up @@ -1787,6 +1759,34 @@ m
mstyle
>
<
m
:
mstyle
mathsize
=
"
20PX
"
>
<
m
:
mi
>
Id
<
/
m
:
mi
>
<
/
m
:
mstyle
>
<
/
m
:
Expand Down
Loading

0 comments on commit 8993b7c

Please sign in to comment.