aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-03 13:30:30 +0200
committerMs2ger <ms2ger@gmail.com>2015-04-03 20:47:53 +0200
commitc2e81be8a59cea5e58ebc3c3d05141c5ab023a46 (patch)
tree266ff3be76ad65d37921b744d535537884824fc1 /components/script/textinput.rs
parent74f8c0eeb714fb7ca7964b36f1b82849e8a345ee (diff)
downloadservo-c2e81be8a59cea5e58ebc3c3d05141c5ab023a46.tar.gz
servo-c2e81be8a59cea5e58ebc3c3d05141c5ab023a46.zip
Stop using int/uint in script.
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r--components/script/textinput.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs
index 470257495b9..8239c08c58f 100644
--- a/components/script/textinput.rs
+++ b/components/script/textinput.rs
@@ -225,9 +225,9 @@ impl TextInput {
if adjust.abs() as usize > remaining && self.edit_point.line > 0 {
self.adjust_vertical(-1, select);
self.edit_point.index = self.current_line_length();
- self.adjust_horizontal(adjust + remaining as int + 1, select);
+ self.adjust_horizontal(adjust + remaining as isize + 1, select);
} else {
- self.edit_point.index = max(0, self.edit_point.index as int + adjust) as usize;
+ self.edit_point.index = max(0, self.edit_point.index as isize + adjust) as usize;
}
} else {
let remaining = self.current_line_length() - self.edit_point.index;
@@ -235,7 +235,7 @@ impl TextInput {
self.adjust_vertical(1, select);
self.edit_point.index = 0;
// one shift is consumed by the change of line, hence the -1
- self.adjust_horizontal(adjust - remaining as int - 1, select);
+ self.adjust_horizontal(adjust - remaining as isize - 1, select);
} else {
self.edit_point.index = min(self.current_line_length(),
self.edit_point.index + adjust as usize);