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

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..55648481beed85f1cde5ccd5fb279c5568f02d5e 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";
+ };
+ document.onmousedown = function() { document.getElementById("mouseDownResult").innerHTML = "FAIL"; };
+
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