aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlformelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement form-associated custom elements and their ElementInternals (#31980)cathiechen2024-04-111-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * FACEs work, setFormValue test is awful so now has _mozilla backup * 1. Impl Validatable in ElementInternals instead of HTMLElement. 2. Reuse the code in Validatable trait. 3. The form associated custom element is not a customized built-in element. * add some comments * support readonly attribute and complete barred from constraint validation * Addressed the code review comments * Updated the legacy-layout results * Fixed the WPT failures in ElementInternals-validation.html * Addressed the code review comments * Review suggestions * Fixed silly mistakes and update the test result outside elementinternals * update the test results --------- Co-authored-by: Patrick Shaughnessy <pshaughn@comcast.net> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Clippy: Fix the error of variants having the same prefix. (#31953)Aarya Khandelwal2024-04-051-14/+12
| | | | | | | | | | | | | | | | | | | * fix error: all variants have same prefix * made the suggested changes * fixed errors caused by commit * silenced the clippy warning. * ran ./mach fmt * Update components/script/dom/htmlmediaelement.rs Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
* 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
* clippy: Fix option_as_ref_deref warnings (#31936)Oluwatobi Sofela2024-03-291-1/+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
* clippy: Fix all errors in `components/script` (#31911)Azhar Ismagulova2024-03-281-3/+3
| | | | | * clippy: Fix errors in components/script/dom * clippy: fixed remaining errors in components/script
* clippy: Fix op_ref warnings (#31900)Oluwatobi Sofela2024-03-271-5/+1
|
* clippy:Fix clippy problems in components/scripts/binding (#31893)Rosemary Ajayi2024-03-271-1/+0
| | | | | | | | | | | | | | | * 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-10/+9
|
* fixed the `unneeded return` statement warnings. (#31863)Aarya Khandelwal2024-03-261-1/+1
|
* clippy: Fix collapsible_if warnings (#31852)Oluwatobi Sofela2024-03-251-20/+17
|
* Clippy: Fixed some clippy warnings (#31818)Aarya Khandelwal2024-03-231-12/+9
| | | | | | | | | | | * Fixed clippy warnings * made changes for lowercase characters. * changed is_lowercase() to is_ascii_lowercase() * added std library function `is_ascii_uppercase()` and `is_ascii_lowercase()` * made recommended changes
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-3/+3
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* clippy: Fix `unnecessary_cast` warnings in `components/script` (#31823)Oluwatobi Sofela2024-03-221-1/+1
| | | | | | | * clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
* Fixed the .clone() warnings. (#31819)Aarya Khandelwal2024-03-221-1/+1
|
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-5/+5
|
* Clippy: Fixed clippy warnings in components/script/dom (#31801)Aarya Khandelwal2024-03-211-7/+7
| | | | | | | | | * 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-1/+1
|
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-3/+3
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* script: Start replacing `time` with `std::time` and `chrono` (#30639)Auguste Baum2024-01-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace `time` with `chrono` in `script/animation_timeline` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/script_thread.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` and `chrono` in `script/script_thread.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/script_runtime.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/script_runtime.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/workerglobalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `chrono` in `script/dom/workerglobalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlmedialelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlmedialelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/globalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `chrono` in `script/dom/globalscope.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlformelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Replace `time` with `std::time` in `script/dom/htmlformelement.rs` Signed-off-by: Auguste Baum <auguste.apple@gmail.com> * Increase precision of animation timeline * Some fixes Use Instant a bit more and stop using chrono. Do not transition `navigation_start_precise` to Instant yet as we need to coordinate this across all crates. --------- Signed-off-by: Auguste Baum <auguste.apple@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-4/+4
|
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-2/+2
| | | | | * Update Codegen.py to emit Foo_Binding instead of FooBinding * s/FooBinding/Foo_Binding/g
* Treat the `keygen` element as obsolete (#30429)Ennui Langeweile2023-09-261-9/+4
| | | | | | | | | * Eradicate the `keygen` element * Run `./mach fmt` * Fix relevant Servo test * Fix outdated manifest
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-27/+27
| | | | | * 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-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-20/+51
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+4
|
* Remove unnecessary steps from "multipart/form-data encoding algorithm"Yutaro Ohno2023-04-071-9/+3
| | | | | | | | | | | | | | | The specifications for the "multipart/form-data encoding algorithm" has changed [1], and the "_charset_" is not now handled here. Remove no longer necessary steps from the "multipart/form-data encoding algorithm". Similar to the "text/plain encoding algorithm" case fixed by f0818aa3 (Remove unnecessary steps from "text/plain encoding algorithm"). [1]: https://github.com/whatwg/html/pull/3645 Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
* Remove unnecessary steps from "text/plain encoding algorithm"Yutaro Ohno2023-04-051-12/+7
| | | | | | | | | | | | | | | | | For "text/plain encoding algorithm", the specification [1] has changed [2] and "_charset_" is not now handled here. It's supposed to be handled in "construct the form data set" algorithm, and we've already implemented that [3]. So we now have extra steps for "text/plain encoding" algorithm. Remove no longer necessary steps from text/plain encoding algorithm so that it meets the specification. [1]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#text/plain-encoding-algorithm [2]: https://github.com/whatwg/html/pull/3645 [3]: https://github.com/servo/servo/pull/25217 Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
* Upgrade HyperNaveen Gattu2022-01-161-1/+1
|
* Add creation url and Secure ContextsJonathan Kingston2020-11-251-0/+1
|
* Make hidden input _charset_ check case insensitiveVincent Ricard2020-10-091-2/+2
|
* Implement DOMTokenList.supports APIVincent Ricard2020-10-051-2/+11
|
* Auto merge of #27299 - avr1254:master, r=jdmbors-servo2020-07-241-5/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented get element target algorithm Added check for area and anchor element Finished issue: Implemented get target and no opener algorithm Implemented get element target and get element noopener algorithms. <!-- Please describe your changes on the following line: --> Used the algorithms in html spec to implement target and no opener algorithms. --- <!-- 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 #27253 (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. -->
| * Implemented get element target and get element noopener algorithmsArjun Ramachandrula2020-07-241-5/+23
| | | | | | | | and refactored into functions.
* | Ported Rel, SetRel, and RelList from HTMLAnchorElement into HTMLForElementArjun Ramachandrula2020-07-141-1/+30
|/ | | | | | | | | | | | | | Updated tests to reflect rel and relList in HTMLFormElement Added AttrValue as style Added attr Updated outstanding test cases Fixed formatting. Hopefully this time works Implemented HTMLFormElement.relList
* Remove `invalid` event on a form elementMaxim Tsoy2020-07-051-2/+0
|
* Implement HTMLFormElement.requestSubmit()Also includes a fix for reentrant ↵Maxim Tsoy2020-07-021-30/+131
| | | | form submission behavior
* Fix invalid use of ReferrerUrlMatthias Deiml2020-06-171-1/+1
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-3/+3
|
* integrate readablestream with fetch and blobGregory Terzian2020-06-041-1/+10
|
* Form constraints validationteapotd2020-04-021-66/+45
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Use map_or and fix manifestDmitry Kolupaev2020-02-251-7/+8
|
* Implement step 5.13 for dirname correctlyDmitry Kolupaev2020-02-251-22/+21
|
* Remove recursiveness from directionality searchDmitry Kolupaev2020-02-251-6/+4
|
* Rearrange directionality algorithm functionsDmitry Kolupaev2020-02-251-0/+24
|