aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace range::Range with std::ops::Range in scriptMatt Brubeck2016-04-281-10/+7
|
* Implement HTMLTextArea.setSelectionRangeAlberto Corona2016-04-171-3/+62
|
* TextInput::max_length should be in code units, not bytesMatt Brubeck2016-04-021-31/+71
|
* Find the correct column index in adjust_verticalMatt Brubeck2016-04-011-1/+4
|
* Add/correct documentation comments in textinputMatt Brubeck2016-04-011-2/+9
|
* Use correct byte indices in replace_selectionMatt Brubeck2016-04-011-3/+13
|
* Auto merge of #10182 - mbrubeck:delete_char, r=jdmbors-servo2016-03-281-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Fix delete_char when selection range is empty An empty selection range should be treated the same as no selection. Fixes browserhtml/browserhtml#930. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10182) <!-- Reviewable:end -->
| * Fix delete_char when selection range is emptyMatt Brubeck2016-03-251-2/+2
| | | | | | | | | | An empty selection range should be treated the same as no selection. Fixes browserhtml/browserhtml#930.
* | Highlight selected text in input fieldsMatt Brubeck2016-03-241-0/+10
|/ | | | | Fixes #9993. This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
* Resets selection in textinput when its content is changed.Saurav Sachidanand2016-03-161-0/+1
| | | | Adds a wpt test as well.
* Implement input.setSelectionRangeSaurav Sachidanand2016-03-101-3/+31
|
* Say farewell to in-tree HeapSizeOfAnthony Ramine2016-02-041-1/+0
|
* Fix warnings: Use Vec.extend_from_slice instead of Vec.push_allTetsuharu OHZEKI2015-12-101-3/+3
|
* Adds support for input element's maxlength attrSam Gibson2015-12-031-5/+47
| | | | | servo/servo#7320 servo/servo#7004
* Added in-place mutation to DOMString.Alan Jeffrey2015-11-121-1/+3
| | | | | The methods which are currently implemented are the ones on String that are currently being used: string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-5/+5
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-7/+7
| | | | | | | | | | 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.
* Use DOMString::new() somewhat consistently.Ms2ger2015-11-041-1/+1
|
* display input caret for textarea. fixes #7758Florian Merz2015-10-211-0/+10
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+2
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-3/+2
| | | | This merges import blocks that were reported by tidy as unmerged.
* script: Ask layout to redraw the selection whenever the user moves thePatrick Walton2015-09-171-9/+10
| | | | caret in an input element.
* Fix reported test-tidy errorsBrandon Fairchild2015-09-011-1/+1
| | | | | This fixes lines that were reported to have missing space after a comma.
* make test-tidy check that = have space after themerneyja2015-09-011-2/+2
|
* Refactor script::textinput to count UTF-8 bytes rather than code points.Simon Sapin2015-08-281-26/+64
|
* Remove helper traitsAnthony Ramine2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that JSRef<T> is gone, there is no need to have helper traits. On components/script/*.rs: # Remove imports. /^ *use dom::[a-z]+::\{.*Helpers/ { s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/ s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d On components/script/dom/*.rs: # Ignore layout things. /^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; } # Delete helpers traits. /^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D # Patch private helpers. /^impl.*Private.*Helpers/,/^\}$/ { s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/ } # Patch public helpers. /^impl.*Helpers/,/^\}$/ { s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/ /^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/ } The few error cases were then fixed by hand.
* sort all usesJohann Tuffe2015-08-201-1/+1
|
* Cleanup textinput, timersManish Goregaokar2015-08-181-3/+4
|
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-2/+4
|
* Use local slice_charsJack Moffitt2015-07-311-6/+6
| | | | | | | StrExt::slice_chars is deprecated and will be removed in Rust. This lifts the implementation from Rust libstd and puts it in util::str. This fixes a bunch of deprecation warnings in Servo.
* Update rust-clipboard to the version with working set_contents.Avi Weinstock2015-07-291-1/+0
|
* Add set_clipboard_context function and relevant plumbing. Use Option more ↵Avi Weinstock2015-07-291-42/+68
| | | | consistantly (less unwraps) in textinput's selection handling.
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-3/+2
| | | | fixes #6524
* Upgrade to SM 39Michael Wu2015-06-191-2/+1
|
* Remove some unnecessary allocations in text input handling.Avi Weinstock2015-06-111-10/+6
|
* Remove `get_` prefix on gettersCorey Farwell2015-06-021-1/+1
| | | | | | Part of #6224 I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
* Change the dispatch in TextInput::handle_keydown_aux match on enum values ↵Avi Weinstock2015-05-061-19/+36
| | | | instead of strings.
* Made the clipboard-related functionality in TextInput more testable. Added ↵Avi Weinstock2015-05-061-38/+32
| | | | test_clipboard_paste to the "test-unit" suite.
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-2/+1
|
* Implement Clone for Copy types.Ms2ger2015-04-281-2/+2
|
* Remove as_slice() calls from script.Ms2ger2015-04-261-2/+2
|
* Make the channel argument to TextInput::new be optional, to support the ↵Avi Weinstock2015-04-211-5/+10
| | | | signature expected by the unit tests.
* Moved clipboard integration from textinput to constellation, to facilitate ↵Avi Weinstock2015-04-211-9/+9
| | | | sandboxing.
* Implement X11 clipboard integration (Issue #5376).Avi Weinstock2015-04-211-1/+22
|
* Move script crate unit tests into the unit_tests crate.Simon Sapin2015-04-081-172/+16
|
* Stop using int/uint in script.Ms2ger2015-04-031-3/+3
|
* Remove some unnecessary uses of `as_slice`Corey Farwell2015-03-291-18/+18
| | | | | | | | | | | 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
* Use platform-sized integers for textinput.rsJosh Matthews2015-02-201-12/+12
|
* Fix some warnings in script.Ms2ger2015-02-121-2/+2
|
* Import the util crate as util rather than servo_util.Ms2ger2015-01-291-1/+1
| | | | | | | | 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.