aboutsummaryrefslogtreecommitdiffstats
path: root/components/dom_struct
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Start the transition to workspace dependenciesMartin Robinson2023-05-171-2/+2
| | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* Upgrade remaining components to edition 2018sagudev2023-02-182-5/+2
|
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Remove redundant webidl_must_inherit compiler plugin lintSimon Sapin2019-09-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | At first I was considering moving it to a procedural macro (source-level information should be sufficient), and started by trying to reproduce the error case by changing `htmldivelement.rs` to use `Element` instead of `HTMLElement` as the first field. The output was: ```rust error[E0308]: mismatched types --> /home/simon/servo2/target/debug/build/script-4caa244faca7d10f/out/Bindings/HTMLDivElementBinding.rs:665:31 | 665 | let _: &HTMLElement = self.as_parent(); | ^^^^^^^^^^^^^^^^ expected struct `dom::htmlelement::HTMLElement`, found struct `dom::element::Element` | = note: expected type `&dom::htmlelement::HTMLElement` found type `&dom::element::Element` ``` This line number is inside a generated method called `__assert_parent_type`. As far as I can tell, any case where this lint would error is already caught by such methods. The lint is therefore redundant and can safely be removed.
* Bump all in-tree components to syn 1Anthony Ramine2019-09-272-7/+3
|
* Restrict syn features for in-tree componentsAnthony Ramine2019-09-271-1/+1
|
* Can collect webidl paths.krk2019-04-201-0/+1
|
* Update syn and related dependenciesBastien Orivel2018-11-301-1/+1
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-1/+0
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* Use 2018-style paths in code generated by proc-macro derivesSimon Sapin2018-11-061-1/+1
|
* Format components dom_struct, domobject_derive and embedder_traits #21373kingdido9992018-09-031-2/+5
|
* Upgrade to rustc 1.29.0-nightly (1ecf6929d 2018-07-16)Simon Sapin2018-07-181-3/+0
|
* Assert that DOM structs have the correct first fieldManish Goregaokar2018-07-032-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM structs embed their parent type as their first field. This introduces a `.parent()` method to the DOM struct that returns its first field, and codegens a type assert that ensures that `.parent()` returns the parent struct. This generates: On `#[dom_struct]`: ```rust impl HasParent for Type { type Parent = ParentType; fn as_parent(&self) -> ParentType { &self.first_field } } ``` In the codegen files: ```rust impl Type { fn __assert_parent_type(&self) { let _: &ParentType = self.as_parent(); } } ````
* Upgrade to rustc 1.28.0-nightly (524ad9b9e 2018-05-29)Anthony Ramine2018-05-301-0/+1
| | | | Fixes https://github.com/servo/servo/issues/20844
* Revert "Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)"Josh Matthews2018-05-181-1/+1
| | | | This reverts commit 46ad8110172cfc9d8d420e8eb41863f3d394e24d.
* Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)Simon Sapin2018-05-041-1/+1
|
* Upgrade to rustc 1.27.0-nightly (056f589fb 2018-04-07)Simon Sapin2018-04-091-3/+2
|
* Upgrade to rustc 1.24.0-nightly (5a2465e2b 2017-12-06)Simon Sapin2017-12-071-0/+4
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Use the better TokenStream API in dom_structAnthony Ramine2017-09-012-13/+5
| | | | | | | | | | | | | | | | | | | | | | Before: ``` error[E0412]: cannot find type `SourceBuffer` in this scope --> /Users/nox/src/servo/components/script/dom/mediasource.rs:25:1 | 25 | #[dom_struct] | ^^^^^^^^^^^^^ did you mean `SourceBufferList`? ``` After: ``` error[E0412]: cannot find type `SourceBuffer` in this scope --> /Users/nox/src/servo/components/script/dom/mediasource.rs:28:39 | 28 | source_buffers: DOMRefCell<Vec<JS<SourceBuffer>>>, | ^^^^^^^^^^^^ did you mean `SourceBufferList`? ```
* Fix quote dependency versionAnthony Ramine2017-08-231-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-242-0/+41