1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00

LibWeb: Use CSS Pixels for viewport rects

This commit is contained in:
Sam Atkins 2022-11-09 12:32:20 +00:00 committed by Linus Groh
parent 8cc0bdf777
commit 4084c66ad2
7 changed files with 17 additions and 17 deletions

View file

@ -1437,10 +1437,10 @@ void StyleComputer::invalidate_rule_cache()
m_rule_cache = nullptr;
}
Gfx::IntRect StyleComputer::viewport_rect() const
CSSPixelRect StyleComputer::viewport_rect() const
{
if (auto const* browsing_context = document().browsing_context())
return browsing_context->viewport_rect().to_type<float>().to_type<int>();
return browsing_context->viewport_rect();
return {};
}