diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html new file mode 100644 index 0000000000000..66ca114061c4b --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html @@ -0,0 +1,711 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +title +> +math +- +depth +< +/ +title +> +< +meta +charset += +" +utf +- +8 +" +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +mathml +- +refresh +. +github +. +io +/ +mathml +- +core +/ +# +the +- +math +- +script +- +level +- +property +" +> +< +meta +name += +" +assert +" +content += +" +Check +the +computed +value +of +math +- +depth +" +> +< +script +src += +" +/ +resources +/ +testharness +. +js +" +> +< +/ +script +> +< +script +src += +" +/ +resources +/ +testharnessreport +. +js +" +> +< +/ +script +> +< +script +> +function +mathDepth +( +id +) +{ +return +window +. +getComputedStyle +( +document +. +getElementById +( +id +) +) +. +getPropertyValue +( +" +math +- +depth +" +) +; +} +setup +( +{ +explicit_done +: +true +} +) +; +window +. +addEventListener +( +" +load +" +function +( +) +{ +test +( +function +( +) +{ +assert_equals +( +mathDepth +( +" +initial +" +) +" +0 +" +) +; +assert_equals +( +mathDepth +( +" +initialFrom11 +" +) +" +0 +" +) +; +} +" +Initial +value +of +math +- +depth +" +) +; +test +( +function +( +) +{ +assert_equals +( +mathDepth +( +" +inherited11 +" +) +" +11 +" +) +; +assert_equals +( +mathDepth +( +" +inherited +- +7 +" +) +" +- +7 +" +) +; +} +" +Inherited +values +of +math +- +depth +" +) +; +test +( +function +( +) +{ +assert_equals +( +mathDepth +( +" +inherited9specifiedAutoInline +" +) +" +10 +" +) +; +assert_equals +( +mathDepth +( +" +inherited9specifiedAutoDisplay +" +) +" +9 +" +) +; +} +" +Specified +math +- +depth +: +auto +- +add +" +) +; +test +( +function +( +) +{ +assert_equals +( +mathDepth +( +" +specified11 +" +) +" +11 +" +) +; +assert_equals +( +mathDepth +( +" +specified +- +7 +" +) +" +- +7 +" +) +; +} +" +Specified +math +- +depth +: +< +integer +> +" +) +; +test +( +function +( +) +{ +assert_equals +( +mathDepth +( +" +specifiedAdd10From5 +" +) +" +15 +" +) +; +assert_equals +( +mathDepth +( +" +specifiedAdd +- +15From5 +" +) +" +- +10 +" +) +; +} +" +Specified +math +- +depth +: +add +( +< +integer +> +) +" +) +; +done +( +) +; +} +) +; +< +/ +script +> +< +/ +head +> +< +body +> +< +div +id += +" +log +" +> +< +/ +div +> +< +div +id += +" +initial +" +> +< +/ +div +> +< +div +id += +" +specified11 +" +style += +" +math +- +depth +: +11 +" +> +< +div +id += +" +initialFrom11 +" +style += +" +math +- +depth +: +initial +" +> +< +/ +div +> +< +div +id += +" +inherited11 +" +> +< +/ +div +> +< +/ +div +> +< +div +id += +" +specified +- +7 +" +style += +" +math +- +depth +: +- +7 +" +> +< +div +id += +" +inherited +- +7 +" +> +< +/ +div +> +< +/ +div +> +< +div +style += +" +math +- +depth +: +9 +" +> +< +div +style += +" +math +- +style +: +compact +" +> +< +div +id += +" +inherited9specifiedAutoInline +" +style += +" +math +- +depth +: +auto +- +add +" +> +< +/ +div +> +< +/ +div +> +< +div +style += +" +math +- +style +: +normal +" +> +< +div +id += +" +inherited9specifiedAutoDisplay +" +style += +" +math +- +depth +: +auto +- +add +" +> +< +/ +div +> +< +/ +div +> +< +/ +div +> +< +div +style += +" +math +- +depth +: +5 +" +> +< +div +id += +" +specifiedAdd10From5 +" +style += +" +math +- +depth +: +add +( +10 +) +" +> +< +/ +div +> +< +div +id += +" +specifiedAdd +- +15From5 +" +style += +" +math +- +depth +: +add +( +- +15 +) +" +> +< +/ +div +> +< +/ +div +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html index 9de3ff96d809e..eb69da21656b7 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative.html @@ -149,31 +149,24 @@ Verify effect of -font +math - -size +depth : -scriptlevel -( auto -) +- +add | -scriptlevel -( add ( < integer -> -) ) | -scriptlevel ( < integer > -) starting from different @@ -181,9 +174,7 @@ of math - -script -- -level +depth . " > @@ -973,10 +964,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > < @@ -1019,10 +1015,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > < @@ -1065,10 +1066,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 7 -) " > < @@ -1085,10 +1089,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > < @@ -1114,10 +1123,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 7 -) " > < @@ -1134,10 +1146,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > < @@ -1181,13 +1198,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 0 ) -) " > < @@ -1226,14 +1246,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 1 ) -) " > < @@ -1270,13 +1293,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 1 ) -) " > < @@ -1315,14 +1341,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 2 ) -) " > < @@ -1359,13 +1388,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 2 ) -) " > < @@ -1404,14 +1436,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 9 ) -) " > < @@ -1448,13 +1483,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 9 ) -) " > < @@ -1474,14 +1512,11 @@ style = " -font +math - -size +depth : -scriptlevel -( 3 -) ; " > @@ -1512,13 +1547,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 0 ) -) " > < @@ -1558,14 +1596,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 1 ) -) " > < @@ -1603,13 +1644,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 1 ) -) " > < @@ -1649,14 +1693,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 2 ) -) " > < @@ -1694,13 +1741,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 2 ) -) " > < @@ -1740,14 +1790,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 9 ) -) " > < @@ -1785,13 +1838,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 9 ) -) " > < @@ -1835,10 +1891,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 0 -) " > < @@ -1877,11 +1936,14 @@ - size : -scriptlevel -( +math +; +math +- +depth +: - 1 -) " > < @@ -1918,10 +1980,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 1 -) " > < @@ -1960,11 +2025,14 @@ - size : -scriptlevel -( +math +; +math +- +depth +: - 2 -) " > < @@ -2001,10 +2069,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 2 -) " > < @@ -2043,11 +2114,14 @@ - size : -scriptlevel -( +math +; +math +- +depth +: - 9 -) " > < @@ -2084,10 +2158,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 9 -) " > < @@ -2111,14 +2188,11 @@ style = " -font +math - -size +depth : -scriptlevel -( 50 -) " > < @@ -2148,10 +2222,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 50 -) " > < @@ -2189,10 +2266,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 49 -) " > < @@ -2230,10 +2310,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 51 -) " > < @@ -2271,10 +2354,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 48 -) " > < @@ -2312,10 +2398,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 52 -) " > < @@ -2353,10 +2442,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 41 -) " > < @@ -2394,10 +2486,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 59 -) " > < diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative-ref.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative-ref.html new file mode 100644 index 0000000000000..a3937a3a5018b --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative-ref.html @@ -0,0 +1,185 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +title +> +math +- +depth +< +/ +title +> +< +meta +charset += +" +utf +- +8 +" +> +< +link +rel += +" +stylesheet +" +type += +" +text +/ +css +" +href += +" +/ +fonts +/ +ahem +. +css +" +/ +> +< +style +> +. +container +{ +/ +* +Ahem +font +does +not +have +a +MATH +table +so +the +font +- +size +scale +factor +is +always +0 +. +71 +^ +{ +computed +- +inherited +math +script +level +} +* +/ +font +: +100px +/ +1 +Ahem +; +} +< +/ +style +> +< +/ +head +> +< +body +> +< +p +> +Test +passes +if +you +see +two +squares +of +side +100px +. +< +/ +p +> +< +div +class += +" +container +" +> +< +div +> +X +< +/ +div +> +< +/ +div +> +< +br +/ +> +< +div +class += +" +container +" +> +< +div +> +X +< +/ +div +> +< +/ +div +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative.html new file mode 100644 index 0000000000000..83c12a861105e --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative.html @@ -0,0 +1,364 @@ +< +! +DOCTYPE +html +> +< +html +> +< +head +> +< +title +> +math +- +depth +< +/ +title +> +< +meta +charset += +" +utf +- +8 +" +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +github +. +com +/ +w3c +/ +csswg +- +drafts +/ +issues +/ +3746 +" +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +mathml +- +refresh +. +github +. +io +/ +mathml +- +core +/ +# +the +- +math +- +script +- +level +- +property +" +> +< +meta +name += +" +assert +" +content += +" +If +specified +font +- +size +is +not +' +math +' +then +math +- +depth +does +not +affect +the +computed +value +of +font +- +size +. +" +> +< +link +rel += +" +match +" +href += +" +math +- +script +- +level +- +003 +. +tentative +- +ref +. +html +" +> +< +link +rel += +" +stylesheet +" +type += +" +text +/ +css +" +href += +" +/ +fonts +/ +ahem +. +css +" +/ +> +< +style +> +. +container +{ +/ +* +Ahem +font +does +not +have +a +MATH +table +so +the +font +- +size +scale +factor +is +always +0 +. +71 +^ +{ +computed +- +inherited +math +script +level +} +* +/ +font +: +100px +/ +1 +Ahem +; +} +< +/ +style +> +< +/ +head +> +< +body +> +< +p +> +Test +passes +if +you +see +two +squares +of +side +100px +. +< +/ +p +> +< +div +class += +" +container +" +style += +" +math +- +script +- +level +: +3 +; +" +> +< +div +style += +" +math +- +level +: +9 +; +font +- +size +: +100px +; +" +> +X +< +/ +div +> +< +/ +div +> +< +br +/ +> +< +div +class += +" +container +" +style += +" +math +- +script +- +level +: +3 +; +" +> +< +div +style += +" +math +- +level +: +9 +; +" +> +X +< +/ +div +> +< +/ +div +> +< +/ +body +> +< +/ +html +> diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-004.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-004.tentative.html index d4ae7ce04f8ad..77d4f57ede551 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-004.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-004.tentative.html @@ -404,11 +404,14 @@ - size : -scriptlevel -( +math +; +math +- +depth +: - 3 -) ; } . @@ -420,11 +423,14 @@ - size : -scriptlevel -( +math +; +math +- +depth +: - 1 -) ; } . @@ -434,10 +440,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 0 -) ; } . @@ -447,10 +456,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 1 -) ; } . @@ -460,10 +472,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 2 -) ; } . @@ -473,10 +488,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 3 -) ; } . @@ -486,10 +504,13 @@ - size : -scriptlevel -( +math +; +math +- +depth +: 5 -) ; } < diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html index 09c8f70009e12..8c3eb86b1d222 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-001.tentative.html @@ -151,16 +151,23 @@ = " If +specified font - size is -scriptlevel -( +math +and +specified +math +- +depth +is ' auto +- +add ' -) and the inherited @@ -171,12 +178,14 @@ style is ' -display +normal ' then the -internal -scriptlevel +computed +math +- +depth is the one @@ -358,10 +367,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > X diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html index 09bb266341a9b..8110b13af2780 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html @@ -151,16 +151,26 @@ = " If +the +specified font - size is -scriptlevel -( +' +math +' +and +specified +math +- +depth +is ' auto +- +add ' -) and the inherited @@ -171,12 +181,14 @@ style is ' -inline +compact ' then the -internal -scriptlevel +computed +math +- +depth is the one @@ -358,10 +370,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > X diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html index 9467f9e340ec4..cff1a58c5855e 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-003.tentative.html @@ -314,10 +314,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > X diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html index 056a7338ca6c0..63dd93c478af4 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-004.tentative.html @@ -338,10 +338,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > X diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html index b6c249074542c..ca5b8e354a97a 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-005.tentative.html @@ -338,10 +338,15 @@ - size : -scriptlevel -( +math +; +math +- +depth +: auto -) +- +add " > X diff --git a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-font-size-clamping-001.tentative.html b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-font-size-clamping-001.tentative.html index 0452ff5004495..ba5fac02745d4 100644 --- a/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-font-size-clamping-001.tentative.html +++ b/testing/web-platform/tests/css/css-fonts/math-script-level-and-math-style/math-script-level-font-size-clamping-001.tentative.html @@ -288,13 +288,16 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( 8 ) -) ; " > @@ -329,14 +332,17 @@ - size : -scriptlevel -( +math +; +math +- +depth +: add ( - 8 ) -) ; " > diff --git a/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html b/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html index 0ff55ca904bac..71c0fc832c2e0 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/attribute-mapping-002.html @@ -526,39 +526,6 @@ ( ) { -var -epsilon -= -. -1 -var -fontSizeAtScriptLevelZero -= -fontSize -( -window -. -getComputedStyle -( -container -) -) -; -var -inheritedSize -= -fontSize -( -window -. -getComputedStyle -( -element -. -parentNode -) -) -; / / none @@ -567,11 +534,17 @@ appear as scripts -assert_approx_equals -( -fontSize +assert_equals ( style +. +getPropertyValue +( +" +math +- +depth +" ) tag = @@ -590,13 +563,9 @@ mprescripts " ? -inheritedSize -* -. -71 +1 : -inheritedSize -epsilon +0 " no attribute @@ -618,23 +587,19 @@ absoluteScriptlevel ) ; -assert_approx_equals -( -fontSize +assert_equals ( style -) -fontSizeAtScriptLevelZero -* -Math . -pow +getPropertyValue ( -. -71 -absoluteScriptlevel +" +math +- +depth +" ) -epsilon +absoluteScriptlevel " attribute specified @@ -664,22 +629,19 @@ } ) ; -assert_approx_equals -( -fontSize +assert_equals ( style -) -inheritedSize -* -Math . -pow +getPropertyValue ( -. -71 -positiveScriptlevelDelta +" +math +- +depth +" ) +positiveScriptlevelDelta epsilon " attribute @@ -711,21 +673,17 @@ ; assert_approx_equals ( -fontSize -( style -) -inheritedSize -* -Math . -pow +getPropertyValue ( -. -71 -negativeScriptlevelDelta +" +math +- +depth +" ) -epsilon +negativeScriptlevelDelta " attribute specified @@ -787,11 +745,9 @@ is mapped to -font +math - -size -: -scriptlevel +depth ( . . diff --git a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html index fc27cc4317a13..fa527a395292e 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001-ref.html @@ -392,14 +392,11 @@ style = " -font +math - -size +depth : -scriptlevel -( 0 -) ; " > diff --git a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html index d37d96065062f..fdc3c456e7cc4 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/presentational-hints-001.html @@ -726,14 +726,11 @@ style = " -font +math - -size +depth : -scriptlevel -( 0 -) ; " >