editor/libeditor/html/crashtests/336081-1.xhtml

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
michael@0 2 <head>
michael@0 3 <script>
michael@0 4 <![CDATA[
michael@0 5
michael@0 6 function foop(targetWindow)
michael@0 7 {
michael@0 8 var targetDocument = targetWindow.document;
michael@0 9
michael@0 10 var r1 = targetDocument.createRange();
michael@0 11 r1.setStart(targetDocument.getElementById("out1"), 0);
michael@0 12 r1.setEnd (targetDocument.getElementById("out2"), 0);
michael@0 13 targetWindow.getSelection().addRange(r1);
michael@0 14
michael@0 15 var r2 = targetDocument.createRange();
michael@0 16 r2.setStart(targetDocument.getElementById("in1"), 0);
michael@0 17 r2.setEnd (targetDocument.getElementById("in2"), 0);
michael@0 18 targetWindow.getSelection().addRange(r2);
michael@0 19
michael@0 20 targetDocument.execCommand('removeformat', false, null);
michael@0 21 targetDocument.execCommand('outdent', false, null);
michael@0 22 }
michael@0 23
michael@0 24 function init()
michael@0 25 {
michael@0 26 setTimeout(function()
michael@0 27 {
michael@0 28 var fd = window.frames[0].document;
michael@0 29 fd.body.appendChild(fd.importNode(document.getElementById('rootish'), true));
michael@0 30 fd.designMode = 'on';
michael@0 31 foop(window.frames[0]);
michael@0 32 document.documentElement.removeAttribute("class");
michael@0 33 }, 100);
michael@0 34 }
michael@0 35
michael@0 36 ]]>
michael@0 37 </script>
michael@0 38 </head>
michael@0 39
michael@0 40 <body onload="init()">
michael@0 41
michael@0 42 <iframe src="data:text/html," style="width: 95%; height: 500px;"/>
michael@0 43
michael@0 44 <div id="rootish">
michael@0 45 <div id="out1"/>
michael@0 46 <div id="in1"/>
michael@0 47 <div id="in2"/>
michael@0 48 <div id="out2"/>
michael@0 49 </div>
michael@0 50
michael@0 51 </body>
michael@0 52 </html>

mercurial