Commit graph

66 commits

Author SHA1 Message Date
Ms2ger
190438fa42 servo: Merge #4682 - Move to to_owned rather than into_string (from servo:to_owned); r=jdm
into_string has been removed from Rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997
2015-01-20 07:54:46 -07:00
Peter Reid
0c85b08173 servo: Merge #4648 - Fix TextInput's edit point after set_content: #4622 (from PeterReid:issue4662); r=jdm
Fixes #4622

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.

The "if" removed here was introduced in f686943eb40aa25e0a06837eeae6a907d9617d2b to fix a crash, but the underlying reason for the crash was the incorrect "- 1", which has been there since the beginning ( 80764f65e3e4895d3a012d6bc1d3bb8183ae15da ).

Source-Repo: https://github.com/servo/servo
Source-Revision: 9844ec907e61793eee442d0f18c80c7c6e9534b2
2015-01-18 09:39:48 -07:00
donaldpipowitch
5772e5d785 servo: Merge #4569 - added unit tests for TextInput - fixes #4352 (from donaldpipowitch:add-unit-tests-for-textinput); r=jdm
Please bear with me. This is the first Rust code I've ever written and the first systems programming language I've ever used.

I've added unit tests for all methods of TextInput ( - except `handle_keydown`). I probably didn't cover all cases - I don't know if this is a real requirement until we have some coverage tools which identify all missing cases easily.
If someone could show me how to create a `KeyboardEvent` easily I could add another test for `handle_keydown`.

Other questions:
1. Running `$ time ./mach test-unit -c script test_textinput` takes `3m29.536s` on my MacBook Pro (2012). Any hints on speeding this up?
2. Who is responsible for the feedback of the unit tests? It would be nice if the output could be colored (e.g. make `11 passed;` green, `0 failed;` red and so on.)

Source-Repo: https://github.com/servo/servo
Source-Revision: e7d79842a85dfa8eaee8c2f441977edbf061bbed
2015-01-16 08:18:46 -07:00
Matt McCoy
f5bacd07b5 servo: Merge #4579 - Replaces the boolean argument of functions in TextInput with enum (from mattnenterprise:textinput-select-refactor); r=jdm
Fixes #4573 Replaces the boolean argument of TextInput::adjust[horizontal | vertical] with enum to self document the code

Source-Repo: https://github.com/servo/servo
Source-Revision: 3e8cab758e3154d0df91aa4c4e1f8a22093ddeb2
2015-01-09 05:24:50 -07:00
Ms2ger
e5578c14fd servo: Merge #4554 - Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19 (from servo:rustup_20141221); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1d7148c79f9124779a910fd5291c5fa0543b2dae
2015-01-08 08:00:57 -07:00
Manish Goregaokar
905ce805f5 servo: Merge #4485 - Replace most to_string calls by into_string calls (from servo:into_string); r=Ms2ger
`str::to_string()` goes through a `Formatter`, `str::into_string()` is a direct copy and is apparently 5× faster.

This is a rebase of the boring and bitrot-prone parts of #4366.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9857ea26cb9ee262654bee97322dbbf373486bff
2014-12-27 06:51:44 -07:00
James Moughan
7784885056 servo: Merge #4457 - Select all input text on ctr+a #4411 (from jamougha:master); r=jdm
Fixes #4411.

I didn't find any tests for the text control functionality so I didn't write any for this, let me know if I should.

Source-Repo: https://github.com/servo/servo
Source-Revision: 71b9f17b6b1695c08036f688249b486fa58c25c9
2014-12-23 23:45:45 -07:00
Emanuel Rylke
73f0957834 servo: Merge #4456 - On left/right keydown place edit_point correctly when there is a selection in TextInput (from ema-fox:textinput_selection); r=jdm
Fixes #4447

Source-Repo: https://github.com/servo/servo
Source-Revision: bde6c39192faaab3c6e77fd5ea81605673477bac
2014-12-21 07:24:44 -07:00
Glenn Watson
b185394a0f servo: Merge #4405 - Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d (from servo:rustup_20141124); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fbf42c951b2f53d91e2f32f8035484a07ea83493
2014-12-17 18:45:49 -07:00
Matthew Rasmus
4f922915fe servo: Merge #4133 - Implements basic form resetting (from mttr:form_resetting); r=jdm
We can reset `<input type=text>` fields! I wish I could've done something with checkboxes, but unfortunately, that's it for now.

In addition to that, this PR implements `HTMLInputAttribute.defaultValue`, updates wpt-test to expect passing tests as a result of that implementation, and fixes an index error crash with text inputs.

edit: also includes an html example where one may lazily watch form resets in action: ` tests/html/form_reset_handsfree.html`

Source-Repo: https://github.com/servo/servo
Source-Revision: 5951056973fc0e08e70224214740a274ca8ef20f
2014-12-16 15:03:49 -07:00
Rohan Prinja
996bde0a5f servo: Merge #4273 - some fixes for multiple-mode textinput (from ajnirp:multiple-line-textintput); r=Manishearth
#4258

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ce37636b15346b6672fff4da4698e418d4d9436
2014-12-11 16:22:07 -07:00
Emanuel Rylke
40deabd7f7 servo: Merge #4284 - Implement selection ranges and deletion of \n for TextInput (from ema-fox:textinput_selection); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b64bb47e9d7eea0402493abd12b9ea645cc8e083
2014-12-08 14:25:07 -07:00
Emanuel Rylke
7dd64bc9f1 servo: Merge #4267 - Implement Page(Up|Down) functionality for TextInput and bugfix (from ema-fox:textinput); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 9ac817523c463f2e64a73fef069316f7976063e8
2014-12-08 09:04:14 -07:00
Emanuel Rylke
a62c09aa62 servo: Merge #4255 - Make TextInput correctly handle multibyte chars (from ema-fox:textinput); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 58f9b4ad9601f2e6b641ba660247a01d5068c158
2014-12-05 13:16:12 -07:00
Rohan Prinja
aa333c94a9 servo: Merge #4247 - allow deleting last char (from ajnirp:delete-one-char); r=jdm
fix #4243

Source-Repo: https://github.com/servo/servo
Source-Revision: c6aadc5bcc8fccf8a6d4bc41d2b48279fa47c4e5
2014-12-05 08:43:12 -07:00
Josh Matthews
4d3016e023 servo: Merge #3585 - Implement single-line text input (from jdm:input); r=gw
This attempts to implement a bunch of the DOM Level 3 Events spec by implementing the KeyboardEvent interface, the document focus context, and dispatching keyup/keydown/keypress events appropriately. There's also some support for multiline text input that's untested.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2ffa845cf463b14b19322d477a77ffd20efa89a9
2014-11-13 10:57:33 -07:00