aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/offscreencanvas.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-2/+2
| | | | | | | | | | | | | * 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 OffscreenCanvas methods (#35731)Yerkebulan Tulibergenov2025-03-011-6/+8
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* Do not assume `OffscreenCanvasContext` to be 2d (#35629)Samson2025-02-241-0/+13
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Remove `get_ipc_sender` from `OffscreenCanvasRenderingContext2D` (#35625)Samson2025-02-241-11/+1
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Unify `(Offscreen)CanvasRenderingContext2d` and make ↵Samson2025-02-231-6/+5
| | | | | `PaintRenderingContext2D` standalone (#35619) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* refactor: propagate CanGc arguments through callers (#35591)Auguste Baum2025-02-231-2/+2
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Propagate `CanGc` arguments through callers in constructors (#35541)Auguste Baum2025-02-201-0/+1
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* Move various reflector types and traits to script_bindings (#35279)Josh Matthews2025-02-041-1/+1
| | | | | | | | | | | | | * 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>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-1/+1
| | | | | | | | | | | | | * 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>
* Implement HTMLCanvasElement.transferControlToOffscreen (#34959)webbeef2025-01-131-3/+12
| | | | | | | | This follows the spec by introducing a new "Placeholder" canvas context mode. The underlying offscreen canvas is kept accessible from the DOM element to allow for the drawImage() implementation to work with canvases that have transfered their control. Signed-off-by: webbeef <me@webbeef.org>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* script: Throw a `TypeError` when trying to create an `OffscreenCanvas` with ↵chickenleaf2024-11-211-5/+7
| | | | | | | | | | | | | | | | | | | an unknown context type (#34276) * fixing test failures that involves throwing TypeError Signed-off-by: L Ashwin B <lashwinib@gmail.com> * handle all unknown values in a single fallback case Signed-off-by: L Ashwin B <lashwinib@gmail.com> * updating few more test- expectations Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-12/+12
| | | | | | | | | | | | | | | | | * 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/+5
| | | | | | | | | | | | | | | | | * 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>
* clippy: Fix option_as_ref_deref warnings (#31936)Oluwatobi Sofela2024-03-291-1/+1
|
* clippy: Fix dereferencing a tuple pattern warnings (#31811)Oluwatobi Sofela2024-03-211-1/+1
|
* clippy: Fix unneeded return statement warnings (#31776)Oluwatobi Sofela2024-03-201-2/+2
|
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-9/+10
| | | | | * strict imports formatting * Reformat all imports
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-5/+8
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Add canvas usability checks to drawImage()pylbrecht2020-02-031-0/+4
|
* 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-4/+2
|
* Addresses Issue: Support OffscreenCanvas as CanvasImageSource #24269Bailey Blankenship2019-12-041-7/+44
| | | | | | Added methods to canvas_data to support drawing an offscreen canvas onto another canvas Bug fix: Swapped OffscreenCanvas width and height parameters to match Mozilla spec Tests: Updated metadata for 866 tests
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensionsBailey Blankenship2019-11-101-2/+16
| | | | Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
* Convert CGTraitInterface to use safe JSContext instead of raw JSContextmarmeladema2019-07-241-4/+3
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* Extract canvas operations for reuse by OffscreenCanvas.Maharsh2019-05-221-1/+6
|
* Update MPL license to httpsJan Andre Ikenmeyer2019-05-101-1/+1
|
* Initial Steps OffScreenCanvas APIMaharsh2019-01-151-0/+146