summaryrefslogtreecommitdiffstats
path: root/layout/reftests/mathml/dir-11.html
blob: ebb2018bffe5dac13c702b12ca17320bbec0f7d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html class="reftest-wait">
  <head><title>Test direction: dynamic change</title></head>
  <body>
    <p>
      math:
      <math>
        <mi>a</mi>
        <mi>b</mi>
        <mi>c</mi>
      </math>
      <math dir="ltr">
        <mi>a</mi>
        <mi>b</mi>
        <mi>c</mi>
      </math>
      <math dir="rtl">
        <mi>a</mi>
        <mi>b</mi>
        <mi>c</mi>
      </math>
    </p>

    <p>
      mstyle:
      <math>
        <mstyle>
          <mi>a</mi>
          <mi>b</mi>
          <mi>c</mi>
        </mstyle>
      </math>
      <math>
        <mstyle dir="ltr">
          <mi>a</mi>
          <mi>b</mi>
          <mi>c</mi>
        </mstyle>
      </math>
      <math>
        <mstyle dir="rtl">
          <mi>a</mi>
          <mi>b</mi>
          <mi>c</mi>
        </mstyle>
      </math>
    </p>

    <p>
      mrow:
      <math>
        <mrow>
          <mi>a</mi>
          <mi>b</mi>
          <mi>c</mi>
        </mrow>
      </math>
      <math>
        <mrow dir="ltr">
          <mi>a</mi>
          <mi>b</mi>
          <mi>c</mi>
        </mrow>
      </math>
      <math>
        <mrow dir="rtl">
          <mi>a</mi>
          <mi>b</mi>
          <mi>c</mi>
        </mrow>
      </math>
    </p>

    <script>
      function doTest()
      {
      var x = document.getElementsByTagName("math");
      x[0].setAttribute("dir", "rtl");
      x[1].setAttribute("dir", "rtl");
      x[2].removeAttribute("dir");

      x = document.getElementsByTagName("mstyle");
      x[0].setAttribute("dir", "rtl");
      x[1].setAttribute("dir", "rtl");
      x[2].removeAttribute("dir");
 
      x = document.getElementsByTagName("mrow");
      x[0].setAttribute("dir", "rtl");
      x[1].setAttribute("dir", "rtl");
      x[2].removeAttribute("dir");

      document.documentElement.removeAttribute("class");
      }
      window.addEventListener("MozReftestInvalidate", doTest, false);
    </script>

  </body>
</html>