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

Side by Side Diff: third_party/WebKit/LayoutTests/images/drag-image-transformed-child.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 -webkit-user-drag: element;
8 }
9
10 #descendant-painting-sibling {
11 position: relative;
12 width: 100px;
13 height: 100px;
14 background: green;
15 -webkit-user-drag: none;
16 transform: translateX(50px);
17 }
18 </style>
19 <div id="draggable">
20 <div id="descendant-painting-sibling"></div>
21 </div>
22 This test passes if the generated drag image is a 100x100 green box, positioned
23 *with* the transform.
24 <script>
25 function drag() {
26 testRunner.dumpDragImage();
27
28 var image = document.getElementById('draggable');
29 var startX = image.offsetLeft + image.offsetWidth / 2;
wkorman 2017/03/31 18:21:51 Just validating the image, I expected this to mean
chrishtr 2017/03/31 20:59:03 This is because I put a transform: translateX(50px
wkorman 2017/03/31 21:08:18 Yes, but I incorporated that into my third bullet,
chrishtr 2017/03/31 21:18:00 Oh I see, sorry. The drag image is independent of
30 var startY = image.offsetTop + image.offsetHeight / 2;
31 var positionX = startX + image.offsetWidth;
32 var positionY = startY + image.offsetHeight;
33
34 eventSender.dragMode = true;
35 eventSender.mouseMoveTo(startX, startY);
36 eventSender.mouseDown();
37 eventSender.mouseMoveTo(positionX, positionY);
38 eventSender.mouseUp();
39 }
40
41 if (!window.testRunner || !window.eventSender) {
42 document.write("This test does not work in manual mode.");
43 } else {
44 window.onload = drag;
45 }
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698