CounterMaps should hold a unique_ptr of CounterMap.
[WebKit-https.git] / LayoutTests / fast / css / counters / crash-when-cloning-body.html
1 <!DOCTYPE html>\r
2 <html>\r
3 <head>\r
4 <style>                 \r
5 *:first-child {\r
6         display: table;\r
7         counter-increment: foo2;\r
8 }\r
9 \r
10 * {\r
11         display: inline;\r
12         -webkit-appearance: unset;\r
13         visibility: hidden;\r
14 }\r
15                         \r
16 :nth-last-child(1) {\r
17         counter-reset: foo1;\r
18 }\r
19 </style>\r
20 </head>\r
21 <body>\r
22 <div id=firstDiv></div>\r
23 <div id=secondDiv></div>\r
24 <div style="visibility: visible">Pass if no crash.</div>\r
25 </body>\r
26 \r
27 <script>\r
28 if (window.testRunner)\r
29     testRunner.dumpAsText();\r
30     \r
31 document.body.offsetHeight;\r
32 \r
33 let div = document.createElement('div');\r
34 div.appendChild(document.body.cloneNode(true))\r
35 \r
36 document.styleSheets[0].addRule('#firstDiv::after','content: counter(foobar)');\r
37 \r
38 secondDiv.appendChild(document.createElement('input'))\r
39 firstDiv.appendChild(div);\r
40 </script>\r
41 </html>\r