aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/radionodelist.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use new stylo crate renames (#35898)Nico Burns2025-03-121-1/+1
| | | Signed-off-by: Nico Burns <nico@nicoburns.com>
* refactor: propagate CanGc arguments through callers (#35591)Auguste Baum2025-02-231-2/+4
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Propagate `CanGc` arguments through callers in constructors (#35541)Auguste Baum2025-02-201-2/+8
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-2/+2
| | | | | | | | | | | | | * script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Add CanGc argument to reflect_dom_object (#34606)Domenico Rizzo2024-12-131-1/+6
| | | | | | | | | | | | | | | | | | | | | * applied mach fmt Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Refinements Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> Modified reflect_dom_object signature and all its calls Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * fix function calls when parameter is passed up Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Update trait implementations with new generic type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-4/+3
| | | | | | | | | | | | | | | | | * Add all constructors, special operations, and static methods to generated DOM interface traits. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move all constructors and static methods defined in bare impl blocks inside FooMethods trait impls. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add missing doc links. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy: Fix last few warnings (#32270)Pi-Cla2024-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix clippy in components/script warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do (components/script/dom/htmlformelement.rs:896:20) warning: `Box::new(_)` of default value (components/script/dom/paintworkletglobalscope.rs:291:29) warning: this creates an owned instance just for comparison (components/script/dom/radionodelist.rs:105:50) * Fix clippy in layout_thread (2013 and 2020) warning: this `if` statement can be collapsed (components/layout_thread/lib.rs:876:17) warning: the following explicit lifetimes could be elided: 'a (components/layout_thread/lib.rs:239 and 2020 same line) warning: deref which would be done by auto-deref (components/layout_thread/lib.rs:500 and 1289) warning: dereferencing a tuple pattern where every element takes a reference (components/layout_thread/lib.rs:503,1562 and 2020 line 1153) warning: useless conversion to the same type: `style::invalidation::element::restyle_hints::RestyleHint` (components/layout_thread_2020/lib.rs:742:36) * Fix clippy in components/servo warning: constants have by default a `'static` lifetime (components/servo/lib.rs:1238:31) warning: creating a `let` binding to a value of unit type, which usually can't be used afterwards (5 occurances in components/servo/lib.rs) * FIx clippy in ports/servoshell warning: this expression creates a reference which is immediately dereferenced by the compiler (ports/servoshell/app.rs:251:89) warning: using `clone` on type `Option<TopLevelBrowsingContextId>` which implements the `Copy` trait (ports/servoshell/webview.rs:122:9)
* 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>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-2/+3
| | | | | * strict imports formatting * Reformat all imports
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-6/+1
|
* Names should now be consistently atomsPatrick Shaughnessy2020-02-131-4/+5
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* RadioNodeList now reflects changes to the parent, but has room for ↵Patrick Shaughnessy2020-01-101-11/+26
| | | | performance optimization
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Format remaining filesPyfisch2018-11-061-13/+21
|
* `cargo fix --edition`Simon Sapin2018-11-061-12/+12
|
* Format script componentchansuke2018-09-191-9/+16
|
* Expand InputType to cover all possible typesJon Leighton2017-12-061-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This came out of a conversation with nox in IRC: https://mozilla.logbot.info/servo/20171201#c13946454-c13946594 The code I was working on which motivated this change is here: https://github.com/servo/servo/pull/19461 Previously, InputType::Text was used to represent several different values of the type attribute on an input element. If an input element doesn't have a type attribute, or its type attribute doesn't contain a recognised value, then the input's type defaults to "text". Before this change, there were a number of checks in the code which directly looked at the type attribute. If those checks matched against the value "text", then they were potentially buggy, since an input with type=invalid should also behave like an input with type=text. Rather than have every conditional which cares about the input type also have to deal with invalid input types, we can convert the type attribute to an InputType enum once, and then match against the enum. A secondary benefit is that the compiler can tell us whether we've missed branches in a match expression. While working on this I discovered that the HTMLInputElement::value_mode() method misses a case for inputs with type=hidden (this resulted in a failing WPT test passing). I've also implemented the Default trait for InputType, so we now only have one place in the code which knows that InputType::Text is the default, where previously there were several.
* 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.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | 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 JS<T> to Dom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Remove and allow some dead code.Ms2ger2016-12-221-4/+0
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+1
|
* Use Option<T> to return from gettersAnthony Ramine2016-08-301-2/+2
| | | | | This removes the cumbersome &mut bool argument and offers overall a more readable code.
* Remove JS::from_rootedAnthony Ramine2016-05-311-1/+1
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Implement NamedItem and NamedGetter on HTMLFormControlsCollectionKeith Yeung2016-01-281-84/+43
|
* Implement RadioNodeListKeith Yeung2016-01-241-0/+152