summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/delete-into-nested-block.html
blob: b1e8f008744ff3ff61e5d7464ff30383171e38d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
    <script src="resources/text-based-repaint.js" type="text/javascript"></script>
    <script type="text/javascript">
        function repaintTest()
        {
            document.execCommand("Delete");
        }
    </script>
</head>
<body onload="runRepaintTest()">
    <h4>Deleting into a nested block (was Radar 4056100)</h4>
    <div style="width:400px;">
        The bug's symptom was that the visual result were two instances of the word "three", because the original was not erased. Resize cleared it up.
    </div>
    <hr>
    <div contenteditable style="height: 100px;">
        <div id="one">one</div>
        <div id="two">
            <div>two</div>
            <div>three</div>
        </div>
    </div>
    <script type="text/javascript">
        var sel = window.getSelection();
        var one = document.getElementById("one");
        var two = document.getElementById("two");
        sel.setBaseAndExtent(one, 0, two, 2);
    </script>
</body>
</html>