aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade stylo to 2024-07-16 (#32812)Martin Robinson2024-07-241-1/+1
| | | | | | | | | | | | | | * Upgrade stylo to 2024-07-16 Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Use the new `dom` crate from stylo Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Fixed some clippy warnings in components (#32107)komuhangi2024-04-191-4/+1
| | | | | | | * Fixed some clippy warnings in components * Updated handling of NaN values in comparison * Updated formatting using ./mach fmt
* fix: omitted the `let` bindings (#31908)Azhar Ismagulova2024-03-271-1/+1
|
* clippy: fixed some warnings in components/script (#31888)Ekta Siwach2024-03-261-5/+5
|
* clippy: Fix collapsible_if warnings (#31852)Oluwatobi Sofela2024-03-251-4/+6
|
* clippy: Fix unneeded return statement warnings (#31776)Oluwatobi Sofela2024-03-201-1/+1
|
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-2/+2
|
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Further changes required by ServoOriol Brufau2023-10-021-2/+2
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-13/+14
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-1/+1
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Implement :valid :invalid pseudo classes (#26729)John Poge II2023-07-211-12/+32
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+4
|
* Further changes required by ServoOriol Brufau2023-05-191-1/+1
|
* Update document focus when element focusability changes.Josh Matthews2020-06-151-0/+1
|
* Make clicking on an element request focus for focusable elements.Josh Matthews2020-06-151-3/+1
|
* Form constraints validationteapotd2020-04-021-2/+99
|
* Introduce more layout helpers to make selection_for_layout be safeAnthony Ramine2020-04-011-6/+12
|
* Introduce <LayoutDom<Element>>::focus_stateAnthony Ramine2020-04-011-1/+1
|
* Move unsafe code out of <LayoutDom<HTMLTextAreaElement>>::value_for_layoutAnthony Ramine2020-04-011-10/+19
|
* Introduce <LayoutDom<Element>>::attrs()Anthony Ramine2020-03-311-12/+6
| | | | | | This safe method is the basic block to access element attributes from layout. We reuse it in the other attr-related layout methods to remove a pretty big source of rampant unsafe code between script and layout.
* Merge RawLayoutElementHelpers into LayoutElementHelpersAnthony Ramine2020-03-311-3/+3
|
* Make LayoutHTMLTextAreaElementHelpers::value_for_layout safeAnthony Ramine2020-03-311-13/+12
|
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Rearrange directionality algorithm functionsDmitry Kolupaev2020-02-251-6/+9
|
* Implement dirname for form submit and directionality for elementDmitry Kolupaev2020-02-251-0/+9
|
* Names should now be consistently atomsPatrick Shaughnessy2020-02-131-1/+1
|
* Labels are a live list in tree orderPatrick Shaughnessy2020-01-061-3/+3
|
* ISSUE-20455: introduce stronger types for textinput indexingThomas Delacour2019-05-161-5/+10
|
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-3/+5
| | | | Fix some is_in_doc -> is_connected mistakes
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-2/+2
|
* Auto merge of #22224 - pyfisch:composition-webdriver, r=noxbors-servo2018-11-201-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward WebDriver CompositionEvent Dispatch composition events in JS. Insert characters from composition events to text input. CompositionEvents currently can only be created by WebDriver and not by embedders. <!-- 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 - [ ] These changes do not require tests because _____ <!-- 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/22224) <!-- Reviewable:end -->
| * Forward WebDriver CompositionEventPyfisch2018-11-191-0/+17
| | | | | | | | | | | | | | | | Dispatch composition events in JS. Insert characters from composition events to text input. CompositionEvents currently can only be created by WebDriver and not by embedders.
* | Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|/
* Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-141-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* Sort `use` statementsSimon Sapin2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-27/+27
|
* Format script componentchansuke2018-09-191-68/+108
|
* textarea minLength/maxLengthtigercosmos2018-06-181-2/+47
|
* add TextLengthtigercosmos2018-06-151-0/+5
|
* support textarea clonetigercosmos2018-06-071-1/+14
|
* Correct default selectionStart and selectionEndpaavininanda2018-02-231-4/+2
|
* Revert "Correct default Selectionstart and SelectionEnd"paavininanda2018-02-231-27/+25
| | | | This reverts commit b2c1f89b932a72f9e0110c17adde33647e84c902.
* Disallow mutating the internals of TextInputJon Leighton2018-02-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The TextInput::assert_ok_selection() method is meant to ensure that we are not getting into a state where a selection refers to a location in the control's contents which doesn't exist. However, before this change we could have a situation where the internals of the TextInput are changed by another part of the code, without using its public API. This could lead to us having an invalid selection. I did manage to trigger such a situation (see the test added in this commit) although it is quite contrived. There may be others that I didn't think of, and it's also possible that future changes could introduce new cases. (Including ones which trigger panics, if indexing is used on the assumption that the selection indices are always valid.) The current HTML specification doesn't explicitly say that selectionStart/End must remain within the length of the content, but that does seems to be the consensus reached in a discussion of this: https://github.com/whatwg/html/issues/2424 The test case I've added here is currently undefined in the spec which is why I've added it in tests/wpt/mozilla.
* Correct default Selectionstart and SelectionEndpaavininanda2018-02-101-25/+30
|
* Refactor implementation of TextControlJon Leighton2018-01-301-18/+17
| | | | | | | | | | | | | | | | | The intention here is to make the flow more explicit. I.e. rather than calling `self.dom_select()` and relying on the programmer to know/realise that this method is provided by a trait, we call `self.selection().dom_select()` and the programmer can inspect the definition of `self.selection()` to follow the code. This came out of a discussion with KiChjang here: https://github.com/servo/servo/pull/19544#discussion_r156167044 Note that I tried to make "selection" be a member field of HTML{Input,TextArea}Element but it opened up a whole can of worms with lifetimes, so it seemed simpler to not do that since it is not essential for this code to work.