dtls-2.html (5025B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <link rel="match" href="dtls-2-ref.html"/> 4 <style type="text/css" media="screen, print"> 5 @font-face { 6 font-family: "dtls-1"; 7 src: url(dtls-1.otf); 8 } 9 </style> 10 </head> 11 <body> 12 13 <math> 14 <mstyle style="font-family: 'dtls-1';"> 15 <mover accent="true" id="mover0"> 16 <mo>a</mo> 17 </mover> 18 </mstyle> 19 </math> 20 21 <p> 22 23 <math> 24 <mstyle style="font-family: 'dtls-1';"> 25 <mover accent="true"> 26 <mo>a</mo> 27 <mo id="mo0"></mo> 28 </mover> 29 </mstyle> 30 </math> 31 32 <p> 33 34 <math> 35 <mstyle style="font-family: 'dtls-1';"> 36 <mover accent="true"> 37 <mo>a</mo> 38 <mo id="mo1">a</mo> 39 </mover> 40 </mstyle> 41 </math> 42 43 <p> 44 45 <math> 46 <mstyle style="font-family: 'dtls-1';" id="mstyle0"> 47 </mstyle> 48 </math> 49 50 <p> 51 52 <math> 53 <mstyle id="mstyle1"> 54 <mover accent="true"> 55 <mover accent="true"> 56 <mn>a</mn> 57 <mn>a</mn> 58 </mover> 59 <mover accent="true"> 60 <mn>a</mn> 61 <mn>a</mn> 62 </mover> 63 </mover> 64 </mstyle> 65 </math> 66 67 <p> 68 69 <math> 70 <mstyle style="font-family: 'dtls-1';"> 71 <mover accent="true"> 72 <mrow> 73 <mrow> 74 <mrow id="mrow0"> 75 </mrow> 76 </mrow> 77 </mrow> 78 <mo>a</mo> 79 </mover> 80 </mstyle> 81 </math> 82 83 <p> 84 85 <math> 86 <mstyle id="mstyle4" style ="font-family: 'dtls-1'; font-feature-settings: 'dtls' 0"> 87 <mover accent="true"> 88 <mover accent="true"> 89 <mo>a</mo> 90 <mo>a</mo> 91 </mover> 92 <mover accent="true"> 93 <mo>a</mo> 94 <mo>a</mo> 95 </mover> 96 </mover> 97 </mstyle> 98 </math> 99 100 <p> 101 102 <math> 103 <mstyle id="mstyle5" style ="font-family: 'dtls-1';"> 104 <mover accent="true"> 105 <mover accent="true"> 106 <mo>a</mo> 107 <mo>a</mo> 108 </mover> 109 <mover accent="true"> 110 <mo>a</mo> 111 <mo>a</mo> 112 </mover> 113 </mover> 114 </mstyle> 115 </math> 116 117 <p> 118 119 <math> 120 <mstyle style="font-family: 'dtls-1';"> 121 <mover id="mover1"> 122 <mo>a</mo> 123 <mo>a</mo> 124 </mover> 125 </mstyle> 126 </math> 127 128 <p> 129 130 <math> 131 <mstyle style="font-family: 'dtls-1';"> 132 <mover accent="true" id="mover2"> 133 <mo>a</mo> 134 <mo>a</mo> 135 </mover> 136 </mstyle> 137 </math> 138 139 <p> 140 141 <math> 142 <mstyle style="font-family: 'dtls-1';"> 143 <mover accent="true" id="mover3"> 144 <mo>a</mo> 145 <mo>a</mo> 146 </mover> 147 </mstyle> 148 </math> 149 150 <p> 151 152 <math> 153 <mstyle style="font-family: 'dtls-1';"> 154 <mover accent="true"> 155 <mo id="mo2">a</mo> 156 <mo>a</mo> 157 </mover> 158 </mstyle> 159 </math> 160 161 <p> 162 163 <math> 164 <mstyle style="font-family: 'dtls-1';"> 165 <mover accent="true"> 166 <mo id="mo3" movablelimits="true">a</mo> 167 <mo>a</mo> 168 </mover> 169 </mstyle> 170 </math> 171 172 <script> 173 function doTest() 174 { 175 var mo = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo"); 176 mo.innerHTML = "a"; 177 // An added child gets dtls font feature 178 document.getElementById("mover0").appendChild(mo); 179 // A child with changed text gets dtls font feature 180 document.getElementById("mo0").innerHTML = "a"; 181 // A relocated child loses dtls font feature setting 182 document.getElementById("mstyle0").appendChild(document.getElementById("mo1")); 183 // A change in style 184 document.getElementById("mstyle1").setAttribute("style", "font-family: 'dtls-1';"); 185 186 // dtls gets added to descendants as well 187 var mo1 = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mo"); 188 mo1.innerHTML = "a"; 189 document.getElementById("mrow0").appendChild(mo1); 190 // removing explicit dtls setting works 191 document.getElementById("mstyle4").setAttribute( 192 "style", "font-family: 'dtls-1';") 193 // setting an explicit dtls font feature 194 document.getElementById("mstyle5").setAttribute( 195 "style" , "font-family: 'dtls-1'; font-feature-settings: 'dtls' 0"); 196 197 // Adding accent="true" applies dtls font feature 198 document.getElementById("mover1").setAttribute("accent", "true"); 199 // Changing accent="true" to false removes dtls font feature 200 document.getElementById("mover2").setAttribute("accent", "false"); 201 // Removing accent="true" removes dtls font feature 202 document.getElementById("mover3").removeAttribute("accent"); 203 204 // Movablelimits disables dtls font feature 205 document.getElementById("mo2").setAttribute("movablelimits", "true"); 206 // Removing movablelimits restores dtls font feature 207 document.getElementById("mo3").removeAttribute("movablelimits"); 208 209 document.documentElement.removeAttribute("class"); 210 } 211 document.documentElement.addEventListener("TestRendered", doTest); 212 </script> 213 </body> 214 </html>