aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/canvasrenderingcontext2d.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* CanGc changes from fontfaceset.rs (#33920)chickenleaf2024-10-211-12/+13
| | | | | | | | | | | | | | | | * 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>
* Propagate CanGc through dommatrix, dommatrixreadonly, and testbindings (#33822)chickenleaf2024-10-131-2/+2
| | | | | | | | | | | | | | | | | | | * 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 imagedata.rs (#33808)chickenleaf2024-10-111-5/+19
| | | | | | | | | | | | | | | | * 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>
* enhance: Implement `CanvasRenderingContext2D.measureText` (#32704)Chocolate Pie2024-07-171-1/+2
| | | | Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* script: Reduce the use of `unsafe` in LayoutDom (#31979)Martin Robinson2024-04-031-6/+3
| | | | | | | | | | | | | Remove the use of unsafe code in the layout wrappers of the DOM. The main change here is that `unsafe_get()` no longer needs to be an unsafe method, which allows us to transitively remove or reduce unsafe blocks from callers. The function itself is not renamed, because it's still a bit dangerous to start removing the layers of abstraction from actual DOM nodes. In addition `init_style_and_opaque_layout_data` can be merged into `initialize_data`, which removes one more unsafe method. Finally, a "Safety" section is added to some unsafe methods.
* clippy: Fix option_as_ref_deref warnings (#31936)Oluwatobi Sofela2024-03-291-3/+2
|
* fix: remove unused imports (#31929)Azhar Ismagulova2024-03-281-2/+0
|
* clippy: Fix mem_replace_with_default warnings (#31921)Oluwatobi Sofela2024-03-281-4/+1
|
* clippy: Fix a few clippy problems in `components/scripts/dom` (#31905)Rosemary Ajayi2024-03-281-8/+7
| | | | | * option_as_ref_deref * fix
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-1/+1
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* canvas2d: Implement `.reset()` (#31258)Smitty2024-02-051-1/+6
| | | | | | | | | | | * Implement Canvas2D reset * Update WPT tests * Apply suggestions from code review --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* 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>
* Allow currentColor in canvas context's shadowColor (#30754)Oriol Brufau2023-11-201-1/+2
| | | | | | This allows unifying the parse_color function and method, aligns Servo with other browsers, and obeys the HTML spec: - https://html.spec.whatwg.org/multipage/canvas.html#shadows - https://html.spec.whatwg.org/multipage/infrastructure.html#parsed-as-a-css-color-value
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-14/+12
| | | | | * strict imports formatting * Reformat all imports
* Enable textAlign, textBaseline and direction attributes for canvasUtsav Oza2020-06-101-0/+33
|
* Store resolved font style in canvas context stateUtsav Oza2020-06-101-1/+2
|
* Query layout to resolve canvas font property valueUtsav Oza2020-06-101-0/+11
|
* Resolve mach build warningsUtsav Oza2020-04-101-10/+2
|
* Remove DomRefCell wrapper for canvas_state from CanvasRenderingContext2DUtsav Oza2020-04-101-118/+72
|
* Update euclidManish Goregaokar2020-04-071-1/+0
|
* Make LayoutCanvasRenderingContext2DHelpers::get_canvas_id be safeAnthony Ramine2020-03-311-7/+11
|
* Make LayoutCanvasRenderingContext2DHelpers methods take selfAnthony Ramine2020-03-291-4/+4
|
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Implement CanvasRenderingContext2D.getTransform()pylbrecht2020-02-121-0/+6
|
* Make create_pattern() return None for incomplete imagespylbrecht2020-02-101-1/+1
|
* Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensionsBailey Blankenship2019-11-101-6/+22
| | | | Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
* Moved CanvasState out of canvasrenderingcontextHanif Bin Ariffin2019-10-251-1568/+94
| | | | | | | | | | | | | | | | | Cleaned up imports... Applied clang-tidy Moved CanvasState and some other files Next commit should remove pub modifier from members of CanvasState and use getters/setters instead. Members of CanvasState are now private and applied test-tidy Now have getters that return an immutable reference. Also, I have no idea what to name some_func.rs Removed need for some_func and made pub(crate)
* fix getimagedata returns empty pixelsRasmus Viitanen2019-10-161-28/+21
|
* Support CORS attributes for image elements.Josh Matthews2019-10-041-9/+39
|
* Use the paint worklet's base URL for the 2d canvas' origin checks.Josh Matthews2019-10-041-1/+10
|
* Double key image cache by requesting origin, and store CORS status with ↵Josh Matthews2019-10-041-1/+4
| | | | cached images.
* Temporary implementation of Canvas.MeasureTextPaul Rouget2019-09-251-0/+15
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-3/+6
| | | | | | | | 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.
* layout: Fix servo build.Emilio Cobos Álvarez2019-06-041-1/+1
|
* Extract canvas operations for reuse by OffscreenCanvas.Maharsh2019-05-221-733/+1217
|
* removed commentsMaharsh2019-05-131-45/+1
|
* Borrow Layout ChangeMaharsh2019-05-131-2/+5
|
* Updated Testcases and FormattingMaharsh2019-05-111-7/+6
|
* Changes for sender recieverMaharsh2019-05-091-5/+26
|
* Changes for gitignoreMaharsh2019-05-091-7/+16
|
* Created CanvasRect fro OffscreenCanvas and Updated TestcasesMaharsh2019-03-291-32/+97
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-4/+4
|
* Make HTMLCanvasElement::fetch_all_data return a shared memory blobAnthony Ramine2018-11-211-1/+5
|
* Call rgba8_byte_swap_colors_inplace on the WebGL threadAnthony Ramine2018-11-201-3/+1
|
* Move PixelFormat to the pixels crateAnthony Ramine2018-11-201-1/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Prefix some pixels functions with rgba8_Anthony Ramine2018-11-161-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018