aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-9/+8
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-8/+9
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Auto merge of #18933 - mrobinson:wr-text-index, r=jdmbors-servo2017-10-191-18/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use WebRender to compute text index on click events This is the second half of switching over to WebRender for hit testing. Now that WebRender gives us the location of the hit tested point in the display item, we can use that to calculate text index. <!-- Please describe your changes on the following line: --> --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they shouldn't change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/18933) <!-- Reviewable:end -->
| * Use WebRender to compute text index on click eventsMartin Robinson2017-10-181-18/+12
| | | | | | | | | | | | This is the second half of switching over to WebRender for hit testing. Now that WebRender gives us the location of the hit tested point in the display item, we can use that to calculate text index.
* | Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-1/+1
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Change AttrValue::Url to AttrValue::ResolvedUrlAnthony Ramine2017-10-151-2/+1
| | | | | There is actually only one attribute that can use that, the one for <body background>.
* Fix the form action IDL attributesAnthony Ramine2017-10-111-1/+1
| | | | | The returned string, if the attribute is present and non-empty, should be a URL resolved against the element's document's base URL.
* Fix URL attributesAnthony Ramine2017-10-111-0/+1
| | | | | URL attributes should always use AttrValue::Url, and the input should be resolved against the document's base URL at setting time always.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-12/+12
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-7/+7
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename LayoutJS<T> to LayoutDom<T>Anthony Ramine2017-09-261-4/+4
|
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-4/+4
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* make use of ScriptToConstellationChanPaul Rouget2017-08-151-6/+6
|
* Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-031-1/+1
|\
| * Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
| |
* | Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-031-3/+3
|/
* Auto merge of #15822 - charlesvdv:unicode-panic, r=emiliobors-servo2017-04-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| |
* | Implement the form owner conceptMukilan Thiyagarajan2017-03-151-2/+19
|/
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Position insertion point in input field with mouseFlorian Merz2017-01-111-0/+31
|
* Fire 'input' event after 'keypress' in input and textarea elementsRavi Shankar2016-12-271-12/+13
|
* Allow 'keypress' event to emerge from input and textarea elementsRavi Shankar2016-12-271-2/+2
|
* Remove HeapGCValueAnthony Ramine2016-12-121-3/+3
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Auto merge of #13969 - bbansalWolfPack:master, r=jdmbors-servo2016-11-251-1/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | html form validation initial steps with test html file <!-- Please describe your changes on the following line: --> Added code for initial steps in html form validation. 1. Added methods for trait validatable 2. implemented stub methods for elements like HTMLInputElement, HTMLButtonElement, etc <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- 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/13969) <!-- Reviewable:end -->
| * html form validation initial steps with test html file, added stub methods, ↵Bhavya Bansal2016-11-231-1/+11
| | | | | | | | added code to handle validations
* | Return `KeyReaction::Nothing` for a Tab eventJean-Marie Comets2016-11-121-13/+4
| | | | | | | | | | | | 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.
* | Migrate `EventTarget` event firing functions to use `Atom`s.Corey Farwell2016-11-031-4/+4
| | | | | | | | This allows us to utilize more `atom` macros.
* | Remove "fire a simple event" concept, refactor event firing API.Corey Farwell2016-11-031-12/+4
| | | | | | | | | | "fire a simple event" concept was removed in https://github.com/whatwg/html/pull/1933.
* | Update to string-cache 0.3Simon Sapin2016-11-031-27/+28
|/
* Make make_enumerated_getter prettier again.Corey Farwell2016-10-121-9/+9
| | | | Fixes https://github.com/servo/servo/issues/4723.
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-10/+10
|
* Introduce GlobalScope::resource_threadsAnthony Ramine2016-10-061-1/+1
|
* Introduce GlobalScope::constellation_chanAnthony Ramine2016-10-061-1/+2
|
* Implement minlength for text inputsTaryn Hill2016-09-211-2/+29
|
* Most of the code refactoring needed to be done is done with this commit.Arthur Marble2016-09-181-4/+4
|
* Refactored metaKey to meta_key where possibleArthur Marble2016-09-171-2/+2
|
* This commit refactors altKey to alt_key when possible.Arthur Marble2016-09-171-2/+2
|
* This commit refactors shiftKey to shift_key where possible.Arthur Marble2016-09-171-2/+2
|
* This commit refactors ctrlKey to ctrl_key wherever possible.Arthur Marble2016-09-171-2/+2
|
* Reorder `use` statementsUK9922016-09-091-5/+5
|
* Add cancellability to file manager load and related refactoringZhen Zhang2016-08-021-4/+4
|
* Add form submission for file type input and related fixingsZhen Zhang2016-08-021-7/+36
|
* Put Blob URL onlineZhen Zhang2016-07-151-15/+9
|
* Inline DOM element creation into box expressions in components/script/dom/Kuba Birecki2016-07-141-2/+3
|