1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:25:06 +00:00

LibWeb+WebContent: Convert BrowsingContext to new pixel units

This fixes a few glitches. We no longer give the page double the width
it should have, and we mark the correct area of the page as needing
repainting.
This commit is contained in:
Sam Atkins 2022-11-03 12:49:54 +00:00 committed by Linus Groh
parent 8fb7c32ec3
commit affc8a22ca
23 changed files with 68 additions and 70 deletions

View file

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