Skip to content

Commit

Permalink
Bug 1548522 - Remove support for the menclose's "radical" notation. r…
Browse files Browse the repository at this point in the history
…=emilio

See https://groups.google.com/forum/#!topic/mozilla.dev.platform/vwAkuZIEhnY

* Introduce a new preference option to disable menclose's "radical" notation.
* Disable the notation in Nightly and when running WPT tests.
* Enable the notation in other channels together with a counter and
  deprecation warning.
* Update WPT test legacy-menclose-radical-notation.html
  - Fix test: "radical" should be equivalent to "", which is not the same as
    the default value "longdiv".
    See w3c/mathml#144
  - Add a test "box radical" which should be equivalent to "box".
  - Remove failure expectation.
* Enable the radical notation for MathML reftests testing it.

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

UltraBlame original commit: d2613eaa13690e3771e84ef6ff5080a8fa348a66
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent 9fcbbfa commit d834c03
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 16 deletions.
4 changes: 4 additions & 0 deletions dom/base/nsDeprecatedOperationList.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,9 @@ MathML_DeprecatedMathSpaceValue
)
DEPRECATED_OPERATION
(
MathML_DeprecatedMencloseNotationRadical
)
DEPRECATED_OPERATION
(
MathML_DeprecatedStyleAttribute
)
38 changes: 38 additions & 0 deletions dom/locales/en-US/chrome/dom/dom.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8140,6 +8140,44 @@ NOTE
Do
not
translate
radical
notation
and
menclose
.
MathML_DeprecatedMencloseNotationRadical
=
The
radical
value
is
deprecated
for
the
notation
attribute
of
the
<
menclose
>
element
and
will
be
removed
at
a
future
date
.
#
LOCALIZATION
NOTE
:
Do
not
translate
MathML
background
color
Expand Down
40 changes: 40 additions & 0 deletions layout/mathml/nsMathMLmencloseFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ include
"
mozilla
/
StaticPrefs_mathml
.
h
"
#
include
"
mozilla
/
gfx
/
2D
Expand Down Expand Up @@ -442,6 +451,36 @@ radical
)
)
{
if
(
!
StaticPrefs
:
:
mathml_deprecated_menclose_notation_radical_disabled
(
)
)
{
mContent
-
>
OwnerDoc
(
)
-
>
WarnOnceAbout
(
dom
:
:
Document
:
:
eMathML_DeprecatedMencloseNotationRadical
)
;
rv
=
AllocateMathMLChar
Expand All @@ -461,6 +500,7 @@ mNotationsToDraw
NOTATION_RADICAL
;
}
}
else
if
(
Expand Down
45 changes: 45 additions & 0 deletions layout/reftests/mathml/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,15 @@ html
#
bug
1309426
pref
(
mathml
.
deprecated_menclose_notation_radical
.
disabled
false
)
=
=
dir
Expand Down Expand Up @@ -4888,6 +4897,15 @@ menclose
ref
.
html
pref
(
mathml
.
deprecated_menclose_notation_radical
.
disabled
false
)
!
=
menclose
Expand Down Expand Up @@ -5497,6 +5515,15 @@ madruwb
ref
.
html
pref
(
mathml
.
deprecated_menclose_notation_radical
.
disabled
false
)
fails
-
if
Expand Down Expand Up @@ -5808,6 +5835,15 @@ madruwb
ref
.
html
pref
(
mathml
.
deprecated_menclose_notation_radical
.
disabled
false
)
=
=
menclose
Expand Down Expand Up @@ -6156,6 +6192,15 @@ menclose
ref
.
html
pref
(
mathml
.
deprecated_menclose_notation_radical
.
disabled
false
)
=
=
menclose
Expand Down
31 changes: 31 additions & 0 deletions modules/libpref/init/StaticPrefList.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33225,6 +33225,37 @@ always
Whether
to
disable
deprecated
"
radical
"
notation
for
the
menclose
element
.
-
name
:
mathml
.
deprecated_menclose_notation_radical
.
disabled
type
:
bool
value
:
IS_NIGHTLY_BUILD
mirror
:
always
#
Whether
to
disable
legacy
MathML
number
Expand Down
7 changes: 7 additions & 0 deletions testing/web-platform/meta/mathml/__dir__.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ disabled
true
mathml
.
deprecated_menclose_notation_radical
.
disabled
:
true
mathml
.
legacy_number_syntax
.
disabled
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,26 @@
menclose
>
<
menclose
notation
=
"
box
"
>
<
mn
>
123
<
/
mn
>
<
/
menclose
>
<
/
math
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@
radical
notation
is
not
supported
ignored
.
"
>
Expand Down Expand Up @@ -222,6 +221,27 @@
menclose
>
<
menclose
notation
=
"
box
radical
"
>
<
mn
>
123
<
/
mn
>
<
/
menclose
>
<
/
math
>
Expand Down

0 comments on commit d834c03

Please sign in to comment.