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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/images/drag-image-transformed-parent.html
diff --git a/third_party/WebKit/LayoutTests/images/drag-image-transformed-parent.html b/third_party/WebKit/LayoutTests/images/drag-image-transformed-parent.html
new file mode 100644
index 0000000000000000000000000000000000000000..1c1e1c41cb75d5f1be06bf14377e2d1d384e3888
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/images/drag-image-transformed-parent.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<style>
+ #draggable {
+ position: relative;
+ z-index: 0;
+ width: 100px;
+ height: 100px;
+ background: red;
+ -webkit-user-drag: element;
+ }
+
+ #descendant-painting-sibling {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ background: green;
+ -webkit-user-drag: none;
+ }
+</style>
+<div style="transform: translateX(50px)">
+ <div id="draggable">
+ <div id="descendant-painting-sibling"></div>
+ </div>
+</div>
+This test passes if the generated drag image is a 100x100 green box, positioned
+without the transform.
+<script>
+ function drag() {
+ testRunner.dumpDragImage();
+
+ var image = document.getElementById('draggable');
+ var startX = 50 + image.offsetLeft + image.offsetWidth / 2;
+ var startY = image.offsetTop + image.offsetHeight / 2;
+ var positionX = startX + image.offsetWidth;
+ var positionY = startY + image.offsetHeight;
+
+ eventSender.dragMode = true;
+ eventSender.mouseMoveTo(startX, startY);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(positionX, positionY);
+ eventSender.mouseUp();
+ }
+
+ if (!window.testRunner || !window.eventSender) {
+ document.write("This test does not work in manual mode.");
+ } else {
+ window.onload = drag;
+ }
+</script>

Powered by Google App Engine
This is Rietveld 408576698