aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Upgrade to rustc 1.22.0-nightly (c6884b12d 2017-09-30)Simon Sapin2017-10-011-1/+1
| | | | A new `AddAssign` impl in the standard library made inference ambiguous.
* order derivable traits listsClément DAVID2017-08-231-6/+6
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Bring back clipboard supportest312017-06-011-3/+3
|
* [script/textinput] Fix warning: unreachable patternBehnam Esfahbod2017-05-241-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The `cfg` attribute in use resulted in two match arms for two cases on `macos`. Since both arms had a main functionality in common, I merged them and conditions the extra `macos` part. ``` warning: unreachable pattern --> /Users/behnam/code/servo/servo/components/script/textinput.rs:696:13 | 696 | (None, Key::Home) => { | ^^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_patterns)] on by default warning: unreachable pattern --> /Users/behnam/code/servo/servo/components/script/textinput.rs:700:13 | 700 | (None, Key::End) => { | ^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_patterns)] on by default ```
* Auto merge of #15822 - charlesvdv:unicode-panic, r=emiliobors-servo2017-04-161-6/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct unicode handling for text input <!-- Please describe your changes on the following line: --> Allow proprer handling of unicode sequence in text input. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #15819 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15822) <!-- Reviewable:end -->
| * Correct unicode handling for text inputCharles Vandevoorde2017-03-051-6/+13
| |
* | new keyboard shortcuts inside text inputClement Miao2017-04-071-11/+179
|/
* Return `KeyReaction::Nothing` for a Tab eventJean-Marie Comets2016-11-121-1/+0
| | | | | | Hitting the tab key in an html text input shouldn't submit the form, and for any text input, the tab key should have a particular action associated, not the default action. This cleans up #12701.
* Implement minlength for text inputsTaryn Hill2016-09-211-0/+3
|
* Take selection direction into account when setting selectionConnor Brewster2016-07-061-2/+11
|
* Make textinput handle actual key values. Don't restrict character values to ↵Josh Matthews2016-07-061-44/+26
| | | | a single byte.
* Associate logical and physical keypresses together to support non-QWERTY ↵Josh Matthews2016-07-051-2/+2
| | | | keyboards.
* Added checks that selection is valid, and fix set_selection_range.Alan Jeffrey2016-06-291-4/+20
|
* Implement :placeholder-shown (fixes #10561)Anthony Ramine2016-06-031-0/+5
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* 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
|