1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibWeb: Limit the maximum size of <canvas> bitmap buffers

We will no longer create bitmap buffers for canvases that exceed a
total area of (16384 * 16384) pixels. This matches what some other
browser do.

Thanks to @itamar8910 for finding this! :^)
This commit is contained in:
Andreas Kling 2020-04-15 12:12:19 +02:00
parent 228ace854c
commit 3f698db85d
5 changed files with 49 additions and 18 deletions

View file

@ -42,8 +42,8 @@ LayoutCanvas::~LayoutCanvas()
void LayoutCanvas::layout()
{
rect().set_width(node().preferred_width());
rect().set_height(node().preferred_height());
rect().set_width(node().requested_width());
rect().set_height(node().requested_height());
LayoutReplaced::layout();
}