Do not create a shape object outside of the layout context
[WebKit-https.git] / LayoutTests / fast / block / float / floats-in-clean-line-crash.html
1 <html>
2     <style>
3         html {
4          height:100%; 
5         }
6
7         .test { 
8             float:left; 
9         }
10     </style>
11
12     <body>
13         <a href="https://bugs.webkit.org/show_bug.cgi?id=122668">Bug 122668 - The test passes if it doesn't crash</a>
14         <br id="br">
15         <div class="test">1</div>
16         <div>A<div class="test">2</div><span id="span"></span></div>
17     </body>
18
19     <script>
20         if (window.testRunner)
21             testRunner.dumpAsText();
22
23         var br = document.getElementById("br");
24         elem = document.getElementById("span");
25         document.body.parentNode.insertBefore(elem, document.body.nextSibling);
26         try
27         {
28             document.getElementById("br").lookupNamespacePrefix("text", document.getElementById("br"));
29         }
30         catch(e)
31         {
32         }
33
34         var canvas = document.createElement("canvas");
35         canvas.setAttribute("height", "1226");
36         canvas.setAttribute("width", "3391");
37         br.parentNode.insertBefore(canvas, br.nextSibling);
38         var ctx = canvas.getContext("2d");
39         ctx.strokeRect(br.appendChild(document.createElement("olist")).offsetLeft, 65535, 11111111111111111111111111111111, 9223372036);
40         head = document.getElementsByTagName("head")[0];
41         var style = document.createElement("style");
42         style.innerHTML=":first-of-type { \n\
43         position: fixed;\n\
44         } \n\
45         ";
46         head.appendChild(style);
47     </script>
48 </html>