Commit graph

27 commits

Author SHA1 Message Date
Ms2ger
c2e81be8a5 Stop using int/uint in script. 2015-04-03 20:47:53 +02:00
Corey Farwell
d838fcce30 Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Josh Matthews
837be27347 Use platform-sized integers for textinput.rs 2015-02-20 16:12:58 -05:00
Ms2ger
e921ce859e Fix some warnings in script. 2015-02-12 20:05:14 +01:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
024571dfa3 Use chars().count() rather than char_len().
The latter is obsolete in current Rust.
2015-01-22 14:49:26 +01:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Peter Reid
2963caf708 Fix TextInput's edit point after set_content
Previously, when the edit point was being clamped leftward by a shortened
line, it would be placed one one character too far to the left instead of
at the very end.
2015-01-17 12:41:18 -05:00
donaldpipowitch
d0cc280119 added unit tests for TextInput - fixes #4352 2015-01-16 12:14:20 +01:00
Matt McCoy
64dda93242 Fixes #4573 Replaces the boolean argument of TextInput::adjust[horizontal|vertical] with enum to self document the code 2015-01-08 18:13:52 -05:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Manish Goregaokar
e9d1740e19 script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
James Moughan
0a6ebfa3ee Allow selection of all text in a text control using the ctrl-a/cmd-a shortcut.
Fixes #4411.
2014-12-24 00:14:17 +00:00
Emanuel Rylke
c732a779eb On left/right keydown place edit_point correctly when there is a selection in TextInput
Fixes #4447
2014-12-21 14:31:15 +01:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Matthew Rasmus
f686943eb4 Fix crash in textinput 2014-12-16 11:06:55 -08:00
Rohan Prinja
0c851d9a0c some fixes for multiple-mode textinput 2014-12-11 23:40:57 +05:30
Emanuel Rylke
29b672ded4 Implement selection ranges and deletion of \n for TextInput. 2014-12-08 17:29:38 +01:00
Emanuel Rylke
b5e7cba598 Fix bug of TextInput.adjust_horizontal causing stack overflow or wraparound
When the edit_point is in the first position of a multiline TextInput
adjust_horizontal(-1) moves the edit_point to the end of the first line.
When the first line is empty this causes a stack overflow. When the edit_point
is in the last position adjust_horizontal(1) causes a stack overflow.
2014-12-06 20:59:04 +01:00
Emanuel Rylke
f99c0e2c15 Implement Page(Up|Down) functionality for TextInput. 2014-12-06 15:34:37 +01:00
Emanuel Rylke
2ec16a0e88 Fix bug of TextInput.adjust_vertical(1) always moving to the end of text. 2014-12-06 15:34:37 +01:00
Emanuel Rylke
0316100785 Make TextInput correctly handle multibyte chars. 2014-12-05 21:02:15 +01:00
Rohan Prinja
9c26cf7ea9 allow deleting last char 2014-12-05 17:06:34 +05:30
Keegan McAllister
642a3592c7 Fix interfaces test 2014-11-13 12:53:54 -05:00
Josh Matthews
89a27dd11a More documentation. 2014-11-13 12:53:54 -05:00
Josh Matthews
80764f65e3 Add single-line text input with no visible cursor. 2014-11-13 12:53:54 -05:00