aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/range.rs
Commit message (Collapse)AuthorAgeFilesLines
* More CanGc fixes: Range, Event, gpu error, Header (#33774)webbeef2024-10-101-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Propagate CanGc parameter in Range Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in gpu code and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in Header and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in Event and dependencies Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * Propagate CanGc parameter in servoparser Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* Rename first_contained_child & last_contained_child to ↵tanishka2024-10-091-13/+13
| | | | | first_partially_contained_child & last_partially_contained_child (#33758) Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix `type_complexity` warning in `components/script/dom` (#33727)tanishka2024-10-081-15/+21
| | | | | | | | | | | | | * clippy: Fix type_complexity warning in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Use destructure function only once Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-11/+10
| | | | | | | | | | | | | | | | | * 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>
* Propagate `CanGc` from `Document::new()` (#33386)Andriy Sultanov2024-09-091-22/+44
| | | | | | | | | | | | | * Add canGc as a parameter to autogenerated trait methods Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> * Propagate CanGc from Document::new() Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> --------- Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-4/+16
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy: Fix four warnings (#32789)Danila Matveev2024-07-171-0/+2
| | | | | | | | | | | | | | | | | * Fixes 4 clippy rules Signed-off-by: Danila Matveev <usurname.r@gmail.com> * Rollbacks changes in range.rs and silences clippy::neg_cmp_op_on_partial_ord Signed-off-by: Danila Matveev <usurname.r@gmail.com> * Fixes a fmt issue Signed-off-by: Danila Matveev <usurname.r@gmail.com> --------- Signed-off-by: Danila Matveev <usurname.r@gmail.com>
* Fixed some clippy warnings in components (#32025)komuhangi2024-04-101-8/+6
| | | | | * Fixed some clippy warnings in components * Updated the simplification of bolean expressions in componets/script/dom/range.rs
* Fixed some clippy warning by adding default implementations (#31989)komuhangi2024-04-041-3/+9
| | | | | | | | | | | * Fixed some clippy warning by adding default implementations * Updated PR that adds default implementation of structs * Clean up and extend `Default` implementations --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix a few problems in `components/script/dom` (#31955)Rosemary Ajayi2024-03-311-2/+2
| | | | | | | * fixed various clippy warnings * fixed various clippy warnings * fixed various clippy warnings
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-7/+7
|
* 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
* Implement StaticRange (#31809)cathiechen2024-03-221-248/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add DOM interface for AbstractRange * Add DOM interface for StaticRange * Update WPT tests for StaticRange-constructor.html * Fix formatting * Add AbstractRange & StaticRange in interfaces.html * rebased the code and fixed the failures Signed-off-by: Cathie Chen <cathiechen@igalia.com> * update the expected result in idlharness.window.js.ini file * Addressed the code review comments * updae the test result of legacy layout --------- Signed-off-by: Cathie Chen <cathiechen@igalia.com> Co-authored-by: Nipun Garg <nipung271@gmail.com>
* 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-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-13/+12
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+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>
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-6/+26
|
* Do not panic on navigating across documentsUtsav Oza2020-07-301-0/+1
|
* Implement concept of dirty rootAnthony Ramine2020-05-191-13/+2
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Selection interface working for synthetic operationsPatrick Shaughnessy2020-02-131-0/+54
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Attr is a Node, with consequences for many Node methodsPatrick Shaughnessy2019-12-231-0/+1
|
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-5/+5
|
* Merge Node::shadow_including_inclusive_ancestors into inclusive_ancestorsFernando Jiménez Moreno2019-04-261-12/+36
|
* Minor tweaks: rename composed_parent_node_ref, remove or update outdated ↵Fernando Jiménez Moreno2019-04-261-6/+1
| | | | comments...
* Introduce ShadowIncluding enum for tree traversalsFernando Jiménez Moreno2019-04-261-2/+2
|
* Implement concept of shadow including tree orderFernando Jiménez Moreno2019-04-261-1/+4
|
* Throw NotSupported when trying to deep clone a shadow rootFernando Jiménez Moreno2019-04-261-8/+8
|
* Partial ShadowRoot implementation of DocumentOrShadowRootFernando Jiménez Moreno2019-04-261-3/+8
|
* ShadowRoot interfaceFernando Jiménez Moreno2019-04-261-3/+5
|
* Implement CDATASection interface and createCDATASection methodGeorge Roman2019-03-141-6/+8
|
* Remove most RootedReference usesAnthony Ramine2019-03-101-8/+10
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-6/+7
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-3/+3
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-24/+24
|
* Format script componentchansuke2018-09-191-172/+214
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-8/+8
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-4/+7
| | | | | | | | | | | | | | | | | | | | 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-25/+25
| | | | | | | 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 MutJS<T> to MutDom<T>Anthony Ramine2017-09-261-3/+3
|
* 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
|
* Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Simon Sapin2017-08-151-2/+2
|