Josh Matthews
c94ac5bccb
Move various reflector types and traits to script_bindings ( #35279 )
...
* script: Move Reflector to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Extract global() helper from DomObject into new trait. Move DomObject and related traits to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-02-04 06:58:08 +00:00
Josh Matthews
c94d909a86
script: Limit public exports. ( #34915 )
...
* 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>
2025-01-10 08:19:19 +00:00
Josh Matthews
e956f3124c
Generate a trait abstracting over all known DOM interfaces ( #34357 )
...
* 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>
2024-11-24 07:35:14 +00:00
chickenleaf
257f4b84db
DOMRectList interface implementation ( #34025 )
...
* rechecking all file changes and additions
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* added comments with specification links
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* added space before the links
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* modified the doc link format
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* suggested changes + updated interfaces.https.html + updated passing test expectations
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* needed to do an update-manifest
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* updated the idlharness.any.html expectations
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
---------
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-11-01 15:58:30 +00:00
Jack Moffitt
853c91781e
Remove DOMRectList and use sequences instead.
...
DOMRectList was removed last back in 2015. See
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26200 for details.
2017-04-19 07:11:58 -06:00
Anthony Ramine
31e9d81c0f
Make #[dom_struct] a proc_macro attribute
2017-02-24 01:50:51 +01:00
Anthony Ramine
fcb59d3057
Make reflect_dom_object take a &GlobalScope
2016-10-06 20:59:09 +02:00
Anthony Ramine
7dfb336be8
Use Option<T> to return from getters
...
This removes the cumbersome &mut bool argument and offers overall
a more readable code.
2016-08-30 19:07:19 +02:00
Anthony Ramine
b45f1918d1
Remove JS::from_rooted
2016-05-31 14:43:58 +02:00
Ms2ger
0c61be7a57
Rustfmt some of script.
2015-11-18 11:14:05 +01:00
rohan.prinja
6e774ea6eb
merge from master
2015-11-03 19:01:23 +09:00
nxnfufunezn
d8ef3809a6
Removed JS::root Fixes #8251
2015-10-31 18:15:16 +05:30
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
Bogdan Cuza
233a769c67
Add spec links
2015-07-28 13:28:41 +02:00
Michael Wu
c90be8e1dc
Remove window field from domrectlist
2015-07-14 21:27:04 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Anthony Ramine
22931145ab
Remove use of RootedVec in DOMRectList
2015-05-26 15:35:17 +02:00
Anthony Ramine
1a30925cad
Remove Temporary::new()
...
Temporary::from_rooted() now takes an Assignable value.
2015-04-28 09:22:46 +02:00
Mukilan Thiyagarajan
e8a1e9eabb
Implement RootedVec<T>
2015-03-29 11:58:25 +02:00
Ms2ger
6d30ec77c8
Replace uint/int by usize/isize in various places.
2015-02-20 14:45:47 +01:00
Manish Goregaokar
552db382d6
Remove manual impls of Reflectors (autogen)
...
Obtained via:
`find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
`find . -maxdepth 1 -type f -print0 |xargs -0 grep -lZ dom_struct | xargs -0 grep -LZ "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`
followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Tetsuharu OHZEKI
a7bb436177
script: Remove glob imports added in #4405
2014-12-19 04:52:48 +09:00
Michael Booth
2cbf5a3671
Updated reflect_dom_object to be passed by value
2014-11-30 19:47:52 +00:00
Manish Goregaokar
3f2cbb275b
Use #[dom_struct] everywhere
2014-10-16 10:20:18 +05:30
Tim Taubert
acd98a73a4
Simple privatizations
2014-10-13 11:13:12 +02:00
Simon Sapin
b3245fa407
Upgrade to rustc d2b30f7d3 2014-09-23
2014-09-29 17:41:45 +01:00
ProgramFOX
71a05a9c39
Made some DOM fields private.
...
Relevant to #2242 .
2014-09-26 20:35:01 +02:00
Manish Goregaokar
cc44a3b064
Use JSTraceable everywhere
2014-09-24 05:44:49 +05:30
Cameron Zwarich
2c8d51a37c
More progress in the &JSRef -> JSRef conversion
...
Change all of the <Class>Methods traits to take `self` instead of
`&self`.
2014-09-20 11:54:10 -07:00
Cameron Zwarich
4fa8725111
First steps of &JSRef -> JSRef conversion
...
Replace &JSRef with JSRef in the bulk of the generated code. This will
remove a level of indirection throughout all DOM code.
This patch doesn't change methods implemented on JSRef<T> to take `self`
rather than `&self`, and it leaves a few other uses of &JSRef, but those
changes can be made incrementally.
2014-09-19 13:39:17 -07:00
Manish Goregaokar
12dc54d238
Add unrooted_must_root lint for enums and structs containing JS<T>, as well as functions with JS<T> in their parameter list
...
For safe wrappers over JS<T> (eg Temporary<T>) use #[allow(unrooted_must_root)].
For all other types containing a #[must_root] value, annotate the type with #[must_root] to ensure that it is never used unrooted
2014-09-16 22:11:27 +05:30
Jack Moffitt
c6ab60dbfc
Cargoify servo
2014-09-08 20:21:42 -06:00