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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function $(id) { 1 function $(id) {
2 return document.getElementById(id); 2 return document.getElementById(id);
3 } 3 }
4 4
5 function getValidationMessageBubbleNode(host) { 5 function getValidationMessageBubbleNode(host) {
6 // FIXME: We should search for a pseudo ID. 6 // FIXME: We should search for a pseudo ID.
7 return internals.shadowRoot(host).lastChild; 7 return internals.shadowRoot(host).lastChild;
8 } 8 }
9 9
10 function getAbsoluteRect(element) { 10 function getAbsoluteRect(element) {
11 var rect = element.getBoundingClientRect(); 11 var rect = element.getBoundingClientRect();
12 rect.top += document.body.scrollTop; 12 rect.top += document.body.scrollTop;
13 rect.bottom += document.body.scrollTop; 13 rect.bottom += document.body.scrollTop;
14 rect.left += document.body.scrollLeft; 14 rect.left += document.body.scrollLeft;
15 rect.right += document.body.scrollLeft; 15 rect.right += document.body.scrollLeft;
16 return rect; 16 return rect;
17 } 17 }
18 18
19 function searchCancelButtonPosition(element) { 19 function searchCancelButtonPosition(element) {
20 var pos = {}; 20 var pos = {};
21 pos.x = element.offsetLeft + element.offsetWidth - 9; 21 pos.x = element.offsetLeft + element.offsetWidth - 9;
22 pos.y = element.offsetTop + element.offsetHeight / 2; 22 pos.y = element.offsetTop + element.offsetHeight / 2;
23 return pos; 23 return pos;
24 } 24 }
25
26 function mouseMoveToIndexInListbox(index, listboxId) {
27 var listbox = document.getElementById(listboxId);
28 var itemHeight = Math.floor(listbox.offsetHeight / listbox.size);
29 var border = 1;
30 var y = border + index * itemHeight;
31 if (window.eventSender)
32 eventSender.mouseMoveTo(listbox.offsetLeft + border, listbox.offsetTop + y - window.pageYOffset);
33 }
OLDNEW
« 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