mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibWeb: Limit HTMLCanvasElement
width and height to allowed values
Setting the `width` or `height` properties of `HTMLCanvasElement` to a value greater than 2147483647 will now cause the property to be set to its default value.
This commit is contained in:
parent
b05bc71002
commit
a486c86eee
Notes:
github-actions[bot]
2024-12-01 15:12:58 +00:00
Author: https://github.com/tcl3
Commit: a486c86eee
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2641
4 changed files with 73 additions and 10 deletions
|
@ -42,6 +42,8 @@
|
|||
return input;
|
||||
}
|
||||
|
||||
testProperty("canvas", "width", (canvas) => canvas.width, (canvas, value) => canvas.width = value);
|
||||
testProperty("canvas", "height", (canvas) => canvas.height, (canvas, value) => canvas.height = value);
|
||||
testProperty("img", "height", (img) => img.height, (img, value) => img.height = value);
|
||||
testProperty("img", "hspace", (img) => img.hspace, (img, value) => img.hspace = value);
|
||||
testProperty("img", "width", (img) => img.width, (img, value) => img.width = value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue