servo/components/canvas
Andrei Volykhin 6b2a755736
canvas: Apply large size limitations (#36445)
To prevent any potential crash/OOM issues with "canvas" element
from "rogue" applications let's apply large size limitations for context
canvas2d's draw target to Servo (similar approach in Firefox/Chromium -
they limits width and height to 32767/65535 pixels).

Fixes: #36155, #34117, #30164, #24710

--
- [x] ./mach build -d does not report any errors
- [x] ./mach test-tidy does not report any errors
- [x] There are tests for these changes

tests/wpt/tests/html/canvas/element/canvas-host/2d.canvas.host.size.large.html

tests/wpt/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.html

tests/wpt/tests/html/canvas/offscreen/canvas-host/2d.canvas.host.size.large.worker.js

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-04-29 13:48:30 +00:00
..
webgl_mode compositing: Combine webrender_traits and compositing_traits (#36372) 2025-04-06 17:34:18 +00:00
canvas_data.rs canvas: Apply large size limitations (#36445) 2025-04-29 13:48:30 +00:00
canvas_paint_thread.rs Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
Cargo.toml Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
lib.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
raqote_backend.rs Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
webgl_limits.rs Elide lifetimes where possible after rustup (#34824) 2025-01-03 18:54:44 +00:00
webgl_thread.rs Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
webxr.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00