editor/libeditor/base/crashtests/766413.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial