editor/libeditor/base/crashtests/766413.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <script>
     6 function boom()
     7 {
     8   var root = document.documentElement;
     9   while (root.firstChild) {
    10     root.removeChild(root.firstChild);
    11   }
    13   var space = document.createTextNode(" ");
    14   var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
    15   root.contentEditable = "true";
    16   root.focus();
    17   document.execCommand("contentReadOnly", false, null);
    18   root.appendChild(body);
    19   root.contentEditable = "false";
    20   root.appendChild(space);
    21   root.removeChild(body);
    22   root.contentEditable = "true";
    24   window.getSelection().removeAllRanges();
    25   var r1 = document.createRange();
    26   r1.setStart(root, 0);
    27   r1.setEnd(root, 0);
    28   window.getSelection().addRange(r1);
    29   looseText = document.createTextNode("c");
    30   var r2 = document.createRange();
    31   r2.setStart(looseText, 0);
    32   r2.setEnd(looseText, 0);
    33   window.getSelection().addRange(r2);
    35   document.execCommand("forwardDelete", false, null);
    36 }
    38 </script>
    39 </head>
    41 <body onload="boom();"></body>
    42 </html>

mercurial