aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
Commit message (Collapse)AuthorAgeFilesLines
...
* clippy: remove unneeded return statements (#31923)Azhar Ismagulova2024-03-283-5/+5
|
* clippy: Fix various clippy warnings in `components/scripts/dom/bindings` ↵Rosemary Ajayi2024-03-282-3/+3
| | | | | | | (#31901) * single-character string constant used as pattern * singuse of with literal radix of 16
* clippy: Fix a few clippy problems in `components/scripts/dom` (#31905)Rosemary Ajayi2024-03-281-1/+0
| | | | | * option_as_ref_deref * fix
* 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
* deref on an immutable reference (#31899)Rosemary Ajayi2024-03-281-1/+1
|
* fix: omitted the `let` bindings (#31908)Azhar Ismagulova2024-03-271-1/+1
|
* clippy: Fix option_map_unit_fn warnings (#31906)Oluwatobi Sofela2024-03-271-1/+3
|
* clippy: Fix clippy problems in `components/script/dom` (#31891)Rosemary Ajayi2024-03-273-12/+12
| | | | | | | * deref on an immutable reference * use of with literal radix of 10 * fix
* clippy: Fix op_ref warnings (#31900)Oluwatobi Sofela2024-03-271-2/+2
|
* clippy:Fix clippy problems in components/scripts/binding (#31893)Rosemary Ajayi2024-03-273-4/+4
| | | | | | | | | | | | | | | * constants have by default a static lifetime * constants have by default a static lifetime * unneeded unit expression * unneeded unit expression * Box of default value * casting raw pointers * casting raw pointers
* clippy: Fix various warnings in `components/script/dom` (#31890)Rosemary Ajayi2024-03-271-8/+8
| | | | | * redundant field names in struct initialization * reduthis pattern creates a reference to a reference
* clippy: Fix clone-on-copy warnings (#31877)Oluwatobi Sofela2024-03-262-4/+2
|
* clippy: Fix single_match warnings (#31876)Oluwatobi Sofela2024-03-261-7/+4
|
* clippy: fix some warnings in components/script (#31865)Ekta Siwach2024-03-262-2/+2
|
* fixed the `unneeded return` statement warnings. (#31863)Aarya Khandelwal2024-03-261-1/+1
|
* fixes dereferencing on an immutable reference (#31864)Aarya Khandelwal2024-03-262-2/+2
|
* clippy: Fix remaining warnings in generated code (#31844)eri2024-03-252-22/+43
| | | | | * clippy: fix warnings in generated code * clippy: fix wrap_panic closure warnings
* clippy: Fix `default_constructed_unit_structs` warnings in `components` (#31827)Oluwatobi Sofela2024-03-241-3/+3
| | | | | * clippy: Fix default constructed unit structs warnings * refactor: Allow default constructed unit structs to avoid gfx build error
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-232-5/+5
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* Implement StaticRange (#31809)cathiechen2024-03-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add DOM interface for AbstractRange * Add DOM interface for StaticRange * Update WPT tests for StaticRange-constructor.html * Fix formatting * Add AbstractRange & StaticRange in interfaces.html * rebased the code and fixed the failures Signed-off-by: Cathie Chen <cathiechen@igalia.com> * update the expected result in idlharness.window.js.ini file * Addressed the code review comments * updae the test result of legacy layout --------- Signed-off-by: Cathie Chen <cathiechen@igalia.com> Co-authored-by: Nipun Garg <nipung271@gmail.com>
* clippy: Fix `unnecessary_cast` warnings in `components/script` (#31823)Oluwatobi Sofela2024-03-224-10/+9
| | | | | | | * clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
* removed mutable compile warnings (#31822)sandeep2024-03-221-3/+3
| | | | Signed-off-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local> Co-authored-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-213-6/+6
|
* clippy: Fix dereferencing a tuple pattern warnings (#31811)Oluwatobi Sofela2024-03-212-2/+2
|
* Remove repeated imports from generated code (#31711)eri2024-03-214-364/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: try to deduplicate imports in codegen * feat: another attempt * feat: start testing imports * feat: clean all global imports * feat: remove shared imports from CGDescriptor * feat: remove redundant imports from CGDescriptor * fix: formatting * fix: remove libc (base level import) * feat: roll back named path changes * feat: last changes and tidy * experiment: move imports into a separate file * fix: extra parenthesis * fix: remove repeated allow statement
* clippy: fix `result_unit_err` warnings (#31791)eri2024-03-211-83/+76
| | | | | | | | | | | | | | | | | * clippy: fix `result_unit_err` warnings * feat: fix result warnings in script * doc: document `generate_key` return type Co-authored-by: Martin Robinson <mrobinson@igalia.com> * feat: add back result to RangeRequestBounds::get_final Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Add pseudo async Create*PipelineAsync methods (#31695)Samson2024-03-191-1/+1
| | | | | | | * Create fake CreatePipelineAsync * Update WebGPU CTS * Update expectations and disable some webgpu tests
* clippy: Fix several warnings (#31710)RustAndMetal2024-03-186-15/+10
| | | Signed-off-by: RustAndMetal <111676747+RustAndMetal@users.noreply.github.com>
* clippy: Fix warnings in generated code (#31721)eri2024-03-171-41/+49
| | | | | | | | | * clippy: remove extra static lifetimes in generated code * clippy: fix return and cast in generated code * clippy: fix more warnings in codegen * clippy: fix all errors from generated files
* rusdoc: Fix `idl` warning in components/script/dom/bindings (#31643)Oluwatobi Sofela2024-03-131-2/+2
| | | | | * rusdoc: Add valid domstring link * rustdoc: Replace unused idl link ref
* rustdoc: Fix warnings in `components/script/dom` (#31632)Azhar Ismagulova2024-03-131-2/+4
| | | | | | | | | | | | | | | * fix: fixed warnings in components/script/dom * fix: resolved comment by setting explicit link to HTMLConstructor * fix: changed the format of WHATWG link * Fix line breaking * Remove trailing white space --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix rustdoc errors in `components/script/dom` (#31617)Mucha Naibei2024-03-112-2/+2
| | | | | * Fix rustdoc errors in components/script/dom * Revert if to iff in audiobuffer.rs
* Use get_desired_proto in htmlconstructor (#31600)Samson2024-03-102-42/+15
| | | | | * Use get_desired_proto in htmlconstructor * Update expectations
* Extract generated finalizers into generic helper functions. (#31569)Josh Matthews2024-03-083-31/+60
|
* mach: Do not use unstable rust for `rustfmt` (#31441)Martin Robinson2024-02-281-5/+8
| | | | | | | | | | We can use stable rust if we pass the unstable configuration as command-line arguments to rustfmt itself. This prevents needing to install an unstable rust toolchain. The one downside here is that it doesn't seem that "ignore" is supported so we have to start formatting the files in "third_party." This shouldn't be a huge issue because we don't plan to check much more rust code into those directories.
* Rename buffer_source_type to buffer_source (#31426)Taym Haddadi2024-02-261-11/+10
| | | | | | | | | | | | | * Rename buffer_source_type to buffer_source Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Code format Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* WedIDL: bring dom/bindings/typedarray further in line with spec (#31375)Taym Haddadi2024-02-253-251/+442
| | | | | | | | | | | | | | | | | * 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>
* Fix crash when closing window containing video element (#31413)Josh Matthews2024-02-231-0/+9
| | | | | * Forbid casting DOM objects when JS runtime is shutting down. * Remove media controls from document when element is removed from the tree.
* script: Do not run layout in a thread (#31346)Martin Robinson2024-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Do not run layout in a thread Instead of spawning a thread for layout that almost always runs synchronously with script, simply run layout in the script thread. This is a resurrection of #28708, taking just the bits that remove the layout thread. It's a complex change and thus is just a first step toward cleaning up the interface between script and layout. Messages are still passed from script to layout via a `process()` method and script proxies some messages to layout from other threads as well. Big changes: 1. Layout is created in the script thread on Document load, thus every live document is guaranteed to have a layout. This isn't completely hidden in the interface, but we can safely `unwrap()` on a Document's layout. 2. Layout configuration is abstracted away into a LayoutConfig struct and the LayoutFactory is a struct passed around by the Constellation. This is to avoid having to monomorphize the entire script thread for each layout. 3. Instead of having the Constellation block on the layout thread to figure out the current epoch and whether there are pending web fonts loading, updates are sent synchronously to the Constellation when rendering to a screenshot. This practically only used by the WPT. A couple tests start to fail, which is probably inevitable since removing the layout thread has introduced timing changes in "exit after load" and screenshot behavior. Co-authored-by: Josh Matthews <josh@joshmatthews.net> * Update test expectations * Fix some issues found during review * Clarify some comments * Address review comments --------- Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings (#31317)Taym Haddadi2024-02-162-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WebIDL: Use Uint8ClampedArray instead of raw JSObject in bindings Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * fmt Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * introduce new_initialized_heap_typed_array function Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove unsed unsafe_code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use doc comments for ImageData Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use get_internal instead of acquire_data Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Handle JS errors in ImageData GetData and new_initialized_heap_typed_array Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix wrong assert that causes CRASH in test Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Early return for error Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Address review comments Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* WebIDL: Use ArrayBufferViewU8 instead of raw JSObject in bindings (#31325)Taym Haddadi2024-02-161-0/+2
| | | | | | | | | | | | | | | | | * WebIDL: Use ArrayBufferViewU8 instead of raw JSObject in bindings Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Remove unused imports Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Address review comments Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Fix rooting of external array buffer pointer (#31342)Taym Haddadi2024-02-141-3/+5
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* WebIDL: Use `ArrayBuffer` instead of raw `JSObject` in bindings (#31202)Taym Haddadi2024-02-132-11/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WebIDL: Use ArrayBuffer instead of raw JSObject in bindings Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Convert GPUBufferMapInfo mapping to Arc<Mutex> * Remove #[allow(unsafe_code)] from GPUBuffer * Add doc comments * Implement trace for Arc<Mutex<Vec<T>>> Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use #[no_trace] for GPUBufferMapInfo.mapping * Make create_new_external_array_buffer generic Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Address review comments * Remove HeapTypedArray::new and avoid cloning Arc Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use expect for GetMappedRange and ReadAsArrayBuffer Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use doc comments for FileReaderSyncMethods Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Return for Error::JsFailed GetMappedRange and ReadAsArrayBuffer Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix detached_internal implementation and comments Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * format code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update expectations --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
* docs: dom binding link fixes (#31311)Abhay Raj Singh2024-02-111-4/+5
|
* webidlg: Handle `Float64Array` as a `TypedArray` rather than a raw ↵Taym Haddadi2024-01-301-0/+2
| | | | | | | | | | | | | | | `JSObject` (#31189) * WebIDL use FLoat64Array Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use to_vec to convert array to vec * avoid allocating a new vec --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Make HeapFloat32Array generic (#31167)Taym Haddadi2024-01-291-26/+48
| | | | | | | | | | | | | | | | | * 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>
* Use Int8array, int16array, uint16array, int32array & uint32array in WebIDL ↵Taym Haddadi2024-01-251-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31164) <!-- Please describe your changes on the following line: --> part #31064 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because there is no behavior changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> There types are not used we can migrate them, in next PR I will make `HeapFloat32Array` generic and convert ArrayBufferView, ArrayBuffer, Uint8ClampedArray and Float64Array. Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Use Uint8Array for TextEncoder (#31145)Taym Haddadi2024-01-232-16/+26
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-227-31/+31
| | | | 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.
* Fix trivial typo in variable name (#31143)Olivier Tilloy2024-01-211-2/+2
|