Skip to content

Commit e899f72

Browse files
committed
Bug 1548529 - Remove values "thin", "thick", "medium" values of mfraclinethickness. r=emilio
See w3c/mathml#4 and https://groups.google.com/forum/#!topic/mozilla.dev.platform/G91-vBeC3Rw This commit introduces a new preference option mathml.mfrac_linethickness_names.disabled to disable linethickness names. For now, these names are only disabled in Nightly builds. Announcements and actual disabling of this and other MathML features will be considered later. * test_bug553917.html is updated to check that these values now cause an error message to be logged into the console. * mstyle-1.xhtml is updated to use a numeric linethickness since the point of the test is just to check that the attribute is not supported on mstyle, not about the actual attribute value. * Other fractions tests relying on linethickness names are executed with the proper preference adjustment. * mathml/presentation-markup/fractions/frac-linethickness-001.html is now closer to its expectation ; however the test still fails because nonzero unitless values are not removed yet. See w3c/mathml#24 Differential Revision: https://phabricator.services.mozilla.com/D42323 UltraBlame original commit: 0692436a2b33c134bf50654ce466e4bd5ddb05cf
1 parent d828dba commit e899f72

File tree

6 files changed

+538
-1
lines changed

6 files changed

+538
-1
lines changed

layout/mathml/nsMathMLmfracFrame.cpp

+49
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,15 @@ h
160160
#
161161
include
162162
"
163+
mozilla
164+
/
165+
StaticPrefs_mathml
166+
.
167+
h
168+
"
169+
#
170+
include
171+
"
163172
nsLayoutUtils
164173
.
165174
h
@@ -712,6 +721,41 @@ IsEmpty
712721
{
713722
if
714723
(
724+
StaticPrefs
725+
:
726+
:
727+
mathml_mfrac_linethickness_names_disabled
728+
(
729+
)
730+
)
731+
{
732+
/
733+
/
734+
length
735+
value
736+
lineThickness
737+
=
738+
defaultThickness
739+
;
740+
ParseNumericValue
741+
(
742+
aThicknessAttribute
743+
&
744+
lineThickness
745+
nsMathMLElement
746+
:
747+
:
748+
PARSE_ALLOW_UNITLESS
749+
aPresContext
750+
aComputedStyle
751+
aFontSizeInflation
752+
)
753+
;
754+
}
755+
else
756+
{
757+
if
758+
(
715759
aThicknessAttribute
716760
.
717761
EqualsLiteral
@@ -768,13 +812,15 @@ defaultThickness
768812
-
769813
onePixel
770814
)
815+
{
771816
lineThickness
772817
=
773818
defaultThickness
774819
-
775820
onePixel
776821
;
777822
}
823+
}
778824
else
779825
if
780826
(
@@ -840,13 +886,15 @@ defaultThickness
840886
+
841887
onePixel
842888
)
889+
{
843890
lineThickness
844891
=
845892
defaultThickness
846893
+
847894
onePixel
848895
;
849896
}
897+
}
850898
else
851899
{
852900
/
@@ -873,6 +921,7 @@ aFontSizeInflation
873921
;
874922
}
875923
}
924+
}
876925
/
877926
/
878927
use

layout/mathml/tests/test_bug553917.html

+228
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,111 @@
740740
/
741741
math
742742
>
743+
<
744+
math
745+
>
746+
<
747+
mfrac
748+
linethickness
749+
=
750+
"
751+
thin
752+
"
753+
>
754+
<
755+
mn
756+
>
757+
1
758+
<
759+
/
760+
mn
761+
>
762+
<
763+
mn
764+
>
765+
2
766+
<
767+
/
768+
mn
769+
>
770+
<
771+
/
772+
mfrac
773+
>
774+
<
775+
/
776+
math
777+
>
778+
<
779+
math
780+
>
781+
<
782+
mfrac
783+
linethickness
784+
=
785+
"
786+
medium
787+
"
788+
>
789+
<
790+
mn
791+
>
792+
1
793+
<
794+
/
795+
mn
796+
>
797+
<
798+
mn
799+
>
800+
2
801+
<
802+
/
803+
mn
804+
>
805+
<
806+
/
807+
mfrac
808+
>
809+
<
810+
/
811+
math
812+
>
813+
<
814+
math
815+
>
816+
<
817+
mfrac
818+
linethickness
819+
=
820+
"
821+
thick
822+
"
823+
>
824+
<
825+
mn
826+
>
827+
1
828+
<
829+
/
830+
mn
831+
>
832+
<
833+
mn
834+
>
835+
2
836+
<
837+
/
838+
mn
839+
>
840+
<
841+
/
842+
mfrac
843+
>
844+
<
845+
/
846+
math
847+
>
743848
*
744849
/
745850
LengthParsingError
@@ -754,6 +859,9 @@
754859
false
755860
false
756861
false
862+
false
863+
false
864+
false
757865
]
758866
args
759867
:
@@ -793,6 +901,21 @@
793901
BADdepth
794902
"
795903
]
904+
[
905+
"
906+
thin
907+
"
908+
]
909+
[
910+
"
911+
medium
912+
"
913+
]
914+
[
915+
"
916+
thick
917+
"
918+
]
796919
]
797920
}
798921
/
@@ -1767,6 +1890,111 @@
17671890
math
17681891
>
17691892
<
1893+
math
1894+
>
1895+
<
1896+
mfrac
1897+
linethickness
1898+
=
1899+
"
1900+
thin
1901+
"
1902+
>
1903+
<
1904+
mn
1905+
>
1906+
1
1907+
<
1908+
/
1909+
mn
1910+
>
1911+
<
1912+
mn
1913+
>
1914+
2
1915+
<
1916+
/
1917+
mn
1918+
>
1919+
<
1920+
/
1921+
mfrac
1922+
>
1923+
<
1924+
/
1925+
math
1926+
>
1927+
<
1928+
math
1929+
>
1930+
<
1931+
mfrac
1932+
linethickness
1933+
=
1934+
"
1935+
medium
1936+
"
1937+
>
1938+
<
1939+
mn
1940+
>
1941+
1
1942+
<
1943+
/
1944+
mn
1945+
>
1946+
<
1947+
mn
1948+
>
1949+
2
1950+
<
1951+
/
1952+
mn
1953+
>
1954+
<
1955+
/
1956+
mfrac
1957+
>
1958+
<
1959+
/
1960+
math
1961+
>
1962+
<
1963+
math
1964+
>
1965+
<
1966+
mfrac
1967+
linethickness
1968+
=
1969+
"
1970+
thick
1971+
"
1972+
>
1973+
<
1974+
mn
1975+
>
1976+
1
1977+
<
1978+
/
1979+
mn
1980+
>
1981+
<
1982+
mn
1983+
>
1984+
2
1985+
<
1986+
/
1987+
mn
1988+
>
1989+
<
1990+
/
1991+
mfrac
1992+
>
1993+
<
1994+
/
1995+
math
1996+
>
1997+
<
17701998
!
17711999
-
17722000
-

layout/reftests/mathml/mstyle-1.xhtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ true
350350
linethickness
351351
=
352352
"
353-
thick
353+
10px
354354
"
355355
>
356356
<

0 commit comments

Comments
 (0)