1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bugs/236539-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,130 @@ 1.4 +<html> 1.5 +<head> 1.6 +<script type="text/javascript"> 1.7 +var NumLine = 0 1.8 + 1.9 +function maj(IDLine) 1.10 +{ 1.11 + 1.12 +var newtr = document.createElement("tr") 1.13 +newtr.setAttribute("id","tr"+IDLine) 1.14 + 1.15 + 1.16 +var newtdselect = document.createElement("td") 1.17 +var newselect = document.createElement("select") 1.18 +newselect.setAttribute("id","HypothRank_"+IDLine) 1.19 +newselect.setAttribute("name","HypothRank_"+IDLine) 1.20 + 1.21 +for (i=1;i<=IDLine;i++) 1.22 + { 1.23 + 1.24 + var newoption = document.createElement("option") 1.25 + newoption.setAttribute("id",i) 1.26 + newoption.setAttribute("class","classoption1") 1.27 + if (i == IDLine) 1.28 + { 1.29 + newoption.setAttribute("selected","selected") 1.30 + } 1.31 + var newtxt = document.createTextNode(i) 1.32 + newoption.appendChild(newtxt) 1.33 + 1.34 + newselect.appendChild(newoption) 1.35 + } 1.36 + 1.37 +if (i>2) 1.38 + { 1.39 + for (j=1;j<=i-2;j++) 1.40 + { 1.41 + var newoption = document.createElement("option") 1.42 + newoption.setAttribute("class","classoption1") 1.43 + newoption.setAttribute("id",IDLine) 1.44 + var newtxt = document.createTextNode(i-1) 1.45 + newoption.appendChild(newtxt) 1.46 + document.getElementById("HypothRank_"+j).appendChild(newoption) 1.47 + } 1.48 + } 1.49 + 1.50 +newtdselect.appendChild(newselect) 1.51 +newtr.appendChild(newtdselect) 1.52 + 1.53 +document.getElementById('letbody').appendChild(newtr) 1.54 + 1.55 +NumLine++ 1.56 +} 1.57 + 1.58 + 1.59 + 1.60 +function DeleteLine(IDLine) 1.61 +{ 1.62 +for (i=1;i<=NumLine;i++) 1.63 + 1.64 + { 1.65 + if (i != IDLine) 1.66 + { 1.67 + noeud = document.getElementById("HypothRank_"+i)[IDLine-1] 1.68 + document.getElementById("HypothRank_"+i).removeChild(noeud) 1.69 + for (j=0;j<=NumLine-2;j++) 1.70 + { 1.71 + noeud = document.getElementById("HypothRank_"+i)[j] 1.72 + 1.73 + k=j+1 1.74 + noeud.setAttribute("id",k) 1.75 + 1.76 + if (k == NumLine) 1.77 + { 1.78 + noeud.setAttribute("selected","selected") 1.79 + } 1.80 + depart = 0 1.81 + taille = noeud.firstChild.nodeValue.length 1.82 + document.getElementById("HypothRank_"+i)[j].firstChild.replaceData(depart,taille,j+1) 1.83 + } 1.84 + } 1.85 + } 1.86 + 1.87 + 1.88 +noeud = document.getElementById('tr'+IDLine) 1.89 +document.getElementById('letbody').removeChild(noeud) 1.90 + 1.91 +NumLine-- 1.92 + 1.93 +for (i=IDLine;i<=NumLine;i++) 1.94 + { 1.95 + k=i+1 1.96 + noeud = document.getElementById("tr"+k) 1.97 + noeud.setAttribute("id","tr"+i) 1.98 + 1.99 + noeud = document.getElementById("HypothRank_"+k) 1.100 + noeud.setAttribute("id","HypothRank_"+i) 1.101 + noeud.setAttribute("name","HypothRank_"+i) 1.102 + 1.103 + } 1.104 + 1.105 + 1.106 +} 1.107 + 1.108 +</script> 1.109 +</head> 1.110 + 1.111 +<body> 1.112 +<form> 1.113 + <table border="1" id="latable"> 1.114 + <thead></thead> 1.115 + <tfoot></tfoot> 1.116 + <tbody id="letbody"></tbody> 1.117 + </table> 1.118 +</form> 1.119 + 1.120 +<script> 1.121 + document.body.offsetWidth; 1.122 + maj(NumLine+1); 1.123 + document.body.offsetWidth; 1.124 + maj(NumLine+1); 1.125 + document.body.offsetWidth; 1.126 + maj(NumLine+1); 1.127 + document.body.offsetWidth; 1.128 + DeleteLine(2); 1.129 + document.body.offsetWidth; 1.130 +</script> 1.131 + 1.132 +</body> 1.133 +</html>