aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcollection.rs
Commit message (Collapse)AuthorAgeFilesLines
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-161-2/+2
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix rustdoc problems (#33458)Oriol Brufau2024-09-141-2/+2
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366)Martin Robinson2024-09-081-3/+3
| | | | | | | | This change fixes all rustdoc errors and also adds a tidy check for a very common rustdoc URL issue. Eventually rustdoc warnings should likely cause the build to fail, but this catches those issues sooner in order to not waste so much developer time. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* remove usage of legacy numeric operations in script (#33095)Simon Wülker2024-08-161-6/+4
| | | | | | | These operations are deprecated and might be removed in a future rust version. Clippy is also complaining about them. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* clippy: Fix `comparison_*` warnings (#32058)eri2024-04-121-24/+29
|
* Clippy: Fixed some clippy warnings (#31818)Aarya Khandelwal2024-03-231-2/+2
| | | | | | | | | | | * 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-1/+1
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-2/+2
|
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-5/+5
|
* 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-5/+7
| | | | | * 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/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix checking for empty set for getElementsByClassNamecybai2023-04-211-0/+6
| | | | | | | | | Because empty set with `.all(predicate)` will always return `true`, it will result in always filtering wrong elements when the classes is empty set. Thus, we return earlier with `always_empty` HTMLCollection in the mpety classes case so that we can avoid filtering on empty sets.
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Names should now be consistently atomsPatrick Shaughnessy2020-02-131-12/+16
|
* Fix some new warningsSimon Sapin2019-06-221-1/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-3/+6
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-11/+11
|
* Format script componentchansuke2018-09-191-40/+88
|
* Use specific negative assertion for DOM HTMLCollectionCYBAI2018-01-261-1/+1
|
* script: Remove HTMLAppletElement.Emilio Cobos Álvarez2017-11-061-0/+13
| | | | It was removed from the spec, there's no reason to keep it in tree.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-6/+6
| | | | | | | | | | | | | | | | | | | | 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-23/+23
| | | | | | | 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 MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-3/+3
|
* 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-6/+6
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Auto merge of #17381 - cbrewster:custom_element_creation, r=jdmbors-servo2017-06-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Custom element creation <!-- Please describe your changes on the following line: --> This implements the CE-related steps when creating elements. `is` is now support by `document.createElement` and is stored on `Element`s. Only synchronously created autonomous elements are supported as async element creation and customized built-in elements both require custom element upgrade reactions. Spec: https://dom.spec.whatwg.org/#concept-create-element --- <!-- 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 #17191 (github issue number if applicable). <!-- Either: --> - [X] 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/17381) <!-- Reviewable:end -->
| * Allow element prefix to be setConnor Brewster2017-06-231-1/+1
| | | | | | | | | | Implements step 6.1.10 of https://dom.spec.whatwg.org/#concept-create-element
* | Replace iterator struct with anonymous return iterator types.Corey Farwell2017-06-231-30/+6
|/ | | | Similar to https://github.com/servo/servo/pull/17488.
* Classes/IDs case-sensitivity: get quirks mode from matching context.Simon Sapin2017-06-131-7/+3
|
* ID and class selectors are ASCII case-insensitive in quirks mode.Simon Sapin2017-06-121-2/+9
| | | | https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
* Upgrade to html5ever 0.16Simon Sapin2017-05-021-2/+2
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* 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.
* Make Element::prefix return an Option<&DOMString>Anthony Ramine2016-12-011-4/+4
|
* fix getElementsByTagName()Maciej Skrzypkowski2016-11-041-24/+36
|
* Auto merge of #14027 - frewsxcv:htmlcollection-iter-refactor, r=emiliobors-servo2016-11-031-10/+12
|\ | | | | | | | | | | | | | | Remove unnecessary `Box` around `HTMLCollectionElementsIter::node_iter`. <!-- 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/14027) <!-- Reviewable:end -->
| * Remove unnecessary `Box` around `HTMLCollectionElementsIter::node_iter`.Corey Farwell2016-11-021-10/+12
| |
* | Update to string-cache 0.3Simon Sapin2016-11-031-14/+15
|/
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-3/+3
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+1
|
* implement HTMLOptionsCollection and add related items to HTMLSelectElementAlexandrov Sergey2016-09-261-0/+3
|
* Use Option<T> to return from gettersAnthony Ramine2016-08-301-8/+4
| | | | | This removes the cumbersome &mut bool argument and offers overall a more readable code.
* Add DeleteRow methodGuillaume Gomez2016-07-271-1/+1
|
* Move util::str to styleAnthony Ramine2016-07-051-1/+1
|