OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 var textinput_helper = { | 4 var textinput_helper = { |
5 retrieveElementCoordinate: function(id) { | 5 retrieveElementCoordinate: function(id) { |
6 var ele = document.getElementById(id); | 6 var ele = document.getElementById(id); |
7 var coordinate = ele.offsetLeft + ',' + ele.offsetTop + ',' + | 7 var coordinate = Math.floor(ele.offsetLeft) + ',' + |
8 ele.offsetWidth + ',' + ele.offsetHeight; | 8 Math.floor(ele.offsetTop) + ',' + |
| 9 Math.ceil(ele.offsetWidth) + ',' + |
| 10 Math.ceil(ele.offsetHeight); |
9 window.domAutomationController.send(coordinate); | 11 window.domAutomationController.send(coordinate); |
10 } | 12 } |
11 }; | 13 }; |
OLD | NEW |