summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-06 11:45:16 +0100
committerSteve Block <steveblock@google.com>2011-05-12 13:44:10 +0100
commitcad810f21b803229eb11403f9209855525a25d57 (patch)
tree29a6fd0279be608e0fe9ffe9841f722f0f4e4269 /Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html
parent121b0cf4517156d0ac5111caf9830c51b69bae8f (diff)
downloadexternal_webkit-cad810f21b803229eb11403f9209855525a25d57.zip
external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.gz
external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.bz2
Merge WebKit at r75315: Initial merge by git.
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
Diffstat (limited to 'Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html')
-rw-r--r--Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html b/Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html
new file mode 100644
index 0000000..1d5a791
--- /dev/null
+++ b/Source/WebCore/manual-tests/drag-with-div-or-image-as-data-image.html
@@ -0,0 +1,55 @@
+<html>
+ <head>
+ <title>Test for WebKit bug 24735: Poor setDragImage support on Windows</title>
+ <style type="text/css">
+
+ .draggable {
+ -webkit-user-drag: element;
+ -webkit-user-select: none;
+ }
+
+ #linkToUseAsImage {
+ background-color: silver;
+ }
+
+ #divToUseAsImage {
+ background-color: pink;
+ }
+
+ </style>
+
+ <script type="text/javascript">
+ function dragDivAndSeeImageDragged()
+ {
+ event.dataTransfer.setDragImage(document.getElementById("imgToUseAsImage"), event.pageX, event.pageY);
+ }
+
+ function dragImageAndSeeDivDragged()
+ {
+ event.dataTransfer.setDragImage(document.getElementById("divToUseAsImage"), event.pageX, event.pageY);
+ }
+ </script>
+ </head>
+ <body >
+ <h3>Test for <a href='https://bugs.webkit.org/show_bug.cgi?id=24735'>WebKit bug 24735</a>: Poor setDragImage support on Windows</h3>
+
+ <p>Instructions: </p>
+ <p>When you drag the first div, the image under the cursor should be of the second image. </p>
+ <p>When you drag the first image, the image under the cursor should be of the second div. </p>
+
+ <br />
+ <br />
+
+ <div class="draggable" ondragstart="dragDivAndSeeImageDragged()"> Drag me, I am a div! (first div)</div>
+ <br />
+ <br />
+ <img src="resources/webkit-background.png" class="draggable" ondragstart="dragImageAndSeeDivDragged()" />
+ <br />
+ <br />
+ <img src="resources/drag-image.png" id="imgToUseAsImage" />
+ <br />
+ <br />
+ <div id="divToUseAsImage"> When a drag is started on the image, this is the div that is used as the drag image! (second div)</div>
+
+ </body>
+</html>