layout/base/crashtests/852293.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <!DOCTYPE html>
michael@0 2 <html class="reftest-wait">
michael@0 3 <head>
michael@0 4 <meta charset="UTF-8">
michael@0 5 <script>
michael@0 6 "use strict";
michael@0 7
michael@0 8 var i = 0;
michael@0 9 var x;
michael@0 10 var fixedDiv;
michael@0 11 var sheet;
michael@0 12
michael@0 13 function start()
michael@0 14 {
michael@0 15 clearChildren(document.documentElement);
michael@0 16
michael@0 17 for (var j = 0; j < 10; ++j) {
michael@0 18 document.documentElement.appendChild(document.createElement("div"));
michael@0 19 }
michael@0 20 x = document.getElementsByTagName("div")[0];
michael@0 21
michael@0 22 fixedDiv = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
michael@0 23 fixedDiv.style.setProperty("position", "fixed", "");
michael@0 24
michael@0 25 setTimeout(makeChanges, 10);
michael@0 26 }
michael@0 27
michael@0 28 function makeChanges()
michael@0 29 {
michael@0 30 ++i;
michael@0 31 x.appendChild(fixedDiv);
michael@0 32 sheet = document.createElement("style");
michael@0 33 sheet.appendChild(document.createTextNode("* { transform: matrix(1, 2, 3, 4, 5, 6); }"));
michael@0 34 document.documentElement.appendChild(sheet);
michael@0 35 if (i >= 200) {
michael@0 36 document.documentElement.removeAttribute("class");
michael@0 37 return;
michael@0 38 }
michael@0 39 setTimeout(revertChanges, 10);
michael@0 40 }
michael@0 41
michael@0 42 function revertChanges()
michael@0 43 {
michael@0 44 x.removeChild(fixedDiv);
michael@0 45 document.documentElement.removeChild(sheet);
michael@0 46 bounceDE();
michael@0 47 setTimeout(makeChanges, 10);
michael@0 48 }
michael@0 49
michael@0 50
michael@0 51 function bounceDE()
michael@0 52 {
michael@0 53 var de = document.documentElement;
michael@0 54 document.removeChild(de);
michael@0 55 document.appendChild(de);
michael@0 56 }
michael@0 57
michael@0 58 function clearChildren(root)
michael@0 59 {
michael@0 60 while(root.firstChild) { root.removeChild(root.firstChild); }
michael@0 61 }
michael@0 62
michael@0 63 </script>
michael@0 64 </head>
michael@0 65
michael@0 66 <body onload="start();"></body>
michael@0 67 </html>

mercurial