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

Unified Diff: LayoutTests/fast/forms/resources/common.js

Issue 9285007: Merge 105386 - REGRESSION(r100111): A 'change' event does not fire when a mouse drag (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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 | LayoutTests/fast/forms/select/listbox-drag-in-non-multiple.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/resources/common.js
===================================================================
--- LayoutTests/fast/forms/resources/common.js (revision 105691)
+++ LayoutTests/fast/forms/resources/common.js (working copy)
@@ -22,3 +22,12 @@
pos.y = element.offsetTop + element.offsetHeight / 2;
return pos;
}
+
+function mouseMoveToIndexInListbox(index, listboxId) {
+ var listbox = document.getElementById(listboxId);
+ var itemHeight = Math.floor(listbox.offsetHeight / listbox.size);
+ var border = 1;
+ var y = border + index * itemHeight;
+ if (window.eventSender)
+ eventSender.mouseMoveTo(listbox.offsetLeft + border, listbox.offsetTop + y - window.pageYOffset);
+}
« no previous file with comments | « no previous file | LayoutTests/fast/forms/select/listbox-drag-in-non-multiple.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698