Implement an internal style property for displaystyle.
[WebKit-https.git] / LayoutTests / mathml / opentype / large-operators-displaystyle-dynamic.html
1 <!doctype html>
2 <html>
3   <head>
4     <title>Open Type MATH - large operators - displaystyle</title>
5     <meta charset="utf-8"/>
6     <style type="text/css">
7       @font-face {
8         font-family: stretchy;
9         src: url("stretchy.woff");
10       }
11       div.largeop_test * {
12         font-family: stretchy;
13         font-size: 10px;
14       }
15     </style>
16   </head>
17   <body>
18     <div class="largeop_test">
19       <math class="update" display="block"><mo>&#x2A1B;</mo></math>
20       <math class="update" display="inline"><mo>&#x2A1B;</mo></math>
21       <math class="update" displaystyle="true"><mo>&#x2A1B;</mo></math>
22       <math class="update" displaystyle="false"><mo>&#x2A1B;</mo></math>
23       <math class="update"><mstyle class="update" displaystyle="true"><mo>&#x2A1B;</mo></mstyle></math>
24       <math class="update"><mstyle class="update" displaystyle="false"><mo>&#x2A1B;</mo></mstyle></math>
25       <math class="update" displaystyle="false"><mtable><mtr><mtd><mo>&#x2A1B;</mo></mtd></mtr></mtable></math>
26       <math class="update"><mtable class="update" displaystyle="false"><mtr><mtd><mo>&#x2A1B;</mo></mtd></mtr></mtable></math>
27       <math class="update" displaystyle="false"><mtable class="update" displaystyle="true"><mtr><mtd><mo>&#x2A1B;</mo></mtd></mtr></mtable></math>
28       <math class="update" displaystyle="false"><mfrac><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></mfrac></math>
29       <math class="update" displaystyle="false"><mroot><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></mroot></math>
30       <math class="update" displaystyle="false"><msub><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></msub></math>
31       <math class="update" displaystyle="false"><msup><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></msup></math>
32       <math class="update" displaystyle="false"><msubsup><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></msubsup></math>
33       <math class="update" displaystyle="false"><mmultiscripts><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo><mprescripts/><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></mmultiscripts></math>
34       <math class="update" displaystyle="false"><munder><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></munder></math>
35       <math class="update" displaystyle="false"><mover><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></mover></math>
36       <math class="update" displaystyle="false"><munderover><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo><mo>&#x2A1B;</mo></munderover></math>
37     </div>
38     <script>
39         if (window.testRunner)
40             testRunner.waitUntilDone();
41
42         function updatePageAfterRendering()
43         {
44             setTimeout(function()
45                 {
46                     // Switch the value of display/displaystyle attributes.
47                     var mathmlElements = document.getElementsByClassName("update");
48                     for (var i = 0; i < mathmlElements.length; i++) {
49                         var e = mathmlElements[i];
50                         if (e.hasAttribute("displaystyle"))
51                           e.setAttribute("displaystyle", e.getAttribute("displaystyle") == "true" ? "false" : "true");
52                         if (e.hasAttribute("display"))
53                           e.setAttribute("display", e.getAttribute("display") == "block" ? "inline" : "block");
54                     }
55                     if (window.testRunner)
56                       testRunner.notifyDone();
57                 }, 50);
58         }
59
60         addEventListener('load', updatePageAfterRendering, false);
61     </script>
62   </body>
63 </html>