Commit b2120be8 authored by eae@chromium.org's avatar eae@chromium.org

Update textinput_helper.js to support subpixel coordinates

Update the textinput_helper.js text helper to support subpixel
precision for element coordinates.

R=nona@chromium.org

Review URL: https://codereview.chromium.org/309303002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274594 0039d316-1c4b-4281-b951-d872f2087c98
parent 699a0960
......@@ -4,8 +4,10 @@
var textinput_helper = {
retrieveElementCoordinate: function(id) {
var ele = document.getElementById(id);
var coordinate = ele.offsetLeft + ',' + ele.offsetTop + ',' +
ele.offsetWidth + ',' + ele.offsetHeight;
var coordinate = Math.floor(ele.offsetLeft) + ',' +
Math.floor(ele.offsetTop) + ',' +
Math.ceil(ele.offsetWidth) + ',' +
Math.ceil(ele.offsetHeight);
window.domAutomationController.send(coordinate);
}
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment