Commit graph

38 commits

Author SHA1 Message Date
Josh Matthews
875e387004
script: Feature-gate all crown support. (#35055)
* script: Feature-gate all crown support.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Use cfg(crown) instead of a cargo feature.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-18 21:36:15 +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
9c893c7f4d
More CanGc fixes (#33888)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
2024-10-17 19:36:42 +00:00
Josh Matthews
7d931e673a
script: Include constructors and static methods in generated DOM traits (#33665)
* 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>
2024-10-08 01:51:58 +00:00
Josh Matthews
60ef6bc461
Start marking functions that can transitively trigger a GC (#33144)
* 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>
2024-08-22 11:42:36 +00:00
Kitsu
67f239d1ba
clippy: fix several lint warns (#32126)
As seems #31500 still remain opened here's the next partial fix.

Fixed list: `unused_mut`, `clippy::needless_borrow`,
`clippy::match_ref_pats`, `clippy::borrow_deref_ref`, `clippy::ptr_eq`,
`clippy::unnecessary_cast`, `clippy::derivable_impls`,
`clippy::collapsible_match`, `clippy::extra_unused_lifetimes`,
`clippy::map_clone`, `clippy::manual_filter`.


- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes are part of #31500.
- [x] These changes do not require tests because are only cosmetic.
2024-04-22 06:45:39 +00:00
Oluwatobi Sofela
62a25fdcc4
clippy: Fix question_mark warning (#32051) 2024-04-11 21:48:43 +00:00
Oluwatobi Sofela
3e63f8d6ee
clippy: Fix needless borrow warnings (#31813) 2024-03-21 17:48:54 +00:00
Shamir Khodzha
201cdbab17
webaudio: Throw when setting invalid automationRate on AudioBufferSourceNode (#26469) 2024-02-28 21:24:08 +00:00
Samson
604979e367
Replace script_plugins with a clippy like rustc driver (named crown) (#30508)
* 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>
2023-12-01 15:50:52 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Josh Matthews
cc07e27864 Rename reflect_dom_object2. 2023-05-31 23:03:32 -04:00
Josh Matthews
dbff26bce0 Support arbitrary protos when wrapping DOM objects with constructors. 2023-05-28 23:23:12 -04:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
Kunal Mohan
f7db4b7f80
Modify script to prevent further violations of snake_case 2020-01-18 14:22:15 +05:30
Mauricio Collares
a21aa052d0 AudioBufferSourceNode: Send loop messages 2019-08-20 11:42:16 -03:00
Mauricio Collares
e8d3b9753f AudioBufferSourceNode: Support start parameters (offset, duration) 2019-08-19 14:36:31 -03:00
Mauricio Collares
992e7ba630 AudioBuffer: Track sample rate 2019-08-19 14:36:30 -03:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Manish Goregaokar
40641ac8a4 More accurate names for .started and .stopped 2018-10-11 14:28:05 -07:00
Fernando Jiménez Moreno
091ad49d68 Allow reusing AudioBuffers 2018-10-11 19:27:21 +02:00
Fernando Jiménez Moreno
bc6586a9d0 Throw if time given to AudioScheduledSourceNode.stop is negative 2018-09-25 17:16:17 +02:00
Fernando Jiménez Moreno
bbc3565900 Use buffer_set flag for AudioBufferSourceNode buffer setter 2018-09-25 17:16:17 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Fernando Jiménez Moreno
e0e1f5f900 Implement AudioBufferSourceOptions.AudioBuffer and always keep servo media audio buffer updated 2018-09-19 06:54:17 +02:00
Manish Goregaokar
9254606b01 Pass down ChannelInfo to create_node 2018-09-11 19:24:01 +05:30
Manish Goregaokar
28c21421ca Throw on out-of-bounds channelCount in AudioNodes 2018-09-03 20:31:52 +05:30
Fernando Jiménez Moreno
b738d9a912 Throw if AudioBufferSourceNode.Start params are negative 2018-07-30 19:54:55 +02:00
Fernando Jiménez Moreno
21cb160be3 test-tidy fixes 2018-07-30 14:21:48 +02:00
Fernando Jiménez Moreno
b26a3bd31b rustfmt 2018-07-30 14:21:46 +02:00
Manish Goregaokar
f0d04249f9 Use new params impl (#4)
* AudioNodeType -> AudioNodeInit

* Use new param type system, clean up
2018-07-30 14:21:44 +02:00
Fernando Jiménez Moreno
911b8ebd79 Remove unsafe code to create empty AudioNodeOptions 2018-07-30 14:21:44 +02:00
Manish Goregaokar
f3bc183dba Add disconnect methods; cleanup DOM stuff (#2)
* Add disconnect methods

* Use Dom, not DomRoot

DomRoot will keep it permanently rooted, it should only be used in
values not on the JS heap
2018-07-30 14:21:43 +02:00
Fernando Jiménez Moreno
356d7fd7a6 createBufferSource and buffer setter on buffer source node 2018-07-30 14:21:43 +02:00
Fernando Jiménez Moreno
0cb053ad4c AudioBufferSourceNode stubs 2018-07-30 14:21:42 +02:00