aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/audiobuffer.rs
Commit message (Collapse)AuthorAgeFilesLines
* script: implement ReadableByteStreamController (#35410)Taym Haddadi2025-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: implement ReadableByteStreamController Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * implement can_copy_data_block_bytes and copy_data_block_bytes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove BufferSource::Default Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * implement StartAlgorithmFulfillmentHandler, StartAlgorithmRejectionHandler, PullAlgorithmFulfillmentHandler, PullAlgorithmRejectionHandler for ReadableByteStreamController Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * implement perform_pull_into Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix build Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix build Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove RefCell from PullIntoDescriptor and QueueEntry Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove commented code Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * add perform_cancel_steps, perform_release_steps and perform_pull_steps Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix crown Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * unskip readable-byte-streams Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix CRASH Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix more CRASHS Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix more crashes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix bad-buffers-and-views.any.js test Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Update test expectations Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix BorrowMutError crashes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix view_byte_length test Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix non-transferable-buffers test Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Pass contexts as much as possible by reference Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Make respond_internal Fallible Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix crwon Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * fix process pull into descriptors using queue logic and resulting double-borrow Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> * Fix clippy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * FIx more crashes Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix timeout tests Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix all tests Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove all error! logs Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Remove #[allow(unsafe_code)] Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix lint Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix tidy Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> * Fix test expectation Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com> Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> Co-authored-by: gterzian <2792687+gterzian@users.noreply.github.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-1/+1
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* refactor: add CanGc as argument to create_buffer_source (#35597)Yerkebulan Tulibergenov2025-02-221-5/+9
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-2/+2
| | | | | | | | | | | | | * 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>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Upgrade rustc to 1.83 (#34793)Nico Burns2025-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade rustc to 1.83 Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix crown (change copied from linked clippy function) Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix named lifetime lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Bump shell.nix Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix non-local impl warnings Signed-off-by: Nico Burns <nico@nicoburns.com> * Format with 1.83 formatting changes Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix manual non-local impl Signed-off-by: Nico Burns <nico@nicoburns.com> * More fixes for crown Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix tidy Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix needless_return lints Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix doc comment lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix missing wait lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow needless_lifetimes lint Signed-off-by: Nico Burns <nico@nicoburns.com> * more doc comments Signed-off-by: Nico Burns <nico@nicoburns.com> * More needless_returns Signed-off-by: Nico Burns <nico@nicoburns.com> * is_empty lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix needless_lifetime lints Signed-off-by: Nico Burns <nico@nicoburns.com> * fix div_ceil lint Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow non-minimal bool Signed-off-by: Nico Burns <nico@nicoburns.com> * Non-local impl in constellation Signed-off-by: Nico Burns <nico@nicoburns.com> * Missing wait in constellation Signed-off-by: Nico Burns <nico@nicoburns.com> * fmt Signed-off-by: Nico Burns <nico@nicoburns.com> * remove useless lints table Signed-off-by: Nico Burns <nico@nicoburns.com> * Fixup comments Signed-off-by: Nico Burns <nico@nicoburns.com> * Allow non-local definition in sandboxing code to simplify feature flagging Signed-off-by: Nico Burns <nico@nicoburns.com> * Remove wait calls and allow zombie_processes lint Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
* 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>
* Multiple CanGc fixes in components/script/dom (#33924)tanishka2024-10-201-1/+2
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-27/+26
| | | | | | | | | | | | | | | | | * 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>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-2/+6
| | | | | | | | | | | | | | | | | * 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>
* Remove unnecessary `unsafe` block (#33109)Taym Haddadi2024-08-181-3/+1
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* clippy: Fix all errors in `components/script` (#31911)Azhar Ismagulova2024-03-281-2/+2
| | | | | * clippy: Fix errors in components/script/dom * clippy: fixed remaining errors in components/script
* clippy: fix some warnings in components/script (#31865)Ekta Siwach2024-03-261-1/+1
|
* Fix rustdoc errors in `components/script/dom` (#31617)Mucha Naibei2024-03-111-1/+1
| | | | | * Fix rustdoc errors in components/script/dom * Revert if to iff in audiobuffer.rs
* WedIDL: bring dom/bindings/typedarray further in line with spec (#31375)Taym Haddadi2024-02-251-5/+4
| | | | | | | | | | | | | | | | | * WedIDL: bring dom/bindings/typedarray further in line with spec Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Rename HeapBufferSourceTypes to HeapBufferSource Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * fmt code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Make HeapFloat32Array generic (#31167)Taym Haddadi2024-01-291-4/+4
| | | | | | | | | | | | | | | | | * Make HeapFloat32Array generic Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Define all the methods defaults on the HeapTypedArray trait Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use generic type instead of trait Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-5/+5
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* audiobuffer: ensure dest has the same size as source in copy from channel ↵Gregory Terzian2024-01-151-1/+1
| | | | (#31071)
* WebIDL: use FLoat32Array (#30990)Gregory Terzian2024-01-111-74/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * inital * audiobuffer: return float 32 array as channel data * add on heap float 32 array type * fix warnings * add list of webidl interfaces to ignore for float 32 * codegen: remove duplication of builtin return type handling * bindings: derive default for float 32 array wrapper * bindings: allow unsafe code in typedarrays module * bindings: rename float 32 array wrapper * bindings: rename HeapFloat32Array is_set method to is_initialized * bindings: assert float 32 array is initialized before data can be acquired * bindings: use let syntax for error handling in float 32 array wrapper * bindings: use copy_from_slice where possible in float 32 array wrapper * bindings: rename args in typedarray copy methods * codegen: use idl type in builtin names for float 32 array * bindings: add a util to create float 32 arrays, use in dom matrix readonly * codegen: tidy * bindings: box the heap inside heaped float 32 arrays
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-10/+10
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Formatting.Josh Matthews2023-05-281-1/+8
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-4/+18
|
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-4/+5
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+2
|
* rename compartment to realmKunal Mohan2020-01-241-1/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Add accountable-refcell as optional build time featureKunal Mohan2020-01-081-2/+1
|
* AudioBuffer: Track sample rateMauricio Collares2019-08-191-4/+10
|
* Remove some usage of unsafe code in AudioBuffermarmeladema2019-08-091-18/+19
|
* Modify *::get_cx methods to return a safe JSContext instead of a raw onemarmeladema2019-07-241-7/+7
|
* Convert CGTraitInterface to use safe JSContext instead of raw JSContextmarmeladema2019-07-241-11/+10
|
* Create a helper API for entering a DOM object's compartmentKamil Niski2019-06-291-3/+3
| | | | | | Revert some unnecessary changes Fix fmt errors
* Upgrade to Spidermonkey 67.Josh Matthews2019-06-261-2/+2
|
* Update to SpiderMonkey 66.Josh Matthews2019-05-101-2/+2
|
* Remove mozjs dep from malloc_size_of.Josh Matthews2019-05-021-0/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-4/+6
|
* Format remaining filesPyfisch2018-11-061-11/+9
|
* Switch most crates to the 2018 editionSimon Sapin2018-11-061-3/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-8/+8
|
* Allow reusing AudioBuffersFernando Jiménez Moreno2018-10-111-52/+67
|
* Increase webaudio sample rate threshold to match firefoxManish Goregaokar2018-10-101-2/+2
|
* Rustfmt audiobuffer.rsFernando Jiménez Moreno2018-09-191-5/+13
|
* Keep shared and js channels in syncFernando Jiménez Moreno2018-09-191-7/+15
|
* Do not skip buffer update during copyToChannelFernando Jiménez Moreno2018-09-191-5/+1
|
* Throw IndexError if start_in_channel is equal to ArrayBuffer lengthFernando Jiménez Moreno2018-09-191-1/+1
|
* Apply start_in_channel to destination and not source during ↵Fernando Jiménez Moreno2018-09-191-6/+10
| | | | AudioBuffer.CopyToChannel