layout/reftests/abs-pos/select-1-dynamic.html

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <select style="position: relative" size=4>
michael@0 4 <option>bar</option>
michael@0 5 </select>
michael@0 6 <select style="position: relative">
michael@0 7 <option>bar</option>
michael@0 8 </select>
michael@0 9 <script>
michael@0 10 function injectAbsPosKid(s) {
michael@0 11 var option = document.createElement("option");
michael@0 12 option.appendChild(document.createTextNode("foo"));
michael@0 13 option.style.position = "absolute";
michael@0 14 option.style.top = "100px";
michael@0 15 s.insertBefore(option, s.firstChild);
michael@0 16
michael@0 17 var div = document.createElement("div");
michael@0 18 div.appendChild(document.createTextNode("bar"));
michael@0 19 div.style.position = "absolute";
michael@0 20 div.style.top = "200px";
michael@0 21 s.appendChild(div);
michael@0 22 }
michael@0 23 onload = function() {
michael@0 24 var s1 = document.querySelectorAll("select")[0];
michael@0 25 var s2 = document.querySelectorAll("select")[1];
michael@0 26 injectAbsPosKid(s1);
michael@0 27 injectAbsPosKid(s2);
michael@0 28 s2.selectedIndex = 0;
michael@0 29 };
michael@0 30 </script>
michael@0 31 </html>

mercurial