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

Side by Side Diff: third_party/WebKit/LayoutTests/images/drag-image-transformed-parent.html

Issue 2784373004: [SPv2] Replay DragImages into PropertyTreeState of the enclosing stacking context (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 #draggable {
4 position: relative;
5 width: 100px;
6 height: 100px;
7 background: red;
8 -webkit-user-drag: element;
9 }
10
11 #descendant-painting-sibling {
12 position: relative;
13 width: 100px;
14 height: 100px;
15 background: green;
16 -webkit-user-drag: none;
17 }
18 </style>
19 <div style="transform: translateX(50px)">
20 <div id="draggable">
21 <div id="descendant-painting-sibling"></div>
22 </div>
23 </div>
24 This test passes if the generated drag image is a 100x100 green box, positioned
25 without the transform.
26 <script>
27 function drag() {
28 testRunner.dumpDragImage();
29
30 var image = document.getElementById('draggable');
wkorman 2017/03/31 18:21:51 Wanted to validate similarly but expected image is
chrishtr 2017/03/31 20:59:03 Good catch, sorry I missed it. It worked correctly
31 var startX = image.offsetLeft + image.offsetWidth / 2;
32 var startY = image.offsetTop + image.offsetHeight / 2;
33 var positionX = startX + image.offsetWidth;
34 var positionY = startY + image.offsetHeight;
35
36 eventSender.dragMode = true;
37 eventSender.mouseMoveTo(startX, startY);
38 eventSender.mouseDown();
39 eventSender.mouseMoveTo(positionX, positionY);
40 eventSender.mouseUp();
41 }
42
43 if (!window.testRunner || !window.eventSender) {
44 document.write("This test does not work in manual mode.");
45 } else {
46 window.onload = drag;
47 }
48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698