Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Alberto Corona
5e863f2eb8
Implement HTMLTextArea.setSelectionRange
2016-04-17 17:27:26 +02:00
Matt Brubeck
deca979967
TextInput::max_length should be in code units, not bytes
2016-04-02 07:33:53 -07:00
Matt Brubeck
29fb3f1150
Find the correct column index in adjust_vertical
2016-04-01 14:00:50 -07:00
Matt Brubeck
d7e6f8b0f1
Use correct byte indices in replace_selection
2016-04-01 13:54:02 -07:00
Matt Brubeck
db2c1841cb
Fix delete_char when selection range is empty
...
An empty selection range should be treated the same as no selection.
Fixes browserhtml/browserhtml#930 .
2016-03-25 08:39:53 -07:00
Sam Gibson
2ba1750c40
Resolves long-running merge conflicts
2015-12-03 14:00:53 +11:00
Sam Gibson
419a26e619
Adds a test for set_content to ignore max_length
2015-12-03 14:00:53 +11:00
Sam Gibson
d26c555e2a
Adds support for input element's maxlength attr
...
servo/servo#7320
servo/servo#7004
2015-12-03 14:00:51 +11:00
Alan Jeffrey
84bde75b42
Replaced DOMString constructor by conversion functions.
...
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Ms2ger
6b75078503
Make DOMString a newtype around String, rather than a typedef.
...
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
Ms2ger
dab3926622
Create a helper function to create TextInput structs in its unit test.
2015-11-04 12:09:09 +01:00
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
bors-servo
4404809e6d
Auto merge of #7459 - Mylainos:Issue-#7365, r=jdm
...
Issue #7365 : test cursor position after clearing selection
In textinput test if the cursor is at the correct position when clearing a selection by press an arrow key.
edit_point is always at the end of the selection, should I test when it's at the beginning ?
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7459 )
<!-- Reviewable:end -->
2015-09-01 09:23:12 -06:00
erneyja
17663315dd
make test-tidy check that = have space after them
2015-09-01 07:18:19 -04:00
Hugo Thiessard
6a2ae236d4
Issue #7365 : test for cursor position after clearing selection
2015-08-31 09:10:34 +02:00
Simon Sapin
95a252a650
Refactor script::textinput to count UTF-8 bytes rather than code points.
2015-08-28 11:57:40 +02:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Avi Weinstock
f86252a60b
Add set_clipboard_context function and relevant plumbing. Use Option more consistantly (less unwraps) in textinput's selection handling.
2015-07-29 12:19:37 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Avi Weinstock
d054946f7d
Fix test_clipboard_paste to pass on Mac OS.
2015-05-06 15:30:29 -04:00
Avi Weinstock
b742eeca05
Made the clipboard-related functionality in TextInput more testable. Added test_clipboard_paste to the "test-unit" suite.
2015-05-06 11:46:18 -04:00
Avi Weinstock
cf6aef5d51
Make the channel argument to TextInput::new be optional, to support the signature expected by the unit tests.
2015-04-21 15:18:23 -04:00
Simon Sapin
3b1cfe8458
Add license headers in tests/unit
2015-04-08 01:07:55 +02:00
Simon Sapin
dc431c9bdb
Move script crate unit tests into the unit_tests crate.
2015-04-08 01:07:53 +02:00