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

Unified Diff: chrome/test/data/textinput/textinput_helper.js

Issue 309303002: Update textinput_helper.js to support subpixel coordinates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/textinput/textinput_helper.js
diff --git a/chrome/test/data/textinput/textinput_helper.js b/chrome/test/data/textinput/textinput_helper.js
index 6ce4db1b953778260182dd88219309bc61d6d891..8a88d209d809e15f922a5bbf6db83280a0fbf232 100644
--- a/chrome/test/data/textinput/textinput_helper.js
+++ b/chrome/test/data/textinput/textinput_helper.js
@@ -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);
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698