1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

LibWeb: Support window.devicePixelRatio

This always returns 1 for now. I've added a FIXME about returning 2 in
HiDPI mode.
This commit is contained in:
Andreas Kling 2021-09-27 16:34:06 +02:00
parent e26e85a3d2
commit 7410736b0f
4 changed files with 19 additions and 0 deletions

View file

@ -309,4 +309,10 @@ void Window::queue_microtask(JS::FunctionObject& callback)
});
}
float Window::device_pixel_ratio() const
{
// FIXME: Return 2.0f if we're in HiDPI mode!
return 1.0f;
}
}