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

Unified Diff: LayoutTests/fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html

Issue 14598021: Correct the (x, y) position of dragstart event initiated by touch event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html
diff --git a/LayoutTests/fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html b/LayoutTests/fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html
index 9e6244713895a1950aa6d7b514b6cd5699cbf102..cdf02b00d37e584ba0547845ad763f6d80c54a5c 100644
--- a/LayoutTests/fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html
+++ b/LayoutTests/fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html
@@ -18,14 +18,17 @@ function test()
if (window.internals)
internals.settings.setTouchDragDropEnabled(true);
- document.ondragstart = function() { document.getElementById("dragResult").innerHTML = "PASS"; }
- document.onmousedown = function() { document.getElementById("mouseDownResult").innerHTML = "FAIL"; }
-
var dragableDiv = document.getElementById("draggableDiv");
var x = draggableDiv.offsetParent.offsetLeft + draggableDiv.offsetLeft + 4;
var y = draggableDiv.offsetParent.offsetTop + draggableDiv.offsetTop + draggableDiv.offsetHeight / 2;
+ document.ondragstart = function(e) {
+ if (e.x == x && e.y == y)
+ document.getElementById("dragResult").innerHTML = "PASS";
+ }
hayato 2013/05/20 08:12:31 Could you add a semicolon at the end of line?
Hongbo Min 2013/05/20 09:21:26 Done. But I am wondering that is it enforced by J
hayato 2013/05/20 09:28:15 Thank you. I don't know whether there is a coding
+ document.onmousedown = function() { document.getElementById("mouseDownResult").innerHTML = "FAIL"; }
hayato 2013/05/20 08:12:31 Ditto.
Hongbo Min 2013/05/20 09:21:26 Done.
+
if (!window.eventSender)
return;
if (eventSender.gestureLongPress) {
« no previous file with comments | « no previous file | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698