Bug 1535077 - Switch to using Ref and PureComponent in the SearchBox component. r...
[gecko.git] / layout / reftests / bugs / 236539-1.html
blob83331415ce68788717639aef15f67f4696a27914
1 <html>
2 <head>
3 <script type="text/javascript">
4 var NumLine = 0
6 function maj(IDLine)
9 var newtr = document.createElement("tr")
10 newtr.setAttribute("id","tr"+IDLine)
13 var newtdselect = document.createElement("td")
14 var newselect = document.createElement("select")
15 newselect.setAttribute("id","HypothRank_"+IDLine)
16 newselect.setAttribute("name","HypothRank_"+IDLine)
18 for (i=1;i<=IDLine;i++)
21 var newoption = document.createElement("option")
22 newoption.setAttribute("id",i)
23 newoption.setAttribute("class","classoption1")
24 if (i == IDLine)
26 newoption.setAttribute("selected","selected")
28 var newtxt = document.createTextNode(i)
29 newoption.appendChild(newtxt)
31 newselect.appendChild(newoption)
34 if (i>2)
36 for (j=1;j<=i-2;j++)
38 var newoption = document.createElement("option")
39 newoption.setAttribute("class","classoption1")
40 newoption.setAttribute("id",IDLine)
41 var newtxt = document.createTextNode(i-1)
42 newoption.appendChild(newtxt)
43 document.getElementById("HypothRank_"+j).appendChild(newoption)
47 newtdselect.appendChild(newselect)
48 newtr.appendChild(newtdselect)
50 document.getElementById('letbody').appendChild(newtr)
52 NumLine++
57 function DeleteLine(IDLine)
59 for (i=1;i<=NumLine;i++)
62 if (i != IDLine)
64 noeud = document.getElementById("HypothRank_"+i)[IDLine-1]
65 document.getElementById("HypothRank_"+i).removeChild(noeud)
66 for (j=0;j<=NumLine-2;j++)
68 noeud = document.getElementById("HypothRank_"+i)[j]
70 k=j+1
71 noeud.setAttribute("id",k)
73 if (k == NumLine)
75 noeud.setAttribute("selected","selected")
77 depart = 0
78 taille = noeud.firstChild.nodeValue.length
79 document.getElementById("HypothRank_"+i)[j].firstChild.replaceData(depart,taille,j+1)
85 noeud = document.getElementById('tr'+IDLine)
86 document.getElementById('letbody').removeChild(noeud)
88 NumLine--
90 for (i=IDLine;i<=NumLine;i++)
92 k=i+1
93 noeud = document.getElementById("tr"+k)
94 noeud.setAttribute("id","tr"+i)
96 noeud = document.getElementById("HypothRank_"+k)
97 noeud.setAttribute("id","HypothRank_"+i)
98 noeud.setAttribute("name","HypothRank_"+i)
105 </script>
106 </head>
108 <body>
109 <form>
110 <table border="1" id="latable">
111 <thead></thead>
112 <tfoot></tfoot>
113 <tbody id="letbody"></tbody>
114 </table>
115 </form>
117 <script>
118 document.body.offsetWidth;
119 maj(NumLine+1);
120 document.body.offsetWidth;
121 maj(NumLine+1);
122 document.body.offsetWidth;
123 maj(NumLine+1);
124 document.body.offsetWidth;
125 DeleteLine(2);
126 document.body.offsetWidth;
127 </script>
129 </body>
130 </html>