aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/attr.rs
Commit message (Collapse)AuthorAgeFilesLines
* script: delay Mutation initialization (#35291)Euclid Ye2025-02-051-2/+3
| | | Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* cangc fixes in node.rs (#33984)chickenleaf2024-10-231-1/+4
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* clippy: Fix a bunch of warnings in `script` (#32680)Martin Robinson2024-07-041-2/+2
| | | This is just a portion of the errors that are remaining to be fixed.
* script: Reduce the use of `unsafe` in LayoutDom (#31979)Martin Robinson2024-04-031-2/+2
| | | | | | | | | | | | | Remove the use of unsafe code in the layout wrappers of the DOM. The main change here is that `unsafe_get()` no longer needs to be an unsafe method, which allows us to transitively remove or reduce unsafe blocks from callers. The function itself is not renamed, because it's still a bit dangerous to start removing the layers of abstraction from actual DOM nodes. In addition `init_style_and_opaque_layout_data` can be merged into `initialize_data`, which removes one more unsafe method. Finally, a "Safety" section is added to some unsafe methods.
* clippy: fix some warnings in components/script (#31865)Ekta Siwach2024-03-261-2/+2
|
* 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-1/+1
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-8/+10
| | | | | * 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/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Miscellaneous build / tidy fixes.Emilio Cobos Álvarez2021-02-261-15/+16
|
* Remove an obsolete commentAnthony Ramine2020-03-311-1/+0
|
* Introduce AttrHelpersForLayout::namespaceAnthony Ramine2020-03-311-0/+6
|
* Don't clone the result of AttrHelpersForLayout::local_nameAnthony Ramine2020-03-311-3/+3
| | | | There is no need to do that. Embrace returning borrows from the DOM, it good.
* Rename AttrHelpersForLayout methodsAnthony Ramine2020-03-311-6/+6
|
* Make AttrHelpersForLayout methods be safeAnthony Ramine2020-03-311-10/+10
| | | | The unsafety isn't there, it's in the creation of the LayoutDom<T> values.
* Remove a bunch of _forever suffixes in Attr methodsAnthony Ramine2020-03-301-8/+8
| | | | They don't return &'static references anymore.
* Fix AttrHelpersForLayoutAnthony Ramine2020-03-301-12/+11
| | | | We should never be returning 'static stuff from attrs, that's a big lie.
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Add accountable-refcell as optional build time featureKunal Mohan2020-01-081-2/+1
|
* Attr is a Node, with consequences for many Node methodsPatrick Shaughnessy2019-12-231-33/+15
|
* Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30)Simon Sapin2019-07-311-2/+6
|
* Remove unused code from script* cratesest312019-06-021-16/+0
|
* Remove most RootedReference usesAnthony Ramine2019-03-101-3/+3
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-13/+13
|
* Format script componentchansuke2018-09-191-28/+27
|
* MutationObserver api: Implement takeRecords() and characterData mutationsFabrice Desré2018-05-021-1/+1
|
* Use specific assertion for DOM attrCYBAI2018-01-261-2/+2
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-8/+12
| | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | 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 DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename LayoutJS<T> to LayoutDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Handle exceptions during upgradesConnor Brewster2017-08-091-1/+1
|
* Support custom element callback reactionsConnor Brewster2017-07-171-1/+14
|
* Mutation Observer APISumit2017-05-151-0/+8
|
* Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* script: Propagate the attribute into the document's element_attr_will_change ↵Emilio Cobos Álvarez2017-01-301-1/+1
| | | | method.
* Remove HeapGCValueAnthony Ramine2016-12-121-4/+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 Attr::prefix return an Option<&Prefix>Anthony Ramine2016-12-011-3/+3
|
* Update to string-cache 0.3Simon Sapin2016-11-031-21/+20
|
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-3/+3
|