mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02: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:
committed by
Tim Ledbetter
parent
b05bc71002
commit
a486c86eee
Notes:
github-actions[bot]
2024-12-01 15:12:58 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/a486c86eee7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2641
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user