summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/presentation-markup/direction/direction-overall-002.html
blob: 8840eaed56a546f11b2606b7e77eee28e9b0eb33 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>Verify dir attribute on various containers</title>
    <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
    <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
    <meta name="assert" content="Verify dir attribute on various elements.">
    <link rel="match" href="direction-overall-002-ref.html">
    <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
    <style>
      math {
          font: 25px/1 Ahem;
      }
    </style>
  </head>

  </head>
  <body style="background: white;">

    <!-- The visible part of the formulas below should be covered by the
         black rectangle when dir=rtl -->

    <div style="position: absolute; top: 5px; left: 5px;">
      <!-- msup -->
      <math dir="rtl">
        <msup>
          <mspace width="20px" height="20px"/>
          <mspace width="20px" height="20px" mathbackground="red"/>
        </msup>
      </math><br/>
      <!-- msub -->
      <math dir="rtl">
        <msub>
          <mspace width="20px" height="20px"/>
          <mspace width="20px" height="20px" mathbackground="orange"/>
        </msub>
      </math><br/>
      <!-- msubsup -->
      <math dir="rtl">
        <msubsup>
          <mspace width="20px" height="20px"/>
          <mspace width="20px" height="20px" mathbackground="green"/>
          <mspace width="20px" height="20px" mathbackground="blue"/>
        </msubsup>
      </math><br/>
      <!-- mmultiscripts -->
      <math dir="rtl">
        <mmultiscripts>
          <mspace/>
          <mspace width="20px" height="20px" mathbackground="cyan"/>
          <mspace width="20px" height="20px" mathbackground="yellow"/>
          <mprescripts/>
          <mspace width="20px" height="20px"/>
          <mspace width="20px" height="20px"/>
        </mmultiscripts>
      </math><br/>
      <!-- munder (mo with movablelimits=true and displaystyle=false) -->
      <math dir="rtl">
        <munder>
          <mpadded width="20px">
            <mphantom>
              <mo movablelimits="true" displaystyle="false">|</mo>
            </mphantom>
          </mpadded>
          <mspace width="20px" height="20px" mathbackground="magenta"/>
        </munder>
      </math><br/>
      <!-- mover (mo with movablelimits=true and displaystyle=false) -->
      <math dir="rtl">
        <mover>
          <mpadded width="20px">
            <mphantom>
              <mo movablelimits="true" displaystyle="false">|</mo>
            </mphantom>
          </mpadded>
          <mspace width="20px" height="20px" mathbackground="cyan"/>
        </mover>
      </math><br/>
      <!-- munderover (mo with movablelimits=true and displaystyle=false) -->
      <math dir="rtl">
        <munderover>
          <mpadded width="20px">
            <mphantom>
              <mo movablelimits="true" displaystyle="false">|</mo>
            </mphantom>
          </mpadded>
          <mspace width="20px" height="20px" mathbackground="yellow"/>
          <mspace width="20px" height="20px" mathbackground="grey"/>
        </munderover>
      </math><br/>
      <!-- mroot -->
      <math dir="rtl">
        <mstyle mathcolor="white">
          <mroot>
            <mspace width="20px" height="20px" mathbackground="orange"/>
            <mspace width="20px" height="20px"/>
          </mroot>
        </mstyle>
      </math><br/>
      <!-- msqrt -->
      <math dir="rtl">
        <mstyle mathcolor="white">
          <msqrt>
            <!-- Here, we assume that (width of radical + width of mspace)
                 is greater than the width of the black rectangle (i.e.
                 width of radical > 30 - 25 = 5px), so the test fails if the
                 radical is placed on the left. -->
            <mspace width="25px" height="20px" mathbackground="grey"/>
          </msqrt>
        </mstyle>
      </math>
    </div>

    <div style="position: absolute; top: 0px; left: 0px;">
      <div style="width: 40px; height: 3000px; background: black"></div>
    </div>

  </body>
</html>