aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlinputelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* fix: Implement additional logic in ↵shanehandley2024-05-131-1/+7
| | | | DOMString::set_best_representation_of_the_floating_point_number in order to correct some failing tests related to -0 values. (#32272)
* Address issues uncovered by rust-1.78 beta (#32130)Martin Robinson2024-04-221-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes changes to allow Servo to compile with the 1.78 version of Rust: - Dead code is removd (Rust seems to have gotten better at detecting it). - The `FlowRef` `DerefMut` is updated according to @SimonSapin's advice [^1]. - The `imports.rs` now explicitly silences warnings about unused imports. [^1]: https://github.com/servo/servo/issues/6503#issuecomment-2066088179 <!-- 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 - [x] These changes do not require tests because they should not 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. -->
* clippy: fix several lint warns (#32126)Kitsu2024-04-221-7/+2
| | | | | | | | | | | | | | | As seems #31500 still remain opened here's the next partial fix. Fixed list: `unused_mut`, `clippy::needless_borrow`, `clippy::match_ref_pats`, `clippy::borrow_deref_ref`, `clippy::ptr_eq`, `clippy::unnecessary_cast`, `clippy::derivable_impls`, `clippy::collapsible_match`, `clippy::extra_unused_lifetimes`, `clippy::map_clone`, `clippy::manual_filter`. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes are part of #31500. - [x] These changes do not require tests because are only cosmetic.
* clippy: fix warnings in components/script (#32023)Azhar Ismagulova2024-04-091-9/+7
|
* script: Reduce the use of `unsafe` in LayoutDom (#31979)Martin Robinson2024-04-031-3/+2
| | | | | | | | | | | | | Remove the use of unsafe code in the layout wrappers of the DOM. The main change here is that `unsafe_get()` no longer needs to be an unsafe method, which allows us to transitively remove or reduce unsafe blocks from callers. The function itself is not renamed, because it's still a bit dangerous to start removing the layers of abstraction from actual DOM nodes. In addition `init_style_and_opaque_layout_data` can be merged into `initialize_data`, which removes one more unsafe method. Finally, a "Safety" section is added to some unsafe methods.
* Update webidl and implement setter for the files property of a file input ↵shanehandley2024-04-011-0/+7
| | | | | | | (#31934) The files attribute was previously readonly, but was later updated to allow mutation via input.files = ... see https://github.com/whatwg/html/issues/2861
* clippy: fixed various clippy warnings in `components/scripts` (#31960)Rosemary Ajayi2024-04-011-1/+1
| | | | | | | | | * fixed various clippy warnings * fixed various clippy warnings * fixed various clippy warnings * fixed various clippy warnings
* clippy: Fix a few problems in `components/script` (#31961)Rosemary Ajayi2024-04-011-1/+1
| | | | | * fixed various clippy warnings * fixed various clippy warnings
* clippy: Fix various clippy problems in `components/scripts/dom` (#31910)Rosemary Ajayi2024-03-311-1/+1
| | | | | | | | | | | | | | | | | * boxing is unnecessary * boxing is unnecessary * boxing is unnecessary * boxing is unnecessary * fix * fix * fix * Update globalscope.rs
* layout: Remove LayoutRPC and query layout via the `Layout` trait (#31937)Martin Robinson2024-03-291-3/+1
| | | | | | | | | | | | | | | | | Instead of the tricky `LayoutRPC` interface, query layout using the `Layout` trait. This means that now queries will requires calling layout and then running the query. During layout an enum is used to indicate what kind of layout is necessary. This change also removes the mutex-locked `rw_data` from both layout threads. It's no longer necessary since layout runs synchronously. The one downside here is that for resolved style queries, we now have to create two StyleContexts. One for layout and one for the query itself. The creation of this context should not be very expensive though. `LayoutRPC` used to be necessary because layout used to run asynchronously from script, but that no longer happens. With this change, it becomes possible to safely pass nodes to layout from script -- a cleanup that can happen in a followup change.
* clippy: Fix needless_lifetimes warnings (#31933)Oluwatobi Sofela2024-03-291-1/+1
|
* clippy: Fix len_zero warnings (#31935)Oluwatobi Sofela2024-03-291-1/+1
|
* clippy: Fix needless_borrow warnings in components/script (#31928)Azhar Ismagulova2024-03-291-2/+2
|
* clippy: Fix manual_map warnings (#31922)Oluwatobi Sofela2024-03-281-4/+1
|
* fix redundant closures in component/script/dom (#31917)Ekta Siwach2024-03-281-1/+1
| | | | | | | | | | | | | * fixed unnecessary conversions * resolved conflicts * resolved conflicts * fix redundant closures in component/script/dom * resolved conflicts * fixed formatting
* fix: omitted the `let` bindings (#31908)Azhar Ismagulova2024-03-271-3/+3
|
* clippy: Fix option_map_unit_fn warnings (#31906)Oluwatobi Sofela2024-03-271-3/+5
|
* clippy:Fix clippy problems in components/scripts/binding (#31893)Rosemary Ajayi2024-03-271-3/+3
| | | | | | | | | | | | | | | * constants have by default a static lifetime * constants have by default a static lifetime * unneeded unit expression * unneeded unit expression * Box of default value * casting raw pointers * casting raw pointers
* clippy: Fix collapsible_else_if warnings (#31853)Oluwatobi Sofela2024-03-261-5/+3
|
* fixes dereferencing on an immutable reference (#31864)Aarya Khandelwal2024-03-261-1/+1
|
* clippy: Fix collapsible_if warnings (#31852)Oluwatobi Sofela2024-03-251-16/+16
|
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-18/+18
|
* clippy: Fix `unnecessary_cast` warnings in `components/script` (#31823)Oluwatobi Sofela2024-03-221-2/+2
| | | | | | | * clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
* clippy: fix `result_unit_err` warnings (#31791)eri2024-03-211-52/+37
| | | | | | | | | | | | | | | | | * clippy: fix `result_unit_err` warnings * feat: fix result warnings in script * doc: document `generate_key` return type Co-authored-by: Martin Robinson <mrobinson@igalia.com> * feat: add back result to RangeRequestBounds::get_final Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Clippy: Fixed clippy warnings in components/script/dom (#31801)Aarya Khandelwal2024-03-211-83/+80
| | | | | | | | | * fixed clippy warnings in htmlformelement.rs * Fixed clippy warnings * Fixed warnings related to matches! * made changes to compile "test-tidy" successfully
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-2/+2
|
* clippy: Fix unneeded return statement warnings (#31776)Oluwatobi Sofela2024-03-201-3/+3
|
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-14/+11
|
* fix: resolved warning related to deprecated method ↵Azhar Ismagulova2024-03-081-2/+5
| | | | chrono::NaiveDateTime::from_timestamp_opt (#31593)
* fix: resolved warnings related to deprecated method ↵Azhar Ismagulova2024-03-081-4/+4
| | | | chrono::NaiveDateTime::timestamp_millis (#31584)
* 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-9/+9
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-36/+37
| | | | | * 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>
* Fix warnings after chrono upgrade (#30165)Martin Robinson2023-08-231-38/+48
| | | | Some functions are now deprecated, so use the suggested ones and do a general cleanup of the affected lines of code.
* 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-10/+27
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+3
|
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-1/+1
|
* Further changes required by ServoOriol Brufau2023-05-191-1/+1
|
* Make HTMLInputElement.list an HTMLDataListElement2shiori172023-03-021-6/+3
| | | | Signed-off-by: 2shiori17 <98276492+2shiori17@users.noreply.github.com>
* Update nightly rustc.Josh Matthews2021-11-011-3/+3
|
* Make hidden input _charset_ check case insensitiveVincent Ricard2020-10-091-1/+1
|
* Remove unnecessary checksVincent Ricard2020-09-241-13/+0
|
* Allow mutating <input disabled type=checkbox/radio>Vincent Ricard2020-09-241-7/+10
|
* Implement HTMLFormElement.requestSubmit()Also includes a fix for reentrant ↵Maxim Tsoy2020-07-021-0/+6
| | | | form submission behavior
* Update document focus when element focusability changes.Josh Matthews2020-06-151-0/+2
|
* Make clicking on an element request focus for focusable elements.Josh Matthews2020-06-151-1/+0
|
* Form constraints validationteapotd2020-04-021-18/+431
|
* Introduce more layout helpers to make selection_for_layout be safeAnthony Ramine2020-04-011-9/+16
|