OLD | NEW |
1 function $(id) { | 1 function $(id) { |
2 return document.getElementById(id); | 2 return document.getElementById(id); |
3 } | 3 } |
4 | 4 |
5 function createFormControlDataSet() { | 5 function createFormControlDataSet() { |
6 // A list of labelable elements resides in http://www.whatwg.org/specs/web-a
pps/current-work/multipage/forms.html#category-label | 6 // A list of labelable elements resides in http://www.whatwg.org/specs/web-a
pps/current-work/multipage/forms.html#category-label |
7 var formControlClassNames = [ | 7 var formControlClassNames = [ |
8 'HTMLButtonElement', | 8 'HTMLButtonElement', |
9 'HTMLDataListElement', | 9 'HTMLDataListElement', |
10 'HTMLFieldSetElement', | 10 'HTMLFieldSetElement', |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return rect; | 95 return rect; |
96 } | 96 } |
97 | 97 |
98 function searchCancelButtonPosition(element) { | 98 function searchCancelButtonPosition(element) { |
99 var pos = {}; | 99 var pos = {}; |
100 pos.x = element.offsetLeft + element.offsetWidth - 9; | 100 pos.x = element.offsetLeft + element.offsetWidth - 9; |
101 pos.y = element.offsetTop + element.offsetHeight / 2; | 101 pos.y = element.offsetTop + element.offsetHeight / 2; |
102 return pos; | 102 return pos; |
103 } | 103 } |
104 | 104 |
| 105 function searchCancelButtonPositionRTL(element) { |
| 106 var pos = {}; |
| 107 pos.x = element.offsetLeft + 9; |
| 108 pos.y = element.offsetTop + element.offsetHeight / 2; |
| 109 return pos; |
| 110 } |
| 111 |
105 function mouseMoveToIndexInListbox(index, listboxId) { | 112 function mouseMoveToIndexInListbox(index, listboxId) { |
106 var listbox = document.getElementById(listboxId); | 113 var listbox = document.getElementById(listboxId); |
107 var itemHeight = Math.floor(listbox.offsetHeight / listbox.size); | 114 var itemHeight = Math.floor(listbox.offsetHeight / listbox.size); |
108 var border = 1; | 115 var border = 1; |
109 var y = border + index * itemHeight; | 116 var y = border + index * itemHeight; |
110 if (window.eventSender) | 117 if (window.eventSender) |
111 eventSender.mouseMoveTo(listbox.offsetLeft + border, listbox.offsetTop +
y - window.pageYOffset); | 118 eventSender.mouseMoveTo(listbox.offsetLeft + border, listbox.offsetTop +
y - window.pageYOffset); |
112 } | 119 } |
113 | 120 |
114 function getUserAgentShadowTextContent(element) { | 121 function getUserAgentShadowTextContent(element) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 if (!window.internals) | 179 if (!window.internals) |
173 return null; | 180 return null; |
174 var node = root; | 181 var node = root; |
175 while (node) { | 182 while (node) { |
176 if (node.nodeType === Node.ELEMENT_NODE && internals.shadowPseudoId(node
) === pseudoId) | 183 if (node.nodeType === Node.ELEMENT_NODE && internals.shadowPseudoId(node
) === pseudoId) |
177 return node; | 184 return node; |
178 node = traverseNextNode(node, root); | 185 node = traverseNextNode(node, root); |
179 } | 186 } |
180 return null; | 187 return null; |
181 } | 188 } |
OLD | NEW |