aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
Commit message (Collapse)AuthorAgeFilesLines
...
* Propagate CanGc when interacting with readable streams. (#33975)Josh Matthews2024-10-231-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* CanGc fixes from eventtarget.rs (#33973)tanishka2024-10-221-17/+21
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes in `errorevent.rs` (#33960)tanishka2024-10-222-5/+10
| | | | | | | | | | | | | * CanGc fixes in errorevent.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Allow too_many_arguments to avoid lint error Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Mark promise creation methods with CanGc (#33928)Josh Matthews2024-10-221-47/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add CanGc annotations to promise constructor. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc arguments for Promise::new_in_current_realm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix out-of-order entries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from Promise::new. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Suppress clippy warning. 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 several files (#33958)chickenleaf2024-10-211-4/+8
| | | | | | | | | | | | | * few cangc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * few cangc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc changes from fontfaceset.rs (#33920)chickenleaf2024-10-211-7/+25
| | | | | | | | | | | | | | | | * CanGc changes from fontfaceset.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Update components/script/dom/bindings/codegen/Bindings.conf Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: chickenleaf <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* crypto: Implement encrypt/decrypt for AES-CBC + JWK support (#33795)Daniel Adams2024-10-212-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for raw importKey with AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Support JWK import/export, importKey for AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement encrypt/decrypt for AES-CBC Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update Cargo.lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Pass MutableHandleObject as arg instead of returning raw pointer Signed-off-by: Daniel Adams <msub2official@gmail.com> * Swap order of checks in generate_key_aes_cbc - Fixes WPT tests that expect to error on algorithm first before usages Signed-off-by: Daniel Adams <msub2official@gmail.com> * Avoid potential GC hazard with array_buffer_ptr Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations for discards context Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* CanGc fixes from constantsourcenode.rs & window.rs (#33931)tanishka2024-10-201-2/+10
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Multiple CanGc fixes in components/script/dom (#33924)tanishka2024-10-203-4/+12
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes through focusevent.rs & hashchangeevent.rs (#33921)tanishka2024-10-201-1/+37
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix a variety of clippy warnings in `fonts`, `layout_2020` and the ↵chickenleaf2024-10-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM code (#33894) * fixed some clippy warnings Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Delete extra file Signed-off-by: chickenleaf <lashwinib@gmail.com> * preserved newline in compositionevent.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> * removed the newline in PrototypeList Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the trailing whitespace Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* More files with CanGc fixes (#33892)chickenleaf2024-10-181-4/+16
| | | | | | | | | | | | | * More files with CanGc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the can_gc inside !task Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Various CanGc fixes in 8 files (#33893)chickenleaf2024-10-181-2/+6
| | | | | | | | | | | | | * Various CanGc fixes in 8 files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed merge conflicts and formatting Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes in components/script/dom (#33891)tanishka2024-10-171-1/+1
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* More CanGc fixes (#33888)chickenleaf2024-10-171-3/+18
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes in components/script/dom (#33880)tanishka2024-10-171-0/+4
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix warnings in `components/script/dom` (#33860)tanishka2024-10-161-0/+2
| | | | | | | | | | | | | * clippy: Fix warnings in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Move allow to WRAP level Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Some CanGc Fixes (#33865)komuhangi2024-10-161-0/+1
| | | Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
* CanGc fixes in components/script/dom (#33862)tanishka2024-10-161-2/+2
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Add safety documentation and clean up unsafe methods (#33748)Martin Robinson2024-10-162-0/+19
| | | | | | | | | | | This change: 1. Adds safety documentation where it was missing. 2. Limits the scope of unsafe code in some cases to where it is actually unsafe. 3. Converts some free functions to associated functions and methods, thereby making them more likely to be called safely. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* CanGc fixes (#33852)chickenleaf2024-10-161-2/+17
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes in components/script/dom (#33843)tanishka2024-10-151-1/+1
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes and checks in multiple files (#33836)chickenleaf2024-10-151-0/+1
| | | | | | | | | | | | | * CanGc fixes and checks in multiple files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * CanGc fixes in storageevent.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes originating from `gamepadevent.rs` & `stereopannernode.rs` (#33828)tanishka2024-10-141-1/+1
| | | | | | | | | | | | | * CanGc fixes originating from gamepadevent.rs & stereopannernode.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Revert changes within task! macro Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc fixes in focusevent.rs oscillartornode.rs response.rs ↵chickenleaf2024-10-131-0/+6
| | | | | resizeobserversize.rs animationevent.rs (#33827) Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Propagate CanGc through dommatrix, dommatrixreadonly, and testbindings (#33822)chickenleaf2024-10-131-2/+15
| | | | | | | | | | | | | | | | | | | * CanGc fixes starting from dommatrix.rs fixed conflicts Signed-off-by: L Ashwin B <lashwinib@gmail.com> ~ * cleaning up Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed cannot find value can_gc in this scope error Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes starting from blob.rs, mediastream.rs, custom_event.rs (#33820)chickenleaf2024-10-121-1/+12
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes starting from imagedata.rs (#33808)chickenleaf2024-10-111-0/+8
| | | | | | | | | | | | | | | | * CanGc fixes starting from imagedata.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Update components/script/dom/imagedata.rs Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: chickenleaf <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* fix clippy warnings in codegen (#33781)Gae242024-10-101-2/+2
| | | Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* use `ThreadSafeJSContext` instead of `ContextForRequestInterrupt` (#33769)Samson2024-10-101-2/+1
| | | | | | | | | | | | | * use `ThreadSafeJSContext` instead of `ContextForRequestInterrupt` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * use servo/mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* refactor `CGClassConstructHook` to use handwritten constructors (#33614)Gae242024-10-094-40/+65
| | | | | | | | | | | | | | | | | | | | | * extract generated class constructor hook into handwritten functions Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * downcast to window only when it's actually used Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * simplify downcast Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * rename htmlconstructor to constructor, include call_default_constructor in it Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* Fix: Add missing transmute annotations in Castable trait (#33729)chickenleaf2024-10-081-1/+1
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* fix(clippy): add missing annotations for transmute usage in root.rs (#33728)chickenleaf2024-10-081-2/+2
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Replace CanGc::note() calls with arguments in `components/script/dom` (#33692)tanishka2024-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | * Replace CanGc::note() calls with arguments in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Add methods to Bindings.conf Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Modify existing interface sections Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Resolve conflicts Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix warning in `components/script/dom` (#33685)tanishka2024-10-081-1/+1
| | | | | | | | | | | | | | | * clippy: Fix warnings in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Remove unused default() method Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* crypto: Begin SubtleCrypto implementation (#33628)Daniel Adams2024-10-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update IDLs and Bindings conf Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add AES crate Signed-off-by: Daniel Adams <msub2official@gmail.com> * Implement DOM interfaces Signed-off-by: Daniel Adams <msub2official@gmail.com> * IDL tidy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Remove deriveKey from inRealms for now until implemented Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix CryptoKey rustdoc comments Signed-off-by: Daniel Adams <msub2official@gmail.com> * Move string constants to top of file Signed-off-by: Daniel Adams <msub2official@gmail.com> * Use properly rooted CryptoKey Signed-off-by: Daniel Adams <msub2official@gmail.com> * Code clarity Signed-off-by: Daniel Adams <msub2official@gmail.com> * Rework NormalizedAlgorithm to not hold a DOMString Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add Rustdoc for CryptoKey interface Signed-off-by: Daniel Adams <msub2official@gmail.com> * Move ignore mallocsizeof to rand crate, remove from crypto Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update cargo lock Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix key handling, implement exportKey with JWK TODO Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec link Signed-off-by: Daniel Adams <msub2official@gmail.com> * Use create_buffer_source, remove aes dep from libservo Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix crash when running in worker Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * fmt Signed-off-by: Daniel Adams <msub2official@gmail.com> * Move CryptoKey and SubtleCrypto behind pref for now Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Readd timeout expectation Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Sorted Bindings.conf alphabetically (#33713)DileepReddyP2024-10-081-105/+105
| | | | | Checked that this is a valid Python object and is equivalent to the unsorted file Signed-off-by: Dileep Reddy <dileepreddyp7@gmail.com>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-17/+71
| | | | | | | | | | | | | | | | | * 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>
* Less `allow(crown::unrooted_must_root)` in bindings (#33630)Samson2024-10-032-4/+8
| | | | | | | | | | | | | * Limit `allow(crown::unrooted_must_root)` in bindings Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extra_decorators Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix panic in webstorage/symbol-props.window.js (#33108)Akash Pateria2024-10-021-0/+16
| | | | | Issue: https://github.com/servo/servo/issues/32987 Signed-off-by: Akash Pateria <pateria.akash77@gmail.com>
* bindings: Allow Guard to take multiple conditions, check for SecureContext ↵Daniel Adams2024-09-212-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | in ConstructorEnabled (#33508) * Update condition handling for exposing values - Let Guard take a list of conditions - Check for secure context condition when exposing constructor Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Python tidy Signed-off-by: Daniel Adams <msub2official@gmail.com> * Make interfaces test run in secure context Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-161-2/+2
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix rustdoc problems (#33458)Oriol Brufau2024-09-141-1/+1
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* clippy: Fix suggestions in `script`, `libservo`, and `servoshell` (#33453)Ali2024-09-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * fix clone on copy warning in servoshell Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Remove unecessary borrow in libservo Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Ignore too many arguments warning on create_constellation() Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * fix explicit auto-deref warning Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Autofix multiple clippy warnings in components/script Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> --------- Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* chore: Fix two compiler warnings (#33421)Martin Robinson2024-09-121-1/+4
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Propagate `CanGc` from `Document::new()` (#33386)Andriy Sultanov2024-09-095-13/+65
| | | | | | | | | | | | | * Add canGc as a parameter to autogenerated trait methods Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> * Propagate CanGc from Document::new() Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> --------- Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* script: Use `time@0.3` for input elements and do conversion in a &str trait ↵Martin Robinson2024-09-091-311/+399
| | | | | | | | | | | | | | | | | (#33355) This changes converts all input element parsing and normalization to use `time` instead of `chrono`. `time` is used by our dependencies, so it makes sense to work toward removing the Servo dependency on chrono. In addition, parsing and normalization also moves to a trait on &str to prepare for the possibility of all script parsers moving to a separate crate that can have unit tests written against it. Code duplication is eliminated when possible and more conversion is done using integer types. These two things together mean we pass more tests now. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: Factor out swapchain to separate file (#33367)Samson2024-09-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move some stuff to swapchain.rs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use typed WebGPUContextId instead of u64 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Extract create_swapchain function and move more stuff in it Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extract destroy_swapchain Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extract swapchain_present Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extract update_wr_image callback Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366)Martin Robinson2024-09-081-2/+2
| | | | | | | | This change fixes all rustdoc errors and also adds a tidy check for a very common rustdoc URL issue. Eventually rustdoc warnings should likely cause the build to fail, but this catches those issues sooner in order to not waste so much developer time. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* jsstring_to_str should accept a NonNull argument for the JS string (#33306)Andriy Sultanov2024-09-053-30/+29
| | | | | | Instead of asserting the raw pointer is not null, force callers to produce a NonNull pointer. Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>