Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/select-delete-in-event-handler.html

Issue 2646653002: Fix crash in mouse event handling with a dirty layout tree. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html> Passes if it does not crash.
2
3 <body dir="rtl">
4 </body>
5 <script type="text/javascript">
chrishtr 2017/01/18 23:16:21 I spent quite a while reducing the unminimized Clu
6 function selectionChangeHandler() {
7 document.designMode = "on";
8 }
9 document.addEventListener("selectionchange", selectionChangeHandler, true);
10
11 var focusInActive = false;
12
13 function focusInHandler() {
14 if (focusInActive)
15 return;
16 focusInActive = true;
17 var oElement = event.srcElement;
18 oElement.innerHTML = 'a';
19 document.execCommand("SelectAll", false, false);
20 }
21
22 function cleanup() {
23 while (true) {
24 var oe = document.getElementsByTagName("*");
25 if (oe.length <= 1)
26 return;
27 for (var i = 0; i < oe.length; i++) {
28 var o = oe.item(i);
29 if (!o.firstElementChild && o != document.documentElement) {
30 var p = o.parentNode;
31 p.replaceChild(document.createTextNode(
32 "<" + o.tagName + ">" + o.textContent + "</" + o.tagName + " >"), o);
33 }
34 }
35 }
36 }
37
38 window.onload = function() {
39 cleanup();
40 document.addEventListener("DOMFocusIn", focusInHandler, false);
41
42 setTimeout(function() {
43 if (eventSender) {
44 eventSender.mouseMoveTo(100, 100);
45 eventSender.mouseDown();
46 setTimeout(function() {
47 eventSender.mouseMoveTo(100, 101);
48 eventSender.mouseUp();
49 if (testRunner)
50 testRunner.notifyDone();
51 }, 0);
52 }
53 }, 0);
54 };
55
56 if (testRunner) {
57 testRunner.waitUntilDone();
58 testRunner.dumpAsText();
59 }
60 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698