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

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: none 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 z-index: 0;
6 width: 100px;
7 height: 100px;
8 background: red;
9 -webkit-user-drag: element;
10 }
11
12 #descendant-painting-sibling {
13 position: relative;
14 width: 100px;
15 height: 100px;
16 background: green;
17 -webkit-user-drag: none;
18 }
19 </style>
20 <div style="transform: translateX(50px)">
21 <div id="draggable">
22 <div id="descendant-painting-sibling"></div>
23 </div>
24 </div>
25 This test passes if the generated drag image is a 100x100 green box, positioned
26 without the transform.
27 <script>
28 function drag() {
29 testRunner.dumpDragImage();
30
31 var image = document.getElementById('draggable');
32 var startX = 50 + image.offsetLeft + image.offsetWidth / 2;
33 var startY = image.offsetTop + image.offsetHeight / 2;
34 var positionX = startX + image.offsetWidth;
35 var positionY = startY + image.offsetHeight;
36
37 eventSender.dragMode = true;
38 eventSender.mouseMoveTo(startX, startY);
39 eventSender.mouseDown();
40 eventSender.mouseMoveTo(positionX, positionY);
41 eventSender.mouseUp();
42 }
43
44 if (!window.testRunner || !window.eventSender) {
45 document.write("This test does not work in manual mode.");
46 } else {
47 window.onload = drag;
48 }
49 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698